MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / branch_stack_push

Function branch_stack_push

src/debugmem.cpp:514–550  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512}
513
514void branch_stack_push(uaecptr oldpc, uaecptr newpc)
515{
516 if (!stackframes) {
517 return;
518 }
519 if (!stackframemode) {
520 if (debug_waiting || (!regs.s && get_long_host(exec_thistask) != debug_task)) {
521 return;
522 }
523 }
524 int cnt = regs.s ? stackframecntsuper : stackframecnt;
525 if (cnt >= MAX_STACKFRAMES) {
526 write_log(_T("Stack frame %c max limit reached!\n"), regs.s ? 'S' : 'U');
527 stackframecntsuper = 0;
528 stackframecnt = 0;
529 return;
530 }
531 struct debugstackframe *sf = regs.s ? &stackframessuper[cnt] : &stackframes[cnt];
532 sf->current_pc = regs.instruction_pc;
533 sf->next_pc = newpc;
534 sf->stack = m68k_areg(regs, 7);
535 sf->branch_pc = m68k_getpc();
536 MakeSR();
537 sf->sr = regs.sr;
538 memcpy(sf->regs, regs.regs, sizeof(uae_u32) * 16);
539 if (regs.s) {
540 stackframecntsuper++;
541 } else {
542 stackframecnt++;
543 stackframecntsuper = 0;
544 }
545 if (break_stack_push && ((break_stack_s && regs.s) || (!break_stack_s && !regs.s))) {
546 break_stack_push = false;
547 break_stack_pop = false;
548 debugmem_break(11);
549 }
550}
551
552bool debugmem_break_stack_pop(void)
553{

Callers 15

op_6100_31_ffFunction · 0.85
op_6101_31_ffFunction · 0.85
op_61ff_31_ffFunction · 0.85
op_4e90_21_ffFunction · 0.85
op_4ea8_21_ffFunction · 0.85
op_4eb0_21_ffFunction · 0.85
op_4eb8_21_ffFunction · 0.85
op_4eb9_21_ffFunction · 0.85
op_4eba_21_ffFunction · 0.85
op_4ebb_21_ffFunction · 0.85
op_6100_21_ffFunction · 0.85
op_6101_21_ffFunction · 0.85

Calls 5

get_long_hostFunction · 0.85
m68k_getpcFunction · 0.85
debugmem_breakFunction · 0.85
write_logFunction · 0.70
MakeSRFunction · 0.70

Tested by

no test coverage detected