$NetBSD: patch-af,v 1.2 2012/03/29 20:32:34 wiz Exp $ --- src/sdl/debugger.cpp.orig 2004-05-13 14:13:14.000000000 +0000 +++ src/sdl/debugger.cpp @@ -950,9 +950,9 @@ void debuggerBreakOnWrite(u32 *mem, u32 { u32 address = 0; if(mem >= (u32*)&workRAM[0] && mem <= (u32*)&workRAM[0x3ffff]) - address = 0x2000000 + ((u32)mem - (u32)&workRAM[0]); + address = 0x2000000 + (u32)((u8 *)mem - &workRAM[0]); else - address = 0x3000000 + ((u32)mem - (u32)&internalRAM[0]); + address = 0x3000000 + (u32)((u8 *)mem - &internalRAM[0]); if(size == 2) printf("Breakpoint (on write) address %08x old:%08x new:%08x\n", @@ -1280,7 +1280,7 @@ void debuggerMemoryByte(int n, char **ar if(n == 2) { u32 addr = 0; sscanf(args[1], "%x", &addr); - for(int i = 0; i < 16; i++) { + for(int s = 0; s < 16; s++) { int a = debuggerReadByte(addr); int b = debuggerReadByte(addr+1); int c = debuggerReadByte(addr+2); @@ -1316,7 +1316,7 @@ void debuggerMemoryHalfWord(int n, char u32 addr = 0; sscanf(args[1], "%x", &addr); addr = addr & 0xfffffffe; - for(int i = 0; i < 16; i++) { + for(int s = 0; s < 16; s++) { int a = debuggerReadByte(addr); int b = debuggerReadByte(addr+1); int c = debuggerReadByte(addr+2); @@ -1352,7 +1352,7 @@ void debuggerMemory(int n, char **args) u32 addr = 0; sscanf(args[1], "%x", &addr); addr = addr & 0xfffffffc; - for(int i = 0; i < 16; i++) { + for(int s = 0; s < 16; s++) { int a = debuggerReadByte(addr); int b = debuggerReadByte(addr+1); int c = debuggerReadByte(addr+2);