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 » Problems with debugging in TheIDE (mingw)
Problems with debugging in TheIDE (mingw) [message #11581] Tue, 18 September 2007 05:13 Go to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Hi,

Update:

ntdll!LdrDisableThreadCalloutsForDll() from C:\WINDOWS\system32\ntdll.dll

is all I get in the calllstack drop down when I try to debug my project.

Original....

I've often noticed problems with debugging in theIDE with mingw (don't know how to setup MSC8 - got VC express installed but it wont build - anyway would rather use mingw).

I used to find that as I debugged, things would gradually deteriorate until I had to restart theIDE (if it didn't ask to be shutdown by windows) but I can live with that.

Just now I'm finding that I can run my app fine in debug mode but as soon as I add a breakpoint it wont start. It seems to start debugging win32proc or ..\system32\ntdll.dll or something similar. Nothing to do with my code or even UPP by the look of it. Anyone else get this?

Restarting or even reinstalling UPP doesn't make any difference. Also I tried restarting windows with no joy. Next I tried putting a breakpoint on my very first line of code and I never reach it. I'm stumped! - looks like I will have to debug without breakpoints from now on... very puzzling.

The first line of this function from CtrlDraw.cpp appears to be implicated in some way

void Ctrl::Refresh() {
	if(fullrefresh || !IsVisible() || !IsOpen()) return;
	LLOG("Refresh " << Name() << " full:" << fullrefresh);
	Refresh(Rect(GetSize()).Inflated(OverPaint()));
	fullrefresh = true;
}


I tried moving TheIDE to my second monitor but still it still gets stuck.

Nick

Update:
Ok so now I tried it on another PC with my old patched version of 708dev1 and the debugger doesn't work there either so it looks like it is my code. Surely though the whole point of a debugger is that your code should not be able to break the debugger. Also, my code appears to break the debugger before it has even executed a line.


[Updated on: Tue, 18 September 2007 16:24]

Report message to a moderator

No projects debug with latest 709dev1 under mingw [message #11587 is a reply to message #11581] Tue, 18 September 2007 16:26 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Ok I've tried debugging projects straight out of examples and reference and nothing debugs. Its not my code.

Ach who cares about breakpoints - DUMP works fine Smile

Is there a better way to show variables than

#ifdef _DEBUG
	String s = Format("GetProbability() using tab file: startRadians=%f,stopRadians=%f,v=%f,vstep=%f,res=%f,f=%f",
										startRadians,stopRadians,v,vstep,res,f);
	DUMP(s);
#endif


?

[Updated on: Tue, 18 September 2007 20:47]

Report message to a moderator

Re: No projects debug with latest 709dev1 under mingw [message #11978 is a reply to message #11587] Sat, 06 October 2007 04:25 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Hi everyone,

Debugging still doesnt work for me with mingw and I can't compile with MSC8. I've become quite adept at using DUMP. However, not being able to step through code makes finding bugs really really time-consuming.

Am I the only person who gets this error?

Nick




Re: Problems with debugging in TheIDE (mingw) [message #12044 is a reply to message #11581] Tue, 09 October 2007 15:26 Go to previous messageGo to next message
tvanriper is currently offline  tvanriper
Messages: 85
Registered: September 2007
Location: Germantown, MD, USA
Member
I use both mingw and MSC8 (although my MSC8 is from the full version, not Express... but that really shouldn't matter to TheIDE). I've never had a problem with debugging, as long as I ensured I was creating a debugable program.

At the top of TheIDE, you can find two drop-downs. The second dropdown may say 'MSC8', followed by some other word. If that other word isn't 'Debug', you'll have a hard time debugging your program, since you are not compiling any debugging information into your executable.

You should be able to left-click on the right combo-box button (it's an interesting combo box, with left and right buttons, instead of the traditional kind with only one button) to change the option.

If this does not help, you may have some kind of path problem. You might want to click on 'Setup', then 'Build Methods...' to see if your paths and and options look correct. When I get home, if I can remember to do this, I can look at my settings to see what I have, so you can compare.

For whatever it's worth, I use MingW at home, and MSC8 at work. I like both compilers, honestly, but I feel slightly dirty using MSC8, as I'm not a fan of Microsoft.

That said, since I'm currently at work (sshhh... don't tell anyone I'm browsing the forums at work), I can give you my MSC8 settings:

Debug options: -Od
Optimize for speed: -O2 -GS-
Optimize for size: -O1 -GS-

Use BLITZ for debug, but do not use BLITZ for release.

Default Debug info level: Full

All static for debug and release.

Paths to PATH executables go to Common7/IDE folder, VC/Bin, and the SDK Bin folder.

Paths to INCLUDE go to VC/Include, and SDK Include.

Paths to LIB go to VC/lib, and SDK Lib.

I hope this somehow helps.
Re: Problems with debugging in TheIDE (mingw) [message #12196 is a reply to message #12044] Wed, 17 October 2007 15:41 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Thanks.

I checked my settings and they are the same as yours for MSC8 although for some reason I can't build MSC8 in any case it says things are missing (windows.h and windef.h)

Back to mingw, its not so much that it doesnt debug as that I can't set breakpoints or step through without the debugger stopping in code that isnt mine (like Ctrl.cpp or GridCtrl.cpp) and then when I tell it to continue, the main window never appears.

Trying it now, I set a breakpoint somewhere in my code (anywhere) and hit F5, the initial pause is in a function call Upp::Callback::Callback()

and the rest of the call stack looks like this (going up the way)

Upp::callback1<UPP::GridCtrl,Upp::GridCtrl,int,int>()

Upp::GridCtrl::FindOptsBar(this=0x7c96e0f8,bar=0xffffffff) at C;/upp/uppsrc/GridCtrl/GridCtrl.cpp:405

strchr() from C:/WINDOWS/system32/ntdll.dll

ntdll!RtlpNtMakeTemporaryKey() from C:\WINDOWS\system32\ntdll.dll

i.e. non of this is code that I want to debug. When I press F5 again nothing happens. No window appears. Eventually I have to stop debugging.

Any ideas welcome Smile

Nick

Re: Problems with debugging in TheIDE (mingw) [message #12197 is a reply to message #11581] Wed, 17 October 2007 17:16 Go to previous messageGo to next message
tvanriper is currently offline  tvanriper
Messages: 85
Registered: September 2007
Location: Germantown, MD, USA
Member
Not sure what to say. I have been able to successfully debug in MINGW (I did this very recently, in fact, when creating a simple little application for some gamers). I don't think I'm doing anything particularly odd. I did notice a bit of a delay before the debugging starts (the debugging didn't seem quite as 'clean' as with MSC8), but it did work for me.

Are you using 2007.1, or one of the dev releases? I've been using 2007.1, although I think the dev releases are generally recommended. Still, maybe there's a difference there, between us.

As for using MSC8 and not finding windows.h, are you certain you have the include folders set properly? For that matter, are you certain you have the platform SDK installed? It isn't installed with Express.

Are you certain you're compiling for debug, using debug switches and such, and not compiling for release? I think I asked this before, but I don't see an answer.

How is MINGW installed for you? Did you do something peculiar while installing it, or just use the MINGW installer (as I did)?
Re: Problems with debugging in TheIDE (mingw) [message #12234 is a reply to message #12197] Fri, 19 October 2007 22:56 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Thanks for the help. I can now debug under MSC8 although still not under MINGW. I just installed 710-dev1 with a new MINGW and still no luck. Its not my code or project settings because even when I load a reference project, it wont step through either.

Who knows <shrug> but at least I can debug in MSC8.

Cheers,

Nick

[Updated on: Sat, 20 October 2007 03:50]

Report message to a moderator

Re: Problems with debugging in TheIDE (mingw) [message #12433 is a reply to message #11581] Tue, 30 October 2007 13:33 Go to previous message
Atlas is currently offline  Atlas
Messages: 1
Registered: October 2007
Location: Romania
Junior Member
Hello everybody,

I also have the debug problem with 2007.1 release using MINGW. I have double check all my setting and I don’t understand what I’m doing wrong.
I’m able to set a breakpoint but nothing is happen when running in debugger and I’m not able to stop the code at a certain breakpoint. Is this behavior normal? Is there a manual that explain what steps you have to perform in order to make the IDE to work correctly?
Please excuse my ignorance but in my opinion someone new trying U++ will not waste time to configure something by guessing.
I known you guys put a lot of work in this great project but in my opinion you have to come much closer to the user, and to provide some documentation, this way you will avoid a lot of inutile questions that arrive on forum. Also please note that not everybody is an expert in OOP.
What I see now missing is an installation guide and a more detailed description for main objects that you provide (like TopWindow) and how these objects interact between them.

Thanks,
Atlas
Previous Topic: Getting "heap leaks detected!" error messages on program exit. How to debug it?
Next Topic: linking difficulties under msvc
Goto Forum:
  


Current Time: Thu Mar 28 20:26:19 CET 2024

Total time taken to generate the page: 0.01555 seconds