Oct 6

Searching the web how to restart an application on a remote target does not provide any clue how to do this. I found one link to another debugger that acts as a wrapper around gbd, it is called DDD. The benifit of this debugger is that it is less integrated meaning it shows a terminal with gdb running, pressing the buttons basicly types the command linked to the button in the terminal and executes it. Any feedback from gdb is shown (of course) in the terminal.

Open a terminal, change to the location that holds the HelloWord application and enter the command ddd –debugger /usr/local/gdb-cris/gdb-cris, this will start ddd using gdb-cris as the debugger. Use the File | Open Program option to load the HelloWorld application. This will open main.c in the source window.

In a second terminal, start a secure shell terminal to the FB. In the folder containg the HelloWorld application, enter the command gdbserver :1234 Hello_World. I figured out that the IP address of the remote PC that will be used for the debugging is not needed, so less typing.

In the bottom terminal window of ddd type the command target remote FOXBoard:1234 as you would do with the bare version of gdb. The FB will respond with a “Remote debugging from host xxx” indicating the connection has been made.

Any button you now press results in a command being send to gdbserver. For example, click on the first line of the program and press the STOP icon. This sends the command break “something”, as a result this tool can be used to quickly learn the basic gdb commands.

In the File menu, there is a restart option. Pressing this button actually restarts ddd….

Reloading the Hello_World application results in the same killing of gdbserver. After another 30 minutes of tying I give up, the only way to restart the application is indeed killing the current version of gdbserver, start it again and reload the executable.

Although ddd shows the commands send to gdb and allows manual intervention I still like the look and feel of Kdbg so that will be my main debugger. From time to time I might use ddd or even gdb-cris directly if it is not clear what goes on or if special commands must be given.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.