How to use debugger?
Posted: Wed Jun 02, 2010 11:09 am
I was wondering if there is a good tutorial available somewhere that describes how you can use the gdb and insight debugging tools?
As those are also used for Android development, most google hits refer to using it for that.
I have a little experience in embedded programming and I know that usually debugging on such architecture hardly works.
I hope I am not getting off topic now.
The desmume emulator seems to have a gdbstub that makes it possible to control it from gdb and insight.
I had to return to version 0.7.2 before I finally could execute some arm7 code and make it stop at my breakpoint.
I compiled the 0.9.1 with the gdb stubs enabled, and it seems to work as well. The 0.9.4 and all later versions don't work anymore. If I press "C" (continue) in the gdb window, it never stops at it's breakpoint.
I know you will flame me and say that it's "off topic" as it's likely a desmume bug.
I agree with that, but haven't found an alternative so far.
I post the details so that others following the same path know what they can expect.
I assume I am not the only one running into those issues struggling with my first homebrew, which is why I am posting here.
Basically, these are the steps I am following.
Start desmume with the command line options --arm7gdb=1000 and --arm9gdb=1001
Load the nds file in desmume the normal way
Start arm-eabi-gdb and run the following commands:
target remote 127.0.0.1:1000
file c:/loader/arm7/loader.arm7.elf (The arm 7 part of the nds file)
b main.c:50 (the line number where the arm 7 main function starts.
c (continue)
After the break appearing in gdb, I can step trough the code using the s command.
I am testing with GDB instead of insight as it is a bit more basic.
I assume I can generate a similar more user friendly behavour with the arm-eabi-insight.
Thanks in advance for those willing to answer.
As those are also used for Android development, most google hits refer to using it for that.
I have a little experience in embedded programming and I know that usually debugging on such architecture hardly works.
I hope I am not getting off topic now.
The desmume emulator seems to have a gdbstub that makes it possible to control it from gdb and insight.
I had to return to version 0.7.2 before I finally could execute some arm7 code and make it stop at my breakpoint.
I compiled the 0.9.1 with the gdb stubs enabled, and it seems to work as well. The 0.9.4 and all later versions don't work anymore. If I press "C" (continue) in the gdb window, it never stops at it's breakpoint.
I know you will flame me and say that it's "off topic" as it's likely a desmume bug.
I agree with that, but haven't found an alternative so far.
I post the details so that others following the same path know what they can expect.
I assume I am not the only one running into those issues struggling with my first homebrew, which is why I am posting here.
Basically, these are the steps I am following.
Start desmume with the command line options --arm7gdb=1000 and --arm9gdb=1001
Load the nds file in desmume the normal way
Start arm-eabi-gdb and run the following commands:
target remote 127.0.0.1:1000
file c:/loader/arm7/loader.arm7.elf (The arm 7 part of the nds file)
b main.c:50 (the line number where the arm 7 main function starts.
c (continue)
After the break appearing in gdb, I can step trough the code using the s command.
I am testing with GDB instead of insight as it is a bit more basic.
I assume I can generate a similar more user friendly behavour with the arm-eabi-insight.
Thanks in advance for those willing to answer.