- Fixed infinite loop in traceback()

- Misc. code cleanups
This commit is contained in:
taubert 1998-02-22 05:05:54 +00:00
parent 9416f9d55c
commit 6822a8d18f
6 changed files with 22 additions and 28 deletions

View File

@ -1,4 +1,4 @@
* $Id: ctool.asm,v 1.1 1998/02/02 08:19:14 taubert Exp $
* $Id: ctool.asm,v 1.2 1998/02/22 05:05:40 taubert Exp $
mcopy m/ctool.mac
@ -16,9 +16,8 @@
; jsl $E10000
;always bra always
;goold pla
; dc i1'$5C'
;OLDDISPHAND ENTRY
; dc i4'0'
; jmp >$000000
; END
* all processes that end with RTL come here
@ -174,9 +173,8 @@ badBoy dc c'QuickDraw is already started.'
END
DoOldQD START
dc i1'$5C'
OLDQDSTARTUP ENTRY
dc i4'0'
jmp >$000000
END
* The new Sane Startup only stores the program's chosen SANE DP space
@ -195,9 +193,8 @@ sanedp equ 7+1
ldx curProcInd
sta SANEwap,x
plb
dc i1'$5C'
OLDSANESU ENTRY
dc i4'0'
jmp >$000000
END
SANESDPATCH START

View File

@ -1,4 +1,4 @@
/* $Id: diag.c,v 1.1 1998/02/02 08:18:23 taubert Exp $ */
/* $Id: diag.c,v 1.2 1998/02/22 05:05:42 taubert Exp $ */
/* kernel diagnostics and error routines */
#pragma optimize 79
@ -27,11 +27,14 @@ extern kernelStructPtr kp;
void traceback(word stack)
{
word j;
word i, j;
for (j = stack; (j<stack+256) && (j<0xC000);) {
for (j = stack+1; (j<stack+256) && (j<0xC000);) {
kern_printf("[%04X]:", j);
for (; j < (j&0xfff0)+0x10; j++) {
for (i=j&0x000f; i; i--) {
kern_printf(" --");
}
for (i=(j&0xfff0)+0x10; j < i; j++) {
kern_printf(" %02X", *((byte *)j));
}
kern_printf("\n\r");
@ -65,12 +68,16 @@ void PANIC(char *str)
*((byte *) 0xE0C022l) = 0x1F;
asm {
tsc
sta >stack
sta stack
lda >0xE0C029
and #0xFF7F
sta >0xE0C029
}
traceback(stack+2);
/*
* NOTE: When PANIC() is modified, this constant added to stack should
* be tuned to point to the caller's return address.
*/
traceback(stack + 0xA);
kern_printf("SYSTEM PANIC: %s\n\r",str);
noway:

View File

@ -1,3 +1,4 @@
* $Id: global.equates,v 1.2 1998/02/22 05:05:43 taubert Exp $
*********************************************************************
*
* GSOS/P16/Shell Call DP locations

View File

@ -1,4 +1,4 @@
* $Id: kern.asm,v 1.1 1998/02/02 08:19:28 taubert Exp $
* $Id: kern.asm,v 1.2 1998/02/22 05:05:45 taubert Exp $
* GNO Multitasking environment
* Low-level Kernel code
@ -668,9 +668,8 @@ SaveAllPatch START
pla
plb
plp
dc i1'$5C'
OLDSAVEALL ENTRY
dc i4'0'
jmp >$000000
RestAllPatch ENTRY
php
@ -747,14 +746,10 @@ RestAllPatch ENTRY
; ldy #0
; jmp tool_exit
gooldRest dc i1'$5C'
OLDRESTALL ENTRY
dc i4'0'
jmp >$000000
savedCDAInfo ENTRY
tblockCP dc i2'0' ; FIXME - remove this
tcount dc i2'0' ; FIXME - remove this
tbufState dc i2'0' ; FIXME - remove this
ttruepid dc i2'0'
tcurProcInd dc i2'0'
tgsosDebug dc i2'0'

View File

@ -263,11 +263,6 @@ pastName&SYSCNT anop
.pastName
MEND
MACRO
&lab _PostEvent
&lab ldx #$1406
jsl $E10000
MEND
MACRO
&lab _ClampMouse
&lab ldx #$1C03
jsl $E10000

View File

@ -1,4 +1,4 @@
/* $Id: signal.c,v 1.1 1998/02/02 08:18:56 taubert Exp $ */
/* $Id: signal.c,v 1.2 1998/02/22 05:05:49 taubert Exp $ */
/* Signals work like this.
The following paragraphs only describe calling a handler routine, as
@ -265,7 +265,6 @@ extern void disposevar(int);
tosig->ticks + tosig->childTicks;
}
if (!(tosig->flags & FL_COMPLIANT)) {
int c = 5;
enableBuf();
}
/* If the process was in a sleep queue, remove it - do not ready */