Mercurial > hg > Members > kono > os9 > sbc09
diff trace.c @ 38:52f7ad4c2ebb
a09 out range bug
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 17 Jul 2018 06:41:02 +0900 |
parents | 01519215ec70 |
children | 51b437557f42 |
line wrap: on
line diff
--- a/trace.c Mon Jul 16 11:22:28 2018 +0900 +++ b/trace.c Tue Jul 17 06:41:02 2018 +0900 @@ -122,9 +122,9 @@ void do_escape(void) { char s[80]; int adr,page; + int ppc = paddr(pcreg,mmu); if (bpskip) { // skip unbreak instruction bpskip--; - int ppc = paddr(pcreg,mmu); BPTR *prev = &breakpoint; for(BPTR b = breakpoint; b ; prev=&b->next, b=b->next ) { #ifdef USE_MMU @@ -149,13 +149,20 @@ return; } if (stkskip) { // skip until return +#ifdef USE_MMU + if (phymem[ppc]==0x3b||(phymem[ppc]==0x10&&phymem[ppc+1]==0x3f)) + goto restart0; +#else + if (mem[ppc]==0x3b||(mem[ppc]==0x10&&mem[ppc+1]==0x3f)) + goto restart0; +#endif if (sreg < stkskip ) return; } restart0: stkskip = 0; restore_term(); #ifdef USE_MMU - Byte *phyadr = mem0(phymem,pcreg,mmu); + Byte *phyadr = phymem + ppc; prog = (char*)phyadr - pcreg; #endif do_trace(stdout);