User forums > Embedded development
gdb break command
Joerg:
Hi martin,
--- Quote ---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.
--- End quote ---
I will try to open a telnet console to OpenOCD.
If your plugin offers a new button sending a break it would be a nice workaround.
--- Quote ---Also, on the MI note, perhaps changing to MI in the long term for CodeBlocks?
--- End quote ---
Ah, thats interesting.
So Codeblocks doesn't use MI to talk with GDB like Eclipse does?
I don't like Eclipse but remote debugging with the plugin from Zylin works, after all.
How is Codeblocks talking to GDB, and is this the reason why the break command
is not supported under windows?
Joerg
martind:
Hi Joerg,
My plugin uses the existing halt button. The functionality of this button is if GDB is running, then pressing it will halt. If GDB has halted, pressing it will terminate debugging.
There are 3 messages that have been created for plugins:
cbEVT_DEBUGGER_STARTED
cbEVT_DEBUGGER_PAUSED
cbEVT_DEBUGGER_FINISHED
However, these do not appear to be implmented yet. I have modified debuggergdb.cpp to dispatch these 3 messages (would like to suggest method via patch soon). The plugin then picks this up and issues the "halt\r" command when it receives the paused message.
No MI interpreter is not used, the output of GDB is regex'd. Input is sent to GDB via console input stream. This means that when GDB is running, GDB is unresponsive to anything but signals (ctrl-C etc). That's why the break command does not work.
With MI, I believe the interpreter is running all the time? Havent used MI much so not an expert.
Eclipse is nice, but there are a few things that need changing. Adding / removing source files is my biggest bug-bear. Being Java is good for transparent cross platform, but slowish on older machines.
Martin.
Joerg:
sending halt via telnet works
a 'halt' button would be very nice
Hopefully waiting for your plugin ;-)
thomas:
--- Quote from: rekisum on June 10, 2008, 10:29:44 am ---Hi,
hitting the red button sends a 'quit' command to gdb.
I can see this in the Debugger (debug) window.
--- End quote ---
That's funny, because what I see is this:
Child process PID: 3520
Trying to pause the running process...
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Program received signal SIGTRAP, Trace/breakpoint trap.
In ntdll!DbgUiConnectToDbg () (C:\WINDOWS\system32\ntdll.dll)
Continuing...
Trying to pause the running process...
Program received signal SIGTRAP, Trace/breakpoint trap.
In ntdll!DbgUiConnectToDbg () (C:\WINDOWS\system32\ntdll.dll)
Maybe you're using a very old version, or you're hitting the wrong button?
martind:
Hi Thomas,
Is this when you are debugging a windows / linux native executable?
Martin.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version