| 3977 | } |
| 3978 | |
| 3979 | bool debugmem_list_stackframe(bool super) |
| 3980 | { |
| 3981 | if (!debugmem_bank.baseaddr && !stackframemode) { |
| 3982 | return false; |
| 3983 | } |
| 3984 | int cnt = super ? stackframecntsuper : stackframecnt; |
| 3985 | if (!cnt) |
| 3986 | return false; |
| 3987 | for (int i = 0; i < cnt; i++) { |
| 3988 | struct debugstackframe *sf = super ? &stackframessuper[i] : &stackframes[i]; |
| 3989 | console_out_f(_T("%08x -> %08x SP=%08x"), sf->current_pc, sf->branch_pc, sf->stack); |
| 3990 | if (sf->sr & 0x2000) |
| 3991 | console_out_f(_T(" SR=%04x"), sf->sr); |
| 3992 | TCHAR txt1[256], txt2[256]; |
| 3993 | if (debugmem_get_segment(sf->branch_pc, NULL, NULL, txt1, sizeof txt1 / sizeof(TCHAR), txt2, sizeof txt2 / sizeof(TCHAR))) { |
| 3994 | console_out_f(_T(" %s %s"), txt1, txt2); |
| 3995 | } |
| 3996 | if (debugmem_get_symbol(sf->branch_pc, txt1, sizeof(txt1) / sizeof(TCHAR))) { |
| 3997 | console_out_f(_T(" %s"), txt1); |
| 3998 | } |
| 3999 | console_out_f(_T("\n")); |
| 4000 | uae_u32 sregs[16]; |
| 4001 | memcpy(sregs, regs.regs, sizeof(uae_u32) * 16); |
| 4002 | memcpy(regs.regs, sf->regs, sizeof(uae_u32) * 16); |
| 4003 | #ifdef DEBUGGER |
| 4004 | m68k_disasm(sf->current_pc, NULL, 0xffffffff, 2); |
| 4005 | #endif |
| 4006 | memcpy(regs.regs, sregs, sizeof(uae_u32) * 16); |
| 4007 | console_out_f(_T("\n")); |
| 4008 | } |
| 4009 | return true; |
| 4010 | } |
| 4011 | |
| 4012 | bool debugmem_illg(uae_u16 opcode) |
| 4013 | { |
no test coverage detected