Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Conditional breakpoints
Conditional breakpoints [message #30119] Thu, 09 December 2010 20:42 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

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 Smile

So I started digging into the code and to my great surprise, I found out that the code is already there, just commented out! Shocked Mirek, why are you hiding such a powerful feature from us?! Smile

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 Wink ), 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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Docking for ToolBars
Next Topic: Split window
Goto Forum:
  


Current Time: Sun Apr 28 19:05:09 CEST 2024

Total time taken to generate the page: 0.06323 seconds