Author Topic: Debugging using arm-elf-gdb  (Read 6898 times)

Offline starkeeper

  • Multiple posting newcomer
  • *
  • Posts: 15
Debugging using arm-elf-gdb
« on: June 28, 2007, 09:52:23 am »
Hi,
I work with CodeBlocks and GNUARM using arm-elf-gdb to debug a remote target.

First thing is that the arm-elf-gdb does not support the "run" command. I can suppress the auto-run in the options, but I can not change the commands sent by the debug buttons in the menu.

Problem is, that I have to press the start-button to let codeblocks connect with gdb. But, then the button function changes to "run" and that will crash arm-elf-gdb on every hit.

To debug I have to use the following procedure:
1. Hit Start, to connect with gdb
2. a automatic breakpoint is set at main-function
3. select 'send debug command'
4. enter "continue"
5. target is running

This procedure is really painful, also because on every breakpoint I have to take the way thru the menu to enter "continue"...
The next thing is that I can not stop the target! Everytime I hit the stop button, my gdb closes. There must be an stop command or anything like this in arm-elf- gdb, because the arm-elf-insight debugger can interrupt a running process.

Another annoying thing is the warning that the debugger is running, if I try to compile. It would be great to just end the debugger instead of viewing a message box. Also the debugger can run while the compilation, it just has to stop the target. And after compilation, CodeBlocks could send a "monitor reset" command and a "load" command. There is no need to reestablish the connection, to gdb, after each build.

So my simple question, how can I adjsust the button functions for debugging with arm-elf? Or my extended question: Will there be a better debugging support for arm-elf-gdb?


Offline lizhuoyi

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Debugging using arm-elf-gdb
« Reply #1 on: July 03, 2007, 03:36:38 am »
I have same problem with avr-gdb :(

mariocup

  • Guest
Re: Debugging using arm-elf-gdb
« Reply #2 on: July 03, 2007, 09:40:24 am »
Hi,

there are two possibilities to solve the problem:

1. Configure an external debugger e.g. arm-elf-insight instead of the arm-elf-gdb in the settings of toolchain executables. The start button will launch insight with your executable.
2. Send a interrupt command (like Ctrl+C in the gdb console) with the MI interface to the debugger with the menu debug->send user command to debugger. See the gdb docu for details.

Bye,

Mario

Offline starkeeper

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: Debugging using arm-elf-gdb
« Reply #3 on: July 03, 2007, 06:36:10 pm »
Hi,

there are two possibilities to solve the problem:

1. Configure an external debugger e.g. arm-elf-insight instead of the arm-elf-gdb in the settings of toolchain executables. The start button will launch insight with your executable.
2. Send a interrupt command (like Ctrl+C in the gdb console) with the MI interface to the debugger with the menu debug->send user command to debugger. See the gdb docu for details.

Bye,

Mario

Both options are not really usable..
1. I know that there are other debuggers, that work without restrictions. And there are also other IDE's that work with arm-elf-gdb, e.g. eclipse so why should anybody develop CodeBlocks? ;-)

2. I'm not able to send a user command to the debugger while the debugger is currently running. The Menu-point is greyed out at this moment, so no chance to communicate with the debugger.