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: Compiling, Linking, Debugging of your packages » A little experiment with smarter debugging
A little experiment with smarter debugging [message #23683] Fri, 13 November 2009 09:47
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
I find that String0::Dsyn is quite an ugly hack and it makes understanding string a lot harder, especially because of the macro juggling with _DEBUG and COMPILER_GCC in String and String0. I think this should be addressed by the debugger without bloating up String in debug mode, so I did a little experiment. I removed the "len" fields, and added this to ide/Debuggers/Visulize.cpp:

if (t.name == "Upp::String") {
		if(cm)
			result.Cat(", ");
		result.Cat("len");
		result.Cat("=", SColorMark);
		union {
			char   temp[16];
			dword  w[4];
		};
		if(!Copy(val.address, &temp, sizeof(temp)))
			result.Cat("\"Error\"", Green);
		int len = 0;
		if (temp[14] == 0)
			len = temp[15];
		else
			len = w[2];
		result.Cat(IntFormat(len), Cyan);
	}


This works well and can be adapted for "s" field. What is you opinion on making the debugger "understand" String? As far as I can tell there are just a few tricky classes like String, so the effort wouldn't be that great. The disadvantage is that outside TheIDE, people would have a harder time debugging strings, so maybe we could keep Dsyn, but only use it if Core is compiled with an option for that.
Previous Topic: Building with Windows 7 SDK (on Vista x64)
Next Topic: What is the .map (Create map file option) for?
Goto Forum:
  


Current Time: Thu Mar 28 11:34:29 CET 2024

Total time taken to generate the page: 0.01726 seconds