[Lazarus] Strip debug info

Martin lazarus at mfriebe.de
Sun Apr 29 18:28:53 CEST 2012


On 29/04/2012 16:54, Jürgen Hestermann wrote:
> Martin schrieb:
> >>> Is there any reason why the -Xg flag is not on at default? What's 
> the disadvantage of using this flag? The reason I say is because there 
> is a "massive" reduction in .exe size?
> >>>
> >> Yes, that's what I wondered about too.
> >
> > Also, I guess it is more error prone. Compile with external debug, 
> then make changes,
> > recompile but with release settings. Then you have an outdated debug 
> info file, and
> > if you happen to run that in the debugger, you get a lot of strange 
> things....
> >
>
> Realy? If you compile without (external) debug info can you still run 
> the debugger from the IDE?
> If yes, this has to be disabled of course.
> If not, then there is no danger that an outdated debug info file can 
> be used.

Again, not that simple.

Currently, I can start the app (without debug info) by pressing F9. Just 
as a way to run it. Not to debug it.
So if that was no longer possible, then alternate means need to be 
created, to just run (there is a feature request for that already)


But *IF* such a check would be added.....
the appropriate way for the IDE to check is not to see, if the last 
compile did have dbg info. It is to check, if the debug info is available.

Example: I often use the "Run Param" > "Host App" to debug a different 
version of the executable. It works perfect. Of course that still works, 
even if the last compiled exe has no debug info.

And one can also compile the project outside the IDE, and debug it in 
the IDE .....

And, of course that makes it even more complicated: because if I debug a 
dll, I might have a project loaded that does uses the dll. I would have 
to test, if the debugger can use the dll's debug info, if the host app 
has no debug info.... (I do not know)

-----------
Again, yes the situation can (and need/should) be improved.
But again: not that simple.






More information about the Lazarus mailing list