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

Function copper_debugger

src/debug.cpp:3514–3563  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3512}
3513
3514static int copper_debugger (TCHAR **c)
3515{
3516 static uaecptr nxcopper;
3517 uae_u32 maddr;
3518 int lines;
3519
3520 if (**c == 'd') {
3521 next_char (c);
3522 if (debug_copper)
3523 debug_copper = 0;
3524 else
3525 debug_copper = 1;
3526 init_record_copper();
3527 console_out_f (_T("Copper debugger %s.\n"), debug_copper ? _T("enabled") : _T("disabled"));
3528 } else if (**c == 't') {
3529 debug_copper = 1|2;
3530 return 1;
3531 } else if (**c == 'b') {
3532 (*c)++;
3533 debug_copper = 1|4;
3534 if (more_params (c)) {
3535 debug_copper_pc = readhex(c, NULL);
3536 console_out_f (_T("Copper breakpoint @0x%08x\n"), debug_copper_pc);
3537 } else {
3538 debug_copper &= ~4;
3539 }
3540 } else {
3541 if (more_params(c)) {
3542 maddr = readhex(c, NULL);
3543 if (maddr == 1 || maddr == 2 || maddr == 3)
3544 maddr = get_copper_address(maddr);
3545 else if (maddr == 0)
3546 maddr = get_copper_address(-1);
3547 } else {
3548 maddr = nxcopper;
3549 }
3550 selected_cop_set = curr_cop_set;
3551 if (!find_copper_records(maddr)) {
3552 selected_cop_set = curr_cop_set ^ 1;
3553 }
3554
3555 if (more_params(c))
3556 lines = readhex(c, NULL);
3557 else
3558 lines = 20;
3559
3560 nxcopper = decode_copperlist (stdout, maddr, lines);
3561 }
3562 return 0;
3563}
3564
3565#define MAX_CHEAT_VIEW 100
3566struct trainerstruct {

Callers 1

debug_lineFunction · 0.85

Calls 8

next_charFunction · 0.85
init_record_copperFunction · 0.85
more_paramsFunction · 0.85
readhexFunction · 0.85
get_copper_addressFunction · 0.85
find_copper_recordsFunction · 0.85
decode_copperlistFunction · 0.85
console_out_fFunction · 0.50

Tested by

no test coverage detected