User forums > Embedded development
Stopping GDB
(1/1)
martind:
Hi,
I have been working on OpenOCD support within codeblocks, by hacking the debugger plugin somewhat.
I can now debug my ARM targets fine within OpenOCD.
However, if I let GDB run the program, I having trouble halting GDB without terminating it.
The way to do it seems to be sending a SIGINT to GDB. (Or ctrl-C from terminal). Have been not had any luck with this method, as GDB seems to ignore my ctrl-C.
The only method I have seen that somebody else has done is using OpenProcess and CreateRemoteThread to inject a function into GDB's process space which executes a ctrl-C. However, this seems to end GDB.
The other way I could do it is to telnet to OpenOCD and issue a halt. This would break GDB's execution.
Although not overly keen on this because my version of the IDE could run GDB in simulation mode, with no remote target.
Any ideas?
Martin.
deadneurons:
maybe you can get info here http://www.joernonline.de/dw/doku.php?id=projects:oocdlink:2_oocdlinks.
he seems to have made his own jtag hardware tho. The guy uses CB too.
..just trying to help.
joern:
Hi Martin,
I'm "the guy" which deadneurons mentioned.
--- Quote from: martind on December 08, 2007, 03:11:49 am ---I have been working on OpenOCD support within codeblocks, by hacking the debugger plugin somewhat.
--- End quote ---
I use the standard plugin which is includes in CB. After modifing my GDB init code for my SAM7 (ARM7) micro, debugging currenty works very well at the moment. Which very of CB do u use?
regards,
Joern
martind:
Hi Joern / deadneurons.
Thanks for your replies.
Yes I have had codeblocks working with the way you have explained. However my aim was to make this a little more integrated.
For instance, automatic start/stop of OpenOCD, user selection of JTAG device connected to OpenOCD, and eventually some peripheral windows.
Just out of interest, using your method, what happens if you let the target run and you click stop within codeblocks? From my tests, it does not do anything.
Because codeblocks was designed to debug programs running on the same platform (windows / linux etc...), in windows, the way in which the target program was paused was by issuing a special windows call (windowsbreakproc) or something like that to signal to GDB to halt. But not exit.
However the only way I can do this at the moment is to telnet to OpenOCD and issue a halt instruction.
I am developing with version SVN4067.
Regards,
Martin.
Navigation
[0] Message Index
Go to full version