#113685 - MrK - Fri Dec 29, 2006 7:06 pm
Hi!
I'm using no$gba to debug. I have the following function to trigger a software breakpoint, which creates code to generate a mov r11,r11 and then return back to appBkp.
appBkp is always an ARM function
the thing is that it works on no$gba emulator (breaks into debugger), works on other emulators (but it's ignored), however in real hardware hangs the console. Any ideas? Maybe a cache problem?
TIA!
p.s. yes, I know I can do that function in assembler, however I'd like to get it done in C (appLog is giving me some other functions, and I don't feel like doing the %s %x %d replacement in assembler for a test app)
I'm using no$gba to debug. I have the following function to trigger a software breakpoint, which creates code to generate a mov r11,r11 and then return back to appBkp.
appBkp is always an ARM function
Code: |
char NOGBAcode[4096]; void appBkp (void) { char *ptr=NOGBAcode; // breakpoint mov r11,r11 *(int *)ptr=0xe1a0b00b; ptr+=4; // mov r11,r11 *(int *)ptr=0xe12fff1e; ptr+=4; // bx lr ((void (*)(void))NOGBAcode)(); // call code } |
the thing is that it works on no$gba emulator (breaks into debugger), works on other emulators (but it's ignored), however in real hardware hangs the console. Any ideas? Maybe a cache problem?
TIA!
p.s. yes, I know I can do that function in assembler, however I'd like to get it done in C (appLog is giving me some other functions, and I don't feel like doing the %s %x %d replacement in assembler for a test app)