Mercurial > hg > Members > kono > os9 > sbc09
comparison trace.c @ 52:51b437557f42
boot without disk image
dir -e on other directory
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 22 Jul 2018 15:52:39 +0900 (2018-07-22) |
parents | 52f7ad4c2ebb |
children |
comparison
equal
deleted
inserted
replaced
51:498b6fcaf270 | 52:51b437557f42 |
---|---|
180 case 'n': // step over | 180 case 'n': // step over |
181 if (nexti()) { | 181 if (nexti()) { |
182 bpskip = -1; | 182 bpskip = -1; |
183 break; | 183 break; |
184 } | 184 } |
185 default: | |
186 case 's': // one step trace | 185 case 's': // one step trace |
187 trskip = 1; | 186 trskip = 1; |
188 if (s[1]) { | 187 if (s[1]) { |
189 trskip = getarg(s+1,0); | 188 trskip = getarg(s+1,0); |
190 } | 189 } |
376 mmu = &mem[0xffa0]; | 375 mmu = &mem[0xffa0]; |
377 mem[0xffa7]=0x3f; | 376 mem[0xffa7]=0x3f; |
378 #endif | 377 #endif |
379 attention = escape = 1; | 378 attention = escape = 1; |
380 break; | 379 break; |
380 default: // one step trace | |
381 trskip = 1; | |
382 bpskip = 0; | |
383 attention = escape = 1; | |
381 } | 384 } |
382 if (tracing||breakpoint||trskip||bpskip||stkskip) { attention = escape = 1; } | 385 if (tracing||breakpoint||trskip||bpskip||stkskip) { attention = escape = 1; } |
383 else attention = 0; | 386 else attention = 0; |
384 set_term(escchar); | 387 set_term(escchar); |
385 } | 388 } |
386 | 389 |
387 void setbreak(int adr, int count) { | 390 void setbreak(int adr, int count) { |
388 BPTR bp = calloc(1,sizeof(BP)); | 391 BPTR bp = calloc(1,sizeof(BP)); |
389 bp->next = breakpoint; | |
390 breakpoint = bp; | |
391 bp->count = count; | 392 bp->count = count; |
392 bp->laddr = adr; | 393 bp->laddr = adr; |
393 bp->address = paddr(adr,mmu); | 394 bp->address = paddr(adr,mmu); |
394 #ifdef USE_MMU | 395 #ifdef USE_MMU |
396 if (bp->address >= memsize) { free(bp); return; } | |
395 bp->watch = *mem0(phymem,adr,mmu); | 397 bp->watch = *mem0(phymem,adr,mmu); |
396 #else | 398 #else |
397 bp->watch = mem[adr]; | 399 bp->watch = mem[adr]; |
398 #endif | 400 #endif |
401 bp->next = breakpoint; | |
402 breakpoint = bp; | |
399 } | 403 } |
400 | 404 |
401 int nexti(void) { | 405 int nexti(void) { |
402 #ifdef USE_MMU | 406 #ifdef USE_MMU |
403 int op1 = *mem0(phymem,pcreg,mmu); | 407 int op1 = *mem0(phymem,pcreg,mmu); |