User forums > Embedded development

gdb break command

(1/4) > >>

Joerg:
need a gdb break command urgently!
to stop the program, not to stop debugging
I don't understand the usage of run and continue
in C::B,too.
Apart from that, remote debugging on ARM7
works not bad.  :)

Jenna:

--- Quote from: rekisum on June 09, 2008, 03:14:29 pm ---need a gdb break command urgently!
to stop the program, not to stop debugging

--- End quote ---

If you hit the stop-button (the red one with the white cross) once, the program should stop, not the debugging process.

In most cases you don't see the yellow triangle, because you are in a library without debugging symbols, but you can open the disassembly window, and in the Debugger Log you can see where you are.

You are now able to click (for example) "Step out" unless you are in code gdb can find the sources.
From this point you can debug as usual.

mariocup:
Hi rekisum,

the debug interrupt button works under linux. If you hit stop the program will be interrupted and if you press again stop the debugger will be stopped. This does not work for windows. If you want to interrupt the debug process under windows there is only the workaround to send an user command to the debugger


--- Code: ---interpreter-exec mi interrupt

--- End code ---

Bye,

Mario

Joerg:
Hi,

hitting the red button sends a 'quit' command to gdb.
I can see this in the Debugger (debug) window.

As I remotely debug my ARM7 I can see
Info: server.c:355 server_loop(): dropped 'gdb' connection in my OpenOCD info window.
(OpenOCD is a popular JTAG gdb server)

Mostly even that doesn't work and Codeblocks hangs with:
Trying to pause the running process...

I'm not able to send a user command when the debugger is running!?

What do you mean with 'the debug interrupt button works under linux' ?
I do remote debugging over JTAG with arm-elf-gdb / OpenOCD ..... under WinXP.

Bye

martind:
Hi Rekisum,

I had the same problem. I tried various methods of sending ctrl-C interrupts to GDB but was unsuccessful. I found some code on the net that even injected code into GDB's process space to try and issue ctrl-C via software but no luck.

How CodeBlocks gets around this for Windows app debugging is to DebugBreak the process being debugged.

I am currently working on a plugin with OpenOCD, and I establish a telnet connection with OpenOCD (wxSocketClient) and send the "halt" command. It's fairly easy to do, and I have code if you want it.

I would not have thought that the "interpreter-exec mi interrupt" command would work in this case, as GDB goes modal when you continue? (send command to debugger is greyed out).

Also, on the MI note, perhaps changing to MI in the long term for CodeBlocks?


Martin.


Navigation

[0] Message Index

[#] Next page

Go to full version