Wednesday, 23 August 2006. Subject: Re: [Flightgear-devel] apt.dat and debugging
>>>I built FG using MSVC 2005, and the release build version works >>>great. I tried to step through the code using the debugger, but ... >>What I did though was I have created a seperate FG root and use >>that for debugging (via FG_ROOT environment variable or --fg-root)... >I suspected that the solution would be something like this. Your >suggestion worked great. Loading the DEBUG version, in the MSVC IDE debugger, or not, will ALWAYS take a LOT LONGER ... in ALL versions of MSVC (7 or 8) ... As you may know, under the DEBUG configuration - (a) EVERY function has additional start and end code, a stack check, that fills the stack with a 'known' value, so on return, it can check if there has been some over-run, or other stack failure ... (b) EVERY allocation of memory using new, uses new_debug (IIRC), and - (i) has the memory filled with a 'known' value, like 0xddddd...(IIRC) etc, and (ii) keeps a list of the allocations, so the debugger can report use of un-initialised memory, and memory not freed ... And, of course, the DEBUG EXE is usually many times larger than the RELEASE EXE ... and this is increased MORE if you are also using DEBUG versions of the static libraries, like simgear, zlib, plib, etc ... and/or DEBUG versions of the shared libraries (DLL), like alut.dll, openal32.dll, etc ... Things like this cause a VERY SLOW DEBUG configuration load, and running ... separating, and using a trimmed down versions of apt.dat and nav.dat may speed up that part of the load, but, as stated, every function call is SLOWER, and still all memory allocations are so 'guarded' ... But under DEBUG, it does allow you to 'see' the BIG difference between a function call - void foo( string s ) and void foo( string & s ) The former must create a copy of the string, involving memory allocation before, and tidy() after, while the latter just passes a pointer to the existing 's' ... I 'hope' linux has 'similar' items to aid in the 'debug' versus the 'release' version ... It is a simple fact of life, that to run FG under the MSVC debugger takes 'forever', ALWAYS ... it does require considerable patience ... but a lot can be learned ;=)) Regards, Geoff. EOF - fg-47.doc _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel