Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2015-01

Debug information

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Rainer Stratmann

Can not get debug information

-g -gl -gw

switched on

but no further information (line nr) is displayed when an error occured.

Martin Frb
to Rainer Stratmann
Rainer Stratmann wrote 7 lines
Can not get debug information -g -gl -gw switched on but no further information (line nr) is displayed when an error occured.

-gl has a "feature" it prints the stack info, until it finds an address for which there is no stack info (e.g. in the rtl, if the rtl was not compiled with info).

IIRC this is to avoid issues if an error occurred while getting line info. But not sure.

So if your first address is not in code with debug info, then that is it.

If you run in the debugger, or resolve with leak-view then this will not happen. But ofcourse if the error occurs with either a corrupted stack, or in some code (e.g system kernal) that does not use stackframes then the stack can not always be parsed.

Jonas Maebe
to Martin Frb
Martin Frb wrote 13 lines
On 13/01/2015 14:40, Rainer Stratmann wrote: > Can not get debug information > > -g -gl -gw > > switched on > > but no further information (line nr) is displayed when an error > occured. -gl has a "feature" it prints the stack info, until it finds an address for which there is no stack info (e.g. in the rtl, if the rtl was not compiled with info).

No, it only stops printing line info for both the current and all future backtraces if an error occurs during the reading/decoding of the line information. If no line info is found for a particular address, nothing special happens.

However, -gl is not fully functional on platforms. E.g., it doesn't work for DWARF on (Mac) OS X.

Jonas

Rainer Stratmann
to Jonas Maebe

Linux Platform.

In the past there was a discussion about it already.

It may has to do with dynamic loaded library?

you wrote 29 lines
On 13 Jan 2015, at 16:14, Martin Frb wrote: > On 13/01/2015 14:40, Rainer Stratmann wrote: >> Can not get debug information >> >> -g -gl -gw >> >> switched on >> >> but no further information (line nr) is displayed when an error >> occured. > > -gl has a "feature" it prints the stack info, until it finds an > address for which there is no stack info (e.g. in the rtl, if the > rtl was not compiled with info). No, it only stops printing line info for both the current and all future backtraces if an error occurs during the reading/decoding of the line information. If no line info is found for a particular address, nothing special happens. However, -gl is not fully functional on platforms. E.g., it doesn't work for DWARF on (Mac) OS X. Jonas _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal