User forums > Help
gdb with custom makefiles: unabled to interrupt while running
pasdVn:
Hey guys,
I'm new to your forum and have - what a suprise - a (small) question. I'm currently trying to use C::B as a confortable IDE for a quite big project, that supports the build with the GNU autotools at unix systems. I'm using the auto-generated Makefiles in C::B witch works quite good for now.
The problem is the Debugging process (using gdb): I can start debugging without problems. It is also possible to add breakpoints before starting the Debug-session or when you reached a breakpoint while debugging (so the programm is interrupted currently). What does NOT work is to interrupt the programm while it is running (via "Stop Debugger", the red button with the white cross :-P) and thus not adding any new breakpoints. So in fact it is the "Ctrl-C" what you would use to interrupt the running programm if you start a gdb debug-session at the bash.
I also tried to create an own hello-world programm with a custom makefile. For any reaso this worked perfectly when I tried to debug it via C::B.
Tried to find any hints in this forum, but was not sucessfully until now. Maybe anyone of you has an idea how I can make it work?
My system:
Ubuntu 10.10 (x86_64)
GNU gdb (GDB) 7.2-ubuntu
C::B 10.05 rev6282 (From Jens' deb-repo, a big thx for that, btw :-) )
oBFusCATed:
Try a nightly from the debuggers branch, this is the latest one: http://forums.codeblocks.org/index.php/topic,14207.0.html
I think there the problem should be fixed, if it is not please provide a minimal test case project.
pasdVn:
Thanks for your answer.
I just noticed, that I used a quite old version of c::b on my dektop-pc (the one, that shipps with the distribution, the nightly build was on another machine, where I did not try to debug this project). Nevertheless I tried the actual nightly build of the debug branch, but there occures the same problem: No "communication" to gdb, while it the programm is running.
I'll see what I can do to provide an example. As I mentioned it worked with a very small programm using custom makefiles. Also possible, that the problem is not connected to the custom makefiles, but to anything else :-/ Debugging from the shell via gdb works like a charm.
oBFusCATed:
So the pause button doesn't work?
Have you tried to interrupt hello world project with something like "while(1) sleep(1);" ?
pasdVn:
Also tried this now, but everything works fine with my hello-world.
I also tried to reproduce this behaviour of the big project by starting gdb from the console with all custom initialisation commands codeblocks uses (as they get printed in the "Debugger (debug)"-window), but in this case it is still possible to break with Ctrl-C.
Edit: Just treid to send the gdb-session (started via codeblocks) a SIGINT (via htop or similar). In this case it really gets interrupted an I can control gdb again out of the codeblocks IDE.
Navigation
[0] Message Index
[#] Next page
Go to full version