Sign in Join

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

Mailing lists / fpc-devel / 2012-03

class section (public, private) in debug info

7 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Martin

Is this an FPC issue or gdb?
Tested with fpc 2.6 / gdb 7.3-2 , win 32

Stabs, seems to have the right sections for fields. Stabs also shows methods, but they seem to be without any info about class sections

Dwarf (see below) everything seems to be public:
Dwarf does not seem to show methods

> TCmdLineDebugger.SendCmdLn "ptype TCOMPONENT"

<< TCmdLineDebugger.ReadLn "~"type = ^TCOMPONENT = class : public TPERSISTENT \n""
<< TCmdLineDebugger.ReadLn "~" public\n""
<< TCmdLineDebugger.ReadLn "~" FOWNER : TCOMPONENT;\n"" << TCmdLineDebugger.ReadLn "~" FNAME : ANSISTRING;\n"" << TCmdLineDebugger.ReadLn "~" FTAG : LONGINT;\n"" << TCmdLineDebugger.ReadLn "~" FCOMPONENTS : TFPLIST;\n"" << TCmdLineDebugger.ReadLn "~" FFREENOTIFIES : TFPLIST;\n"" << TCmdLineDebugger.ReadLn "~" FDESIGNINFO : LONGINT;\n"" << TCmdLineDebugger.ReadLn "~" FVCLCOMOBJECT : POINTER;\n"" << TCmdLineDebugger.ReadLn "~" FCOMPONENTSTATE : TCOMPONENTSTATE;\n"" << TCmdLineDebugger.ReadLn "~" FCOMPONENTSTYLE : TCOMPONENTSTYLE;\n"" << TCmdLineDebugger.ReadLn "~" COMPONENTSTATE : TCOMPONENTSTATE;\n"" << TCmdLineDebugger.ReadLn "~" COMPONENTSTYLE : TCOMPONENTSTYLE;\n"" << TCmdLineDebugger.ReadLn "~" DESIGNINFO : LONGINT;\n"" << TCmdLineDebugger.ReadLn "~" OWNER : TCOMPONENT;\n"" << TCmdLineDebugger.ReadLn "~" VCLCOMOBJECT : POINTER;\n"" << TCmdLineDebugger.ReadLn "~" NAME : ANSISTRING;\n"" << TCmdLineDebugger.ReadLn "~" TAG : LONGINT;\n"" << TCmdLineDebugger.ReadLn "~"end\n""
<< TCmdLineDebugger.ReadLn "^done"

Reply by email

Graeme Geldenhuys
to Martin
Martin wrote
Dwarf (see below) everything seems to be public:

Maybe I'm not understanding this correctly, but why would you want "visibility restrictions" on debug information? Surely when debugging, you want access to ALL data - thus public visibility across the board seem good.

Regards,   - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net

Reply by email

Paul Ishenin
to Graeme Geldenhuys
Graeme Geldenhuys wrote
Maybe I'm not understanding this correctly, but why would you want "visibility restrictions" on debug information? Surely when debugging, you want access to ALL data - thus public visibility across the board seem good.

Obviously - to show the visibility in inspect window for example. More you know - better.

Best regards,
Paul Ishenin

Reply by email

Martin
to Paul Ishenin
Paul Ishenin wrote 8 lines
20.03.2012 15:39, Graeme Geldenhuys написал: > Maybe I'm not understanding this correctly, but why would you want > "visibility restrictions" on debug information? Surely when debugging, > you want access to ALL data - thus public visibility across the board > seem good. Obviously - to show the visibility in inspect window for example. More you know - better.

exactly. (and filter, if there is lots of data)

the symbols can be viewed in the debugger anyway, even if they are private

Reply by email

Jonas Maebe
to Martin: Is this an FPC issue or gdb? Tested with fpc 2.6 / gdb 7.3-2 , win 32 Stabs, seems to…
Martin wrote
Dwarf (see below) everything seems to be public: Dwarf does not seem to show methods

With gdb on Mac OS X it works fine (and yes, this is DWARF):

(gdb) ptype TLINKEDLIST
type = ^TLINKEDLIST = class : public TOBJECT
   private
     FCOUNT : LONGINT;
     FFIRST : TLINKEDLISTITEM;
     FLAST : TLINKEDLISTITEM;
     FNOCLEAR : BOOLEAN;
     FIRST : TLINKEDLISTITEM;
     LAST : TLINKEDLISTITEM;
     COUNT : LONGINT;
   public
     function  CREATE () : TLINKEDLIST;
     procedure DESTROY (); virtual;
     function  EMPTY () : BOOLEAN;
     procedure CLEAR ();
     procedure INSERT ();
     procedure INSERTBEFORE ();
     procedure INSERTAFTER (); virtual;
     procedure CONCAT ();
     procedure REMOVE ();
     function  GETFIRST () : TLINKEDLISTITEM;
     function  GETLAST () : TLINKEDLISTITEM;
     procedure INSERTLIST ();
     procedure INSERTLISTBEFORE ();
     procedure INSERTLISTAFTER ();
     procedure CONCATLIST ();
     procedure INSERTLISTCOPY ();
     procedure CONCATLISTCOPY ();
end

That's of course a very old version of gdb (some fork based on 6.3.50), so maybe it's a regression.

Jonas

Reply by email

Jonas Maebe
to Paul Ishenin
Paul Ishenin wrote 7 lines
20.03.12 19:02, Jonas Maebe написал: > That's of course a very old version of gdb (some fork based on > 6.3.50), > so maybe it's a regression. As I remember this was fixed in fpc trunk only?

That was something else. It works fine if I compile the compiler with DWARF using 2.6.0.

Jonas

Reply by email