Sign in Join

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

Mailing lists / lazarus / 2008-04

FPC error without line number

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Arí Ricardo Ody

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...

Well, let me ask again:

Is the hexadecimal address useful for debugging? 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...)

Greetings from Sao Paulo - Brazil

Ricardo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080428/eacfd715/attachment.html

Mattias Gaertner
to Arí Ricardo Ody
Show quoted text 30 lines
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.

Show quoted text 5 lines
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

Arí Ricardo Ody

Acho que nao entendi tua resposta na lista do Lazarus. Traduz pra mim, por favor?

[ ]

you wrote