Re: [Flightgear-devel] apt.dat and debugging

2006-08-23 Thread Geoff Air
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
0xd...(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=lnkkid=120709bid=263057dat=121642
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] apt.dat and debugging

2006-08-20 Thread Dave Sousa



First of all, I am new to the list and have enjoyed 
using FlightGear. Thanks to all who have contributed. I am a C++ 
programmer and am looking at FG from a hobbyist perspective without any 
simulation development experience.

I built FG using MSVC 2005, and the release build 
version works great. I tried to step through the code using the debugger, 
but it takes several minutes to load the apt.dat file. Is this normal, or 
is this specific to the MSVC IDE? Are there some command line parameters 
that could be set to mitigate this issue for debugging purposes?

I chose MSVC because that is what I use at work, 
but would be happy to try another IDE if that would solve the 
issue.

Dave
-
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=lnkkid=120709bid=263057dat=121642___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] apt.dat and debugging

2006-08-20 Thread Pigeon
I built FG using MSVC 2005, and the release build version works
great.  I tried to step through the code using the debugger, but it
takes several minutes to load the apt.dat file.  Is this normal, or is
this specific to the MSVC IDE?  Are there some command line parameters
that could be set to mitigate this issue for debugging purposes?

I'm not sure about MSVC. On Linux I sometimes use valgrind (a memory
check/debug tool) with FG, and yes it is significantly slower.

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). In this
debug FG root, I have trimmed down versions of apt.dat, nav.dat, etc,
which makes the debugging startup a lot faster. My apt.dat for debugging
has only nine airports that are around the default KSFO area.

Of course this assumes you're not trying to debug apt.dat or other
full data.

Similarly I also have a seperate debug preferences.xml passed using
--config.


Pigeon.


-
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=lnkkid=120709bid=263057dat=121642
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel