Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: eggw on May 04, 2019, 08:29:30 am

Title: Issue with debugger not stopping at breakpoints
Post by: eggw on May 04, 2019, 08:29:30 am
Hi. I'm using CB 17.12 on Windows 10.

I updated my compiler to the following MinGW distro: https://nuwen.net/mingw.html and also made sure to update the debugger executable path in settings->debugger to use the one included in the distro.

But now, when I try to debug, some weird behaviour is happening. If I set a breakpoint before I run the debugger, it will stop at that breakpoint. However, if I remove the breakpoint and press continue, then set another breakpoint, it won't stop at that breakpoint (or any other one I set after that).

Basically, it will stop at the breakpoints I set before running the debugger, but once it has ran out of breakpoints, it won't stop at any new breakpoints I set.

The weird thing is I can see that the debugger is trying to stop, but it won't give me any detailed error message (I've enabled the full debugging log from settings->debugger). This is all it says:

Code
Trying to interrupt process with pid: 5712; child pid: 5712 gdb pid: 4268
Continuing..

Does anyone have an idea what might be causing this and if it can be solved?

Regards
Title: Re: Issue with debugger not stopping at breakpoints
Post by: oBFusCATed on May 04, 2019, 09:49:05 am
Is your app 64bits? Or is gdb 64bits? What happens if you try the latest night build which is also 64bits?
Title: Re: Issue with debugger not stopping at breakpoints
Post by: eggw on May 04, 2019, 10:06:52 am
Quote
Is your app 64bits? Or is gdb 64bits? What happens if you try the latest night build which is also 64bits?

The compiler and all included tools, including gdb, is 64 bit, nice catch. I tried the latest nightly build and it worked, the debugger now stops at breakpoints as it should. Thank you so much!

Also, just a side question: as for my app being 64 bits, isn't that simply determined by whether the compiler I use is 32 or 64 bit?
Title: Re: Issue with debugger not stopping at breakpoints
Post by: oBFusCATed on May 04, 2019, 11:14:08 am
Also, just a side question: as for my app being 64 bits, isn't that simply determined by whether the compiler I use is 32 or 64 bit?
It depends on the compiler. Most compilers have a default mode it doesn't matter if the compiler binary is 32bit or 64bit. Some/most releases of GCC could build both variants. See how -m32 and -m64 switches work.