[fpc-devel] A Compiled file size solution from the GBD mailing-list
fabio.dellaria at gmail.com
Thu Jan 17 08:06:50 CET 2008
2008/1/17, Peter Vreman <peter at freepascal.org>:
> At 22:25 16-1-2008, you wrote:
> >At 21:32 16-1-2008, you wrote:
> >>On Wed, 16 Jan 2008, Peter Vreman wrote:
> >> > At 13:17 16-1-2008, you wrote:
> >> > >Marco van de Voort wrote:
> >> > > >from _EXECUTABLE_ file FILE, iow you still need the unstripped exe.
> >> > >
> >> > >Perhaps it doesn't need the .text, .data, .bss etc sections though.
> >> >
> >> > I also posted this on Lazarus mailing list already.
> >> >
> >> > Below are the 2 commands to make it working. In the first command only the
> >> > debug information is kept in lazarus.dbg. And the second is the
> >> already know
> >> > way to strip the debug information.
> >> >
> >> >
> >> > And as a final note: Yes, it is possible to fix fpc to write
> >> such a .dbg file
> >> > also.
> >>Didn't we receive a patch from the Morfik people which did exactly this ?
> >>I remember that we had an email-conversation about it, and I also
> >>seem to remember applying a patch ?
> >There was already a quick hack added with the -Xg option to create a
> >separate .dbg file. But the contents of this file is not good for
> >gdb. We need to rewrite this part to be compatible with gdb and
> >other gnu tools.
> Support for a separate .dbg file is now available for windows in
> current svn trunk with the -Xg option. No need anymore for "objcopy
> --only-keep-debug && objcopy --add-debug-link && strip" under
> windows. The external linker (e.g. linux) still be updated to support
> objcopy and strip when -Xg is passed.
I have just try on Windows with objcopy (I have ownloaded it from the
mingw binutils binaries) and works like a charm.
The -Xg flag do not works. GDB tell me: "not found symbols".
PS: why do not add objcopy to the FPC bin folder?
More information about the fpc-devel