--- uae/src/debug.c 2018/04/24 17:10:43 1.1.1.11 +++ uae/src/debug.c 2018/04/24 17:16:29 1.1.1.13 @@ -13,7 +13,6 @@ #include #include -#include "config.h" #include "options.h" #include "threaddep/thread.h" #include "uae.h" @@ -152,7 +151,7 @@ static uae_u32 readint (char **c) return readhex (c); } if (**c == '0' && toupper((*c)[1]) == 'X') { - (*c)+= 2; + (*c)+= 2; return readhex (c); } if (**c == '-') @@ -248,7 +247,7 @@ static void foundmod (uae_u32 ptr, char ptr2 += 0x2A; for (i = 0; i < 31; i++, ptr2 += 30) length += 2*((ptr2[0]<<8)+ptr2[1]); - + console_out ("Name \"%s\", Length 0x%lx bytes.\n", name, length); } @@ -414,7 +413,7 @@ static uaecptr decode_copperlist (FILE* } return address; /* You may wonder why I don't stop this at the end of the copperlist? - * Well, often nice things are hidden at the end and it is debatable the actual + * Well, often nice things are hidden at the end and it is debatable the actual * values that mean the end of the copperlist */ } @@ -458,7 +457,7 @@ static void cheatsearch (char **c) } else { for (count = 0; count<255; count++) { if (p[vlist[count]+3] == (val & 0xff) - && p[vlist[count]+2] == (val>>8 & 0xff) + && p[vlist[count]+2] == (val>>8 & 0xff) && p[vlist[count]+1] == (val>>16 & 0xff) && p[vlist[count]] == (val>>24 & 0xff)) { @@ -563,15 +562,15 @@ static void illg_debug_do (uaecptr addr, else write_log ("RW: %08.8X %c PC=%08.8X\n", ad, rws, pc); if (illgdebug_break) - activate_debugger (); + activate_debugger (); } else if ((mask & 1) && rw) { write_log ("RO: %08.8X=%02.2X %c PC=%08.8X\n", ad, v, rws, pc); if (illgdebug_break) - activate_debugger (); + activate_debugger (); } else if ((mask & 2) && !rw) { write_log ("WO: %08.8X %c PC=%08.8X\n", ad, rws, pc); if (illgdebug_break) - activate_debugger (); + activate_debugger (); } } } @@ -608,7 +607,7 @@ static void memwatch_func (uaecptr addr, brk = 1; if (brk && mwnodes[i].modval_written) { if (!rw) { - brk = 0; + brk = 0; } else if (mwnodes[i].modval_written == 1) { mwnodes[i].modval_written = 2; mwnodes[i].modval = val; @@ -661,19 +660,19 @@ static void REGPARAM2 debug_lput (uaecpt int off = debug_mem_off (addr); memwatch_func (addr, 1, 4, v); debug_mem_banks[off]->lput(addr, v); -} +} static void REGPARAM2 debug_wput (uaecptr addr, uae_u32 v) { int off = debug_mem_off (addr); memwatch_func (addr, 1, 2, v); debug_mem_banks[off]->wput(addr, v); -} +} static void REGPARAM2 debug_bput (uaecptr addr, uae_u32 v) { int off = debug_mem_off (addr); memwatch_func (addr, 1, 1, v); debug_mem_banks[off]->bput(addr, v); -} +} static int REGPARAM2 debug_check (uaecptr addr, uae_u32 size) { return debug_mem_banks[munge24 (addr) >> 16]->check (addr, size); @@ -932,7 +931,7 @@ static int instruction_breakpoint (char console_out ("No breakpoints\n"); else console_out ("\n"); - return 0; + return 0; } skipaddr_doskip = 1; skipaddr_start = readhex (c); @@ -956,15 +955,15 @@ static int instruction_breakpoint (char bpn->addr = skipaddr_start; bpn->enabled = 1; console_out ("Breakpoint added\n"); - skipaddr_start = 0xffffffff; - skipaddr_doskip = 0; + skipaddr_start = 0xffffffff; + skipaddr_doskip = 0; break; } return 0; } } if (skipaddr_start == 0xC0DEDBAD) { - trace_same_insn_count = 0; + trace_same_insn_count = 0; logfile = fopen ("uae.trace", "w"); memcpy (trace_insn_copy, regs.pc_p, 10); memcpy (&trace_prev_regs, ®s, sizeof regs); @@ -1104,13 +1103,13 @@ static void searchmem (char **cc) if (!got) console_out ("nothing found"); console_out ("\n"); -} +} static void m68k_modify (char **inptr) { char c1, c2; uae_u32 v; - + c1 = toupper (next_char (inptr)); if (!more_params (inptr)) return; @@ -1142,7 +1141,7 @@ static void debug_1 (void) console_out (">"); console_flush (); - if (!console_get (input, 80)) + if (!console_get (input, 80)) continue; inptr = input; cmd = next_char (&inptr); @@ -1155,7 +1154,7 @@ static void debug_1 (void) m68k_dumpstate (stdout, &nextpc); break; case 'M': modulesearch (); break; - case 'C': cheatsearch (&inptr); break; + case 'C': cheatsearch (&inptr); break; case 'W': writeintomem (&inptr); break; case 'w': memwatch (&inptr); break; case 'S': savemem (&inptr); break; @@ -1265,11 +1264,11 @@ static void debug_1 (void) { uae_u32 maddr; int lines; - + if (more_params(&inptr)) { maddr = readhex(&inptr); if (maddr == 1 || maddr == 2) - maddr = get_copper_address (maddr); + maddr = get_copper_address (maddr); } else maddr = nxcopper; @@ -1334,7 +1333,7 @@ void debug (void) int bp = 0; for (i = 0; i < BREAKPOINT_TOTAL; i++) { - if (!bpnodes[i].enabled) + if (!bpnodes[i].enabled) continue; if (bpnodes[i].addr == pc) { bp = 1; @@ -1362,12 +1361,12 @@ void debug (void) } } if (!bp) { - set_special (SPCFLAG_BRK); + set_special (SPCFLAG_BRK); return; } } } else { - write_log ("Memwatch %d: break at %08.8X.%c %c %08.8X\n", memwatch_triggered - 1, mwhit.addr, + write_log ("Memwatch %d: break at %08.8X.%c %c %08.8X\n", memwatch_triggered - 1, mwhit.addr, mwhit.size == 1 ? 'B' : (mwhit.size == 2 ? 'W' : 'L'), mwhit.rw ? 'W' : 'R', mwhit.val); memwatch_triggered = 0; } @@ -1405,7 +1404,7 @@ void debug (void) do_skip = 1; } if (do_skip) { - set_special (SPCFLAG_BRK); + set_special (SPCFLAG_BRK); debugging = 1; } #if 0