[fpc-devel] debug info for ^TObject vs just TObject

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Dec 15 23:48:15 CET 2010


On 14 Dec 2010, at 20:08, Martin wrote:

> type
>  TFoo = class
>  public
>    FooValue: Integer;
>  end;
>  PFoo = ^TFoo;
> 
> procedure FooFunc(  Foo1: TFoo;   pFoo1: PFoo);
> 
> 
> ptype Foo1
> "~"type = ^TFOO = class : public TOBJECT \n""
> ptype pFoo1
> "~"type = ^TFOO = class : public TOBJECT \n""
> 
> Is gdb hiding something, or does FPC encode both types with the same info?

I think it's a bug in gdb's Pascal type printer, because if you set the language to C then it does print the correct number of pointer indirections:

(gdb) ptype FOO1
type = class TFOO : public TOBJECT {
  public:
    LONGINT FOOVALUE;
} *
(gdb) ptype PFOO1
type = class TFOO : public TOBJECT {
  public:
    LONGINT FOOVALUE;
} **

(see the '*' and '**')


Jonas


More information about the fpc-devel mailing list