- 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 mcopy m/ctool.mac
@ -16,9 +16,8 @@
; jsl $E10000 ; jsl $E10000
;always bra always ;always bra always
;goold pla ;goold pla
; dc i1'$5C'
;OLDDISPHAND ENTRY ;OLDDISPHAND ENTRY
; dc i4'0' ; jmp >$000000
; END ; END
* all processes that end with RTL come here * all processes that end with RTL come here
@ -174,9 +173,8 @@ badBoy dc c'QuickDraw is already started.'
END END
DoOldQD START DoOldQD START
dc i1'$5C'
OLDQDSTARTUP ENTRY OLDQDSTARTUP ENTRY
dc i4'0' jmp >$000000
END END
* The new Sane Startup only stores the program's chosen SANE DP space * The new Sane Startup only stores the program's chosen SANE DP space
@ -195,9 +193,8 @@ sanedp equ 7+1
ldx curProcInd ldx curProcInd
sta SANEwap,x sta SANEwap,x
plb plb
dc i1'$5C'
OLDSANESU ENTRY OLDSANESU ENTRY
dc i4'0' jmp >$000000
END END
SANESDPATCH START 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 */ /* kernel diagnostics and error routines */
#pragma optimize 79 #pragma optimize 79
@ -27,11 +27,14 @@ extern kernelStructPtr kp;
void traceback(word stack) 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); 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(" %02X", *((byte *)j));
} }
kern_printf("\n\r"); kern_printf("\n\r");
@ -65,12 +68,16 @@ void PANIC(char *str)
*((byte *) 0xE0C022l) = 0x1F; *((byte *) 0xE0C022l) = 0x1F;
asm { asm {
tsc tsc
sta >stack sta stack
lda >0xE0C029 lda >0xE0C029
and #0xFF7F and #0xFF7F
sta >0xE0C029 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); kern_printf("SYSTEM PANIC: %s\n\r",str);
noway: 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 * 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 * GNO Multitasking environment
* Low-level Kernel code * Low-level Kernel code
@ -668,9 +668,8 @@ SaveAllPatch START
pla pla
plb plb
plp plp
dc i1'$5C'
OLDSAVEALL ENTRY OLDSAVEALL ENTRY
dc i4'0' jmp >$000000
RestAllPatch ENTRY RestAllPatch ENTRY
php php
@ -747,14 +746,10 @@ RestAllPatch ENTRY
; ldy #0 ; ldy #0
; jmp tool_exit ; jmp tool_exit
gooldRest dc i1'$5C'
OLDRESTALL ENTRY OLDRESTALL ENTRY
dc i4'0' jmp >$000000
savedCDAInfo ENTRY 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' ttruepid dc i2'0'
tcurProcInd dc i2'0' tcurProcInd dc i2'0'
tgsosDebug dc i2'0' tgsosDebug dc i2'0'

View File

@ -263,11 +263,6 @@ pastName&SYSCNT anop
.pastName .pastName
MEND MEND
MACRO MACRO
&lab _PostEvent
&lab ldx #$1406
jsl $E10000
MEND
MACRO
&lab _ClampMouse &lab _ClampMouse
&lab ldx #$1C03 &lab ldx #$1C03
jsl $E10000 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. /* Signals work like this.
The following paragraphs only describe calling a handler routine, as The following paragraphs only describe calling a handler routine, as
@ -265,7 +265,6 @@ extern void disposevar(int);
tosig->ticks + tosig->childTicks; tosig->ticks + tosig->childTicks;
} }
if (!(tosig->flags & FL_COMPLIANT)) { if (!(tosig->flags & FL_COMPLIANT)) {
int c = 5;
enableBuf(); enableBuf();
} }
/* If the process was in a sleep queue, remove it - do not ready */ /* If the process was in a sleep queue, remove it - do not ready */