Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Conditional breakpoints
Re: Conditional breakpoints [message #30559 is a reply to message #30119] |
Sat, 08 January 2011 13:50 |
|
mirek
Messages: 13984 Registered: November 2005
|
Ultimate Member |
|
|
dolik.rce wrote on Thu, 09 December 2010 14:42 | Hi everyone,
Today, I finally got angry enough to start implementing one of the features I seriously miss in theide: conditional breakpoints. I guess most of you knows the frustration when you know that the bug is probably in the last iteration of 1000 cycles loop and you just can't tell the debugger to stop when i=999
So I started digging into the code and to my great surprise, I found out that the code is already there, just commented out! Mirek, why are you hiding such a powerful feature from us?!
Then I tried to uncomment it (ide/idebar.cpp:480) to see if it really works... well it didn't but the fix is actually trivial, just change Gdb::SetBreakpoint() in Gdb.cpp to:bool Gdb::SetBreakpoint(const String& filename, int line, const String& bp)
{
String bi = Bpoint(*host, filename, line);
if(bp.IsEmpty())
FastCmd("clear " + bi);
else if(bp[0]==0xe)
FastCmd("b " + bi);
else
FastCmd("b " + bi + " if " + bp);
return true;
}
Now the conditional breakpoints work perfectly (with gdb). I am not sure what will happen with MSVC installs (I don't have any to test - help wanted ), but I believe it will just ignore the condition, so it should not cause any trouble. If anyone decides to fix this for windows users too I can just point you to this page where you can find some possibly usefull info about msdev syntax.
Is it OK to commit this in current state? Or should I wait till someone writes the M$ part?
Best regards,
Honza
|
Please commit.
I do not remember the exact issue why it is commented out...
Mirek
|
|
|
Goto Forum:
Current Time: Wed Jun 05 09:23:32 CEST 2024
Total time taken to generate the page: 0.01907 seconds
|