[Lazarus] Some debug facts/improves

Paul Ishenin webpirat at mail.ru
Sat Oct 3 03:36:46 CEST 2009


JoshyFun wrote:
> 1) I was unable to find how TIDEWatch is connected with GDBMIDebugger,
> in special the "GetValue" property getter. As I understand GetValue
> will return the "default value representation" so to add override
> representation, in example "memory dump", a new function should be
> added like "GetValue(FormatSet)".
>   
Debugger has one set of classes for IDE and another set of classes for 
the debugging itself.
Classes which has IDE in name are used by IDE to save/load their values 
to/from streams, etc.
TDBGWatch is used as a base class for the debugger - it has TIDEWatch as 
slave. TGDBMIWatch is a paticular implementation for TDBGWatch which 
works with gdb debugger.
> 2) The IDE hints are always draw using DT_CENTER which ruins any
> multiline representation. Is possible to remove this DT_CENTER from
> "procedure THintWindow.Paint" ?
>   
Yes, as I remember I did so but don't remember the reason. Many times 
after I though to remove DT_CENTER too. When I have time to work I will 
look for reasons and remove it.
> 4) gdb class information looks very strange to me, in example a
> TMemoryStream dumps:
>
> ~"type = TMEMORYSTREAM = class : public TCUSTOMMEMORYSTREAM \n"
> ~"  private\n"
> ~"    FCAPACITY : LONGINT;\n"
> ~"\n"
> ~"  public\n"
> ~"    procedure SETCAPACITY (TMEMORYSTREAM, ONGINT, );\n"
> ~"    function  REALLOC (TMEMORYSTREAM, ONGINT, ) : POINTER; virtual;\n"
> ~"    destructor  ~DESTROY (TMEMORYSTREAM, OINTER); virtual;\n"
> ~"    procedure CLEAR (TMEMORYSTREAM);\n"
> ~"    procedure LOADFROMSTREAM (TMEMORYSTREAM, STREAM, );\n"
> ~"    procedure LOADFROMFILE (TMEMORYSTREAM, ANSISTRING);\n"
> ~"    procedure SETSIZE (TMEMORYSTREAM, ONGINT, ); virtual;\n"
> ~"    function  WRITE (TMEMORYSTREAM, onst7, ) : LONGINT; virtual;\n"
> ~"end\n"
>
> Note the missing "L" in second parameter when LONGINT was expected, or
> missing "T" in LOADFROMSTREAM, but the most strange to me is the
> "onst7". What's "const7" ? Does anybody know why those letters are
> missing ?
>   
Yes, just tried and it is indeed so. Probably some bug of FPC or GDB or 
both. Can you report this to the fpc bug tracker?

Can't help with other items.

Best regards,
Paul Ishenin.




More information about the Lazarus mailing list