1

Background

I (believe) know the address of an object, and I want to keep a watch on it. I find the address by first selecting a line on the call stack (not the top one) and then taking a look at the local variables. There is an interface in there that states the interface name and the implementing class at a certain address. The address seems to be incorrect, or I obviously do something wrong as the objects 'field values seem to make no sense. Check pic below as an example.

enter image description here

Question How to I get to peek into the object's fields that I find from the local stack?

H.Hasenack
  • 1,094
  • 8
  • 27

1 Answers1

5

In the debugger, you can Evaluate/Modify (Ctrl+F7) data at a given address.

For example, if you determined that the screen variable is at $85CE88 you can evaluate TScreen($85CE88) to see the values of each field.

Obviously you need to know the data type at the address you want to examine. Using the wrong datatype will lead to incorrect information display.

fpiette
  • 11,983
  • 1
  • 24
  • 46
  • This is trtue, I added another variable to my class that contains the address of the actual object. This tured out to be different than what the local variables object inspector suggested as address. So I believe the address displayed is the address of the interface. – H.Hasenack Jan 07 '21 at 12:27
  • I Filed an issue for this confusing behavior. If you agree on this, please check and upvote the issue: https://quality.embarcadero.com/browse/RSP-32130 – H.Hasenack Jan 11 '21 at 19:41