On 24 Sep 2009, at 10:37, Alexey Voytsehovich wrote:

On 24 Sep 2009, at 10:14, Alexey Voytsehovich wrote:

Do not prompt way to generate map file with line numbers in source
code? By analogy with Delphi. Since not get to the addresses in the
Call Stack to get a line in the source code.

Compile your program with -gl to get line numbers next to the call
stack addresses.

Not. Prohibited by the laws of the company. :(

Ok, so it is for distributed program. Compile the program with -g, keep the original copy for yourself and run "strip" on the copy that you distribute to your users. When you get a backtrace from a user, like this:

Runtime error 216 at $0000271C
  $0000271C
  $00002744
  $00024720
  $000026D0
  $000023E0
  $00001000

then you can look up the addresses in gdb:

gdb my-program-compiled-with-g-and-not-stripped
(gdb) info line *0x0000271C
Line 6 of "tt.pp" starts at address 0x2714 <TEST+20> and ends at 0x2720 <TEST+32>.


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to