Re: [fpc-pascal] Recovering info from a backtrace with an external debug file

2016-02-11 Thread Luiz Americo Pereira Camara
2016-02-11 0:12 GMT-03:00 Martin :

>
> Lazarus has "Leaks and Traces" in the view menu. Paste the trace, and then
> use the Button "Resolve" to load the exe with symbols. That should do.
>
> It uses a copy of the code found in infodwrf and "whatever the name of the
> unit reading stabs". Both of them (afaik) dont do dbg files. If someone has
> info how to add that, well 
>
>
> as for gdb, you can open your exe (and if gdb finds the dbg file, then
> that should be fine.)
> if gdb loaded your dbg info, then you can do something (not tested/from
> memory)
>
> info symbol 0x54320
>
> and it prints what is at that address. Do that for each address in the trace.
>
>
Thanks.

Much helpful

Luiz
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Recovering info from a backtrace with an external debug file

2016-02-11 Thread Luiz Americo Pereira Camara
2016-02-11 0:06 GMT-03:00 Luiz Americo Pereira Camara <
luizameri...@gmail.com>:

>
>
> 2016-02-10 23:59 GMT-03:00 :
>
>> On 02/10/2016 09:47 PM, Luiz Americo Pereira Camara wrote:
>>
>>>
>>> How to get the line number, method names of the backtrace using the
>>> external
>>> debug file?
>>>
>>
>> my first eWAG gut response is to distribute the DBG file with the
>> executable...
>>
>>
> Thanks
>
> But that will not help, the backtrace will still be generated without
> info, just address
>
>
My apologies.

After some testing, i found that when the dbg file is in the same dir as
the executable, the calltrace is show with lineinfo. Seems that fpc
generates code to find the debug info.

Luiz
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Recovering info from a backtrace with an external debug file

2016-02-11 Thread Luca Olivetti

El 11/02/16 a les 04:12, Martin ha escrit:


info symbol 0x54320 and it prints what is at that address. Do that for
each address in the trace.


That should be "info line *0x54320".

Bye
--
Luca
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Recovering info from a backtrace with an external debug file

2016-02-10 Thread wkitty42

On 02/10/2016 09:47 PM, Luiz Americo Pereira Camara wrote:

Hi,

I compiled a program with -Xg (generating an external debug info file *.dbg)

And deployed the executable without the debug info

When an exception occurs i get a backtrace with only addresses

How to get the line number, method names of the backtrace using the external
debug file?


my first eWAG gut response is to distribute the DBG file with the executable...

--
 NOTE: No off-list assistance is given without prior approval.
   *Please keep mailing list traffic on the list* unless
   private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Recovering info from a backtrace with an external debug file

2016-02-10 Thread Luiz Americo Pereira Camara
2016-02-10 23:59 GMT-03:00 :

> On 02/10/2016 09:47 PM, Luiz Americo Pereira Camara wrote:
>
>>
>> How to get the line number, method names of the backtrace using the
>> external
>> debug file?
>>
>
> my first eWAG gut response is to distribute the DBG file with the
> executable...
>
>
Thanks

But that will not help, the backtrace will still be generated without info,
just address

Luiz
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal