From 8f4da5b653f91eaca82f02565a9932ae0ef371f8 Mon Sep 17 00:00:00 2001 From: "SND\\edgbla_cp" Date: Fri, 6 May 2011 09:34:14 +0000 Subject: git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@66613 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- libpcsxcore/debug.c | 44 ++++++++++++++++++++++---------------------- libpcsxcore/debug.h | 2 +- libpcsxcore/psxmem.c | 12 ++++++------ 3 files changed, 29 insertions(+), 29 deletions(-) (limited to 'libpcsxcore') diff --git a/libpcsxcore/debug.c b/libpcsxcore/debug.c index 179e3340..08abd41f 100644 --- a/libpcsxcore/debug.c +++ b/libpcsxcore/debug.c @@ -193,7 +193,7 @@ Basic commands acknowledge (2xx): Execution flow control commands acknowledge (4xx): ------------------------------------------------- 400 @
- - Displays a breakpoint, where 'type' can be of E, R1, R2, R4, W1, W2 or W4. + Displays a breakpoint, where 'type' can be of BE, BR1, BR2, BR4, BW1, BW2 or BW4. 401 Breakpoint deleting acknowledge. 410, 420, 421, 422, 430, 431, 432 @@ -389,7 +389,7 @@ void ProcessDebug() { } } if (!paused) { - DebugCheckBP(psxRegs.pc, E); + DebugCheckBP(psxRegs.pc, BE); } if (mapping_e) { MarkMap(psxRegs.pc, MAP_EXEC); @@ -951,7 +951,7 @@ static void ProcessCommands() { // sprintf(reply, "531 Invalid address %08X\r\n", address); // break; // } - code = add_breakpoint(E, address); + code = add_breakpoint(BE, address); sprintf(reply, "410 %X\r\n", code); break; case 0x320: @@ -963,7 +963,7 @@ static void ProcessCommands() { sprintf(reply, "532 Invalid address %08X\r\n", address); break; } - code = add_breakpoint(R1, address); + code = add_breakpoint(BR1, address); sprintf(reply, "420 %X\r\n", code); break; case 0x321: @@ -975,7 +975,7 @@ static void ProcessCommands() { sprintf(reply, "532 Invalid address %08X\r\n", address); break; } - code = add_breakpoint(R2, address); + code = add_breakpoint(BR2, address); sprintf(reply, "421 %X\r\n", code); break; case 0x322: @@ -987,7 +987,7 @@ static void ProcessCommands() { sprintf(reply, "532 Invalid address %08X\r\n", address); break; } - code = add_breakpoint(R4, address); + code = add_breakpoint(BR4, address); sprintf(reply, "422 %X\r\n", code); break; case 0x330: @@ -999,7 +999,7 @@ static void ProcessCommands() { sprintf(reply, "533 Invalid address %08X\r\n", address); break; } - code = add_breakpoint(W1, address); + code = add_breakpoint(BW1, address); sprintf(reply, "430 %X\r\n", code); break; case 0x331: @@ -1011,7 +1011,7 @@ static void ProcessCommands() { sprintf(reply, "533 Invalid address %08X\r\n", address); break; } - code = add_breakpoint(W2, address); + code = add_breakpoint(BW2, address); sprintf(reply, "431 %X\r\n", code); break; case 0x332: @@ -1023,7 +1023,7 @@ static void ProcessCommands() { sprintf(reply, "533 Invalid address %08X\r\n", address); break; } - code = add_breakpoint(W4, address); + code = add_breakpoint(BW4, address); sprintf(reply, "432 %X\r\n", code); break; case 0x390: @@ -1087,59 +1087,59 @@ void DebugCheckBP(u32 address, enum breakpoint_types type) { return; } } - if (breakmp_e && type == E) { + if (breakmp_e && type == BE) { if (!IsMapMarked(address, MAP_EXEC)) { sprintf(reply, "010 %08X@%08X\r\n", address, psxRegs.pc); WriteSocket(reply, strlen(reply)); paused = 1; } } - if (breakmp_r8 && type == R1) { + if (breakmp_r8 && type == BR1) { if (!IsMapMarked(address, MAP_R8)) { sprintf(reply, "011 %08X@%08X\r\n", address, psxRegs.pc); WriteSocket(reply, strlen(reply)); paused = 1; } } - if (breakmp_r16 && type == R2) { + if (breakmp_r16 && type == BR2) { if (!IsMapMarked(address, MAP_R16)) { sprintf(reply, "012 %08X@%08X\r\n", address, psxRegs.pc); WriteSocket(reply, strlen(reply)); paused = 1; } } - if (breakmp_r32 && type == R4) { + if (breakmp_r32 && type == BR4) { if (!IsMapMarked(address, MAP_R32)) { sprintf(reply, "013 %08X@%08X\r\n", address, psxRegs.pc); WriteSocket(reply, strlen(reply)); paused = 1; } } - if (breakmp_w8 && type == W1) { + if (breakmp_w8 && type == BW1) { if (!IsMapMarked(address, MAP_W8)) { sprintf(reply, "014 %08X@%08X\r\n", address, psxRegs.pc); WriteSocket(reply, strlen(reply)); paused = 1; } } - if (breakmp_w16 && type == W2) { + if (breakmp_w16 && type == BW2) { if (!IsMapMarked(address, MAP_W16)) { sprintf(reply, "015 %08X@%08X\r\n", address, psxRegs.pc); WriteSocket(reply, strlen(reply)); paused = 1; } } - if (breakmp_w32 && type == W4) { + if (breakmp_w32 && type == BW4) { if (!IsMapMarked(address, MAP_W32)) { sprintf(reply, "016 %08X@%08X\r\n", address, psxRegs.pc); WriteSocket(reply, strlen(reply)); paused = 1; } } - if (mapping_r8 && type == R1) MarkMap(address, MAP_R8); - if (mapping_r16 && type == R2) MarkMap(address, MAP_R16); - if (mapping_r32 && type == R4) MarkMap(address, MAP_R32); - if (mapping_w8 && type == W1) MarkMap(address, MAP_W8); - if (mapping_w16 && type == W2) MarkMap(address, MAP_W16); - if (mapping_w32 && type == W4) MarkMap(address, MAP_W32); + if (mapping_r8 && type == BR1) MarkMap(address, MAP_R8); + if (mapping_r16 && type == BR2) MarkMap(address, MAP_R16); + if (mapping_r32 && type == BR4) MarkMap(address, MAP_R32); + if (mapping_w8 && type == BW1) MarkMap(address, MAP_W8); + if (mapping_w16 && type == BW2) MarkMap(address, MAP_W16); + if (mapping_w32 && type == BW4) MarkMap(address, MAP_W32); } diff --git a/libpcsxcore/debug.h b/libpcsxcore/debug.h index 5c5336d4..fc906a8e 100644 --- a/libpcsxcore/debug.h +++ b/libpcsxcore/debug.h @@ -25,7 +25,7 @@ extern "C" { #endif enum breakpoint_types { - E, R1, R2, R4, W1, W2, W4 + BE, BR1, BR2, BR4, BW1, BW2, BW4 }; void StartDebugger(); diff --git a/libpcsxcore/psxmem.c b/libpcsxcore/psxmem.c index f306b3a8..6e615cfe 100644 --- a/libpcsxcore/psxmem.c +++ b/libpcsxcore/psxmem.c @@ -157,7 +157,7 @@ u8 psxMemRead8(u32 mem) { p = (char *)(psxMemRLUT[t]); if (p != NULL) { if (Config.Debug) - DebugCheckBP((mem & 0xffffff) | 0x80000000, R1); + DebugCheckBP((mem & 0xffffff) | 0x80000000, BR1); return *(u8 *)(p + (mem & 0xffff)); } else { #ifdef PSXMEM_LOG @@ -186,7 +186,7 @@ u16 psxMemRead16(u32 mem) { p = (char *)(psxMemRLUT[t]); if (p != NULL) { if (Config.Debug) - DebugCheckBP((mem & 0xffffff) | 0x80000000, R2); + DebugCheckBP((mem & 0xffffff) | 0x80000000, BR2); return SWAPu16(*(u16 *)(p + (mem & 0xffff))); } else { #ifdef PSXMEM_LOG @@ -215,7 +215,7 @@ u32 psxMemRead32(u32 mem) { p = (char *)(psxMemRLUT[t]); if (p != NULL) { if (Config.Debug) - DebugCheckBP((mem & 0xffffff) | 0x80000000, R4); + DebugCheckBP((mem & 0xffffff) | 0x80000000, BR4); return SWAPu32(*(u32 *)(p + (mem & 0xffff))); } else { #ifdef PSXMEM_LOG @@ -244,7 +244,7 @@ void psxMemWrite8(u32 mem, u8 value) { p = (char *)(psxMemWLUT[t]); if (p != NULL) { if (Config.Debug) - DebugCheckBP((mem & 0xffffff) | 0x80000000, W1); + DebugCheckBP((mem & 0xffffff) | 0x80000000, BW1); *(u8 *)(p + (mem & 0xffff)) = value; #ifdef PSXREC psxCpu->Clear((mem & (~3)), 1); @@ -275,7 +275,7 @@ void psxMemWrite16(u32 mem, u16 value) { p = (char *)(psxMemWLUT[t]); if (p != NULL) { if (Config.Debug) - DebugCheckBP((mem & 0xffffff) | 0x80000000, W2); + DebugCheckBP((mem & 0xffffff) | 0x80000000, BW2); *(u16 *)(p + (mem & 0xffff)) = SWAPu16(value); #ifdef PSXREC psxCpu->Clear((mem & (~3)), 1); @@ -307,7 +307,7 @@ void psxMemWrite32(u32 mem, u32 value) { p = (char *)(psxMemWLUT[t]); if (p != NULL) { if (Config.Debug) - DebugCheckBP((mem & 0xffffff) | 0x80000000, W4); + DebugCheckBP((mem & 0xffffff) | 0x80000000, BW4); *(u32 *)(p + (mem & 0xffff)) = SWAPu32(value); #ifdef PSXREC psxCpu->Clear(mem, 1); -- cgit v1.2.3