Lazarus

Using the Lazarus IDE => Debugger => Topic started by: Igor Kokarev on January 03, 2019, 09:26:15 am

Title: Missing features in Evaluate/Modify window
Post by: Igor Kokarev on January 03, 2019, 09:26:15 am
Hi Martin,

In Delphi I could use Evaluate/Modify window (Ctrl + F7) to see values of functions and values of properties.

Regrettably it doesn't work in debugger of Lazarus.

For example, I set a breakpoint and try to check value of variable, property and function:

Code: Pascal  [Select][+][-]
  1. fParam: Integer;
I type fParam in Evaluate/Modify window and it works fine. I can see value of fParam

Code: Pascal  [Select][+][-]
  1. property Param: Integer read GetParam;
I type Param and I get error: "No symbol \"PARAM\" in current context."

Code: Pascal  [Select][+][-]
  1. function GetParam: Integer;
I type GetParam and I get an error: "Type TFORM1 has no component named GETPARAM."

Lazarus 1.8.4 64-bit, fpc 3.0.4, Windows 10.
Title: Re: Missing features in Evaluate/Modify window
Post by: Martin_fr on January 03, 2019, 12:31:11 pm
This is a known issues.

Properties cannot currently be inspected (not in watches, not in evaluate, nowhere).

This is a combination of many issues.

1) gdb not able to call functions generated by fpc (or maybe an issue of fpc debug info generated for that).
   Actually have not tested with newer gdb....

2) debug info formats (stabs/dwarf2 or 3) not providing the means to store the concept of a pascal property.
  Therefore fpc not telling gdb that there is a property at all.

So to fix this, several parts of the tool chain need to be enhanced.
Title: Re: Missing features in Evaluate/Modify window
Post by: Igor Kokarev on January 03, 2019, 01:22:16 pm
Martin,

Thanks for your quick reply. I understood.

Same for LLDB?
Title: Re: Missing features in Evaluate/Modify window
Post by: Martin_fr on January 03, 2019, 01:39:34 pm
Yes, same for all debuggers.
TinyPortal © 2005-2018