[Lazarus] FPC error without line number

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Apr 28 22:03:35 CEST 2008


On Mon, 28 Apr 2008 14:29:32 -0300
ArĂ­ Ricardo Ody <ari.ody at japinfo.com.br> wrote:

> Some days ago I talk asked here about the use of a hex addr when a 
> FPC error didn't shows the line number. Someone told me to use:
> 
> FPC <source-program> -gl -B
> 
> Today I have an real problem to report and I'll be waiting for 
> explanations. Show the snapshot below, please:
> 
> ==========================================================================================
> [ricardo at fedora-vm tools]$ fpc ConversorPliCob -gl -B
> Free Pascal Compiler version 2.2.0 [2007/08/31] for i386
> Copyright (c) 1993-2007 by Florian Klaempfl
> Target OS: Linux for i386
> Compiling ConversorPliCob.pas
> Compiling un_util_conversao.pas
> Compiling un_converte_declares.pas
> Linking ConversorPliCob
> 3138 lines compiled, 1.6 sec
> [ricardo at fedora-vm tools]$ ./ConversorPliCob k5f5.pl1
> An unhandled exception occurred at $0807C5C0 :
> EStringListError : List index (-1) out of bounds
>    $0807C5C0
> [ricardo at fedora-vm tools]$
> (This snapshot shows the screen of Fedora 8 running under VMWare in a 
> windows XP machine)
> ==========================================================================================
> 
> As you can see I followed your recommendation, e.g., compile with 
> "-gl" and "-B" directives and, as you can see above, the line number 
> wasn't showed...

I can confirm, that a simple

  List:=TFPList.Create;
  for i:=0 to List.Count do
    TObject(List[i]).Free;

shows only hexnumbers instead of line numbers.
Normally the rest of the stack should contain some usable line numbers.
But not in the above case.
I don't know, if this is a bug in gdb or in the gdb information
generated by FPC.
Anyway, please report the bug, create a small complete example and
give the exact FPC and OS version. Then the bug will probably fixed
soon.

 
> Well, let me ask again:
> 
> Is the hexadecimal address useful for debugging?

AFAIK: no. At least not for normal users.


> Should I discover 
> the line number where the error occurs?
> (I already discover(step by step with Lazarus debugging) the line of 
> the error and it's located in a procedure inside the unit 
> un_converte_declares.pas...)


Mattias




More information about the Lazarus mailing list