User forums > Using Code::Blocks
"Break Debugger" button has never worked.
ollydbg:
--- Code: ---[debug]Code::Blocks is trying to interrupt process with pid: 17436; child pid: 0 gdb pid: 17436
[debug]Code::Blocks is trying to interrupt process with pid: 17436; child pid: 0 gdb pid: 17436
[debug]Code::Blocks is trying to interrupt process with pid: 17436; child pid: 0 gdb pid: 17436
[debug]Quit
Child process PID: 17444
[debug][New Thread 0xb032ab40 (LWP 17444)]
[debug][Thread 0xb032ab40 (LWP 17444) exited]
[debug][New Thread 0xb032ab40 (LWP 17445)]
--- End code ---
Look, the true pid value (17444 or 17445) returned AFTER you hit the stop button, this is mostly because your program log out too many messages, which make the parser for C::B debugger parser wrong.
zeroth:
I'm not following... You're saying that my printf()s are causing CB to parse GDB's output incorrectly? I'm no sure what "new thread" is for, my program is not multithreaded, unless a dependency is (maybe SDL)
ollydbg:
--- Quote from: zeroth on December 10, 2013, 06:55:18 am ---I'm not following... You're saying that my printf()s are causing CB to parse GDB's output incorrectly? I'm no sure what "new thread" is for, my program is not multithreaded, unless a dependency is (maybe SDL)
--- End quote ---
I'm not a Linux user, so what I said is my guess(which may be wrong)
Basically, C::B need to parse the response message from GDB to get the correct inferior(debugee) pid.
For example, when you start debugging and running the inferior(debugee), GDB will report some message like:
--- Code: ---[New Thread 0xb032ab40 (LWP 17444)]
--- End code ---
Then, in C::B, if it get parsed, it know the inferior pid, in the above case, it is 17444.
Now, when you want to pause the inferior, there is a function call like "Break(17444)", this will halt your inferior(debugee).
Apparently, in the log messages showed, C::B has failed to catch the inferior pid, so it can't halt the inferior.
You can try to create a simple hello world application, and test again to see whether it works. I guess the log messages from your app have affect on the C::B debugger parser.
zeroth:
Well, I can't create a new project because.. uh, well... that's another problem - I can't make a new project: http://img689.imageshack.us/img689/8692/j72h.png
So I removed all the printf()s and the problem persists. I can't imagine the CB team would code the interactions between CB and GDB in such a rinky-dink manner as to just interpret GDB screen output, so it seems they didn't anyway.
Any more ideas?
oBFusCATed:
--- Quote from: ollydbg on December 10, 2013, 07:06:34 am ---I guess the log messages from your app have affect on the C::B debugger parser.
--- End quote ---
I don't see the pid in the log, sometimes this happen, because no thread is started and gdb fails to print the pid.
I have to do something about this, but I'll see I find some time.
--- Quote from: zeroth on December 12, 2013, 02:01:24 am ---I can't imagine the CB team would code the interactions between CB and GDB in such a rinky-dink manner as to just interpret GDB screen output, so it seems they didn't anyway.
--- End quote ---
Unfortunately this is how it works...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version