[fpc-devel] gdb shows wrong type info

Paul Ishenin ip at kmiac.ru
Fri Oct 9 03:13:14 CEST 2009


Hello,  FPC developers' list.

This was reported few days ago on the Lazarus mail list and probably was 
not noticed by FPC developers:

Compile any application with stabs debug info (I did not check with 
dwarf), run it in gdb:

(gdb) ptype Exception
type = EXCEPTION = class : public TOBJECT
   private
     FMESSAGE : ANSISTRING;
     FHELPCONTEXT : LONGINT;

   public
     constructor CREATE (EXCEPTION, POINTER, ANSISTRING) : ^EXCEPTION;
     constructor CREATEFMT (EXCEPTION, POINTER, ANSISTRING, unnamedtype, 
ONGINT) : ^EXCEPTION;
     constructor CREATERES (EXCEPTION, POINTER, PSTRING) : ^EXCEPTION;
     constructor CREATERESFMT (EXCEPTION, POINTER, PSTRING, unnamedtype, 
ONGINT, ) : ^EXCEPTION;
     constructor CREATEHELP (EXCEPTION, POINTER, ANSISTRING, ONGINT) : 
^EXCEPTION;
     constructor CREATEFMTHELP (EXCEPTION, POINTER, ANSISTRING, 
unnamedtype, ONGINT7, ) : ^EXCEPTION;
     constructor CREATERESHELP (EXCEPTION, POINTER, PSTRING, LONGINT) : 
^EXCEPTION;
     constructor CREATERESFMTHELP (EXCEPTION, POINTER, PSTRING, 
unnamedtype, ONGINT7, ) : ^EXCEPTION;
end

If you look carefully at the gdb output you can notice the next types:
1. ONGINT
2. ONGINT7

Same if you check gdb output for TObject (and even more - "OINTER" type 
is there).

Is this known? Is this a bug?

--
Best regards,
Paul Ishenin.




More information about the fpc-devel mailing list