[fpc-pascal] Debug information
Rainer Stratmann
RainerStratmann at t-online.de
Mon May 28 22:19:46 CEST 2012
Am Monday 28 May 2012 22:09:21 schrieb Martin:
> On 28/05/2012 20:35, Rainer Stratmann wrote:
> > Am Monday 28 May 2012 21:12:30 schrieb Martin:
> >> On 27/05/2012 13:32, Rainer Stratmann wrote:
> >>> How to get debug information?
> >>>
> >>> There is an error, but only adresses are shown.
> >>
> >> How/ Where are the addresses shown?
> >
> > The addresses were shown in the output window (console).
> > Runtime error 207 at $0808BE90
> > $0808BE90
Hi,
that sounds very complicated in comparison to the past. There I could get it
work and simply the line numbers and the file were displayed in combination
with the addresses. Why does it not work this way again?
The addresses are not in the system unit.
I am compiling under Linux!
Are there also gdb and strip available?
> Ok: those addresses *should* get names, if you compile with -gl AND do
> not in any form strip (strip.exe removes the debug info) your app
>
> An app containing debug info has a considerable bigger exe.
> (can be 10 times or more as big as without)
>
> if you make a copy of your exe, and run
> strip[.exe] the_copy
>
> the the copy should be much smaller
> On windows strip.exe is in the fpc bin directory
>
> >> BUT only up to the very first time it does encounter an address that can
> >> not be resolved. Once that has happened no further addresses are
> >> resolved.
> >
> > I do not understand exactly what that means.
>
> If you get it to work, and one of the addresses is in the RTL (assuming
> your RTL has no dobug info), or in the kernel then the translation
> simply stops.
> It could be that the top address is in the rtl, then you will never get
> the info
>
>
> you can use gdb (assuming there is debug info / check the exe size)
> gdb your_exe
>
> and inside gdb
> info symbol *0x0808BE90
>
> Not all symbols may resolve though
>
> ------------------
> You can (again assume debug info) run in gdb
>
> gdb your_exe
>
> break FPC_RUNERROR
> r
>
> and when stopped
> bt
>
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
More information about the fpc-pascal
mailing list