Author Topic: GDB breakpoint cannot be cleared  (Read 4568 times)

Offline Bonanza

  • Multiple posting newcomer
  • *
  • Posts: 34
  • Engineer
GDB breakpoint cannot be cleared
« on: September 13, 2008, 12:50:59 am »
Hi

I have an issue with the GDB handler.

I have a workspace with a GUI application and several dlls.

The DLLs are loaded runtime by the GUI.

When I set a breakpoint in a dll and executes the exe file the program stops at the breakpoint but if I delete the breakpoint no GDB command is sent from codeblock and if I press continue GDB continues to stop at this breakpoint. If I delete the breakpoint by the GDB user command it is deleted as expected.

I am using winxp and mingw.

There is a warning at start of the program that the breakpoint could not be set because the dll is not loaded.

Hope someone can help me because this is an everyday annoyance.

Let me also expres how much joy I find in using codeblocks as my favorite IDE and RAD.
Thanks in advance Flemming
« Last Edit: September 13, 2008, 07:11:58 am by Bonanza »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: GDB breakpoint cannot be cleared
« Reply #1 on: September 13, 2008, 09:53:19 am »
That happens because these are so called pending breakpoints.
I have a patch for this that works on my copy of C::B without errors since a couple of weeks.

The only problem is that you cannot securely set a conditional bp in that case, because gdb can only test the condition if the bp is really set, that means the library is loadced.
If that does not work, because the condition is faulty, I am not able to catch the answer on win[2k] (on linux it works fine). It is a problem with parsing the output of gdb.

So the only solution at the moment would be to make it either platform-specific (if a condition can be defined) or to allow setting the condition only if the bp was hit the first time.

I was quite busy on work the last weeks, so I could not spend so much time in it.

Nevertheless the main part (setting and clearing) of pending bp's works (at least with gdb > 6.7.50, can not test older versions) .

Offline Bonanza

  • Multiple posting newcomer
  • *
  • Posts: 34
  • Engineer
Re: GDB breakpoint cannot be cleared
« Reply #2 on: September 13, 2008, 09:38:21 pm »
Thanks Jens,

That sounds exactly like the issue:-)

Could I by any chance have the patch preferable in a binary form, as I am not building CodeBlocks or any of its sub component myself?

I am not sure I fully understand the platform dependency thing and off course as you probably already know there should be defines to determine which platform you are build for.

Best regards Flemming