Also I get an debug message in the TSetSet object when closing reigstry key
(reg.CloseKey - \"finish\" not meaningful in outermost frame.)..?
REGLOC must be something in debugger (or linker/compiler) - it's no invention of mine.This is
Values are still terribly wrong, outside the ReadSet() procedure...If your setup somehow continues to the next field, then what does it print for RegLoc?
Can it be cause by the constant declaration?
And now it gets spooky...Well that makes them pre-initialized variables.
Changing declaration of objects contants to include type
RegLoc : string = '\Software\SDC\Play';
And then - before I downgrade to previous version, that functions - I tried to change the constants to variables, that are assigned values in a constructor.
It has the same effect as defining constants with type - no reported problem reading RegLoc, but unfortunately the object does not have the value read from the registry either.
Values are simply not the same outside the object, as they are inside...
To me the debug info looks ok. But when implementing FpDebug from the dwarf spec, I did not foresee this case either... (So fpdebug needs fixing too).
I am not able to understand all you're saying - what I do understated makes sense.At the start of the topic there were 2 issues.
The main - disturbing - thing to me, is that info in watch is not reliable.For that I have not enough info to find out why.
In 2.0.10 half of the information is wrong, and the program derived from source is not functioning.
In 2.0.8 the information is also wrong, but the program actually functions.
(And there are other peculiarities with the watch - objects of class TList have no Count property for instance [well, they do, but in watch it must be addressed as objectname.FItems.FCount ims]. Many other classes have "missing" properties, that is used regularly in source - most of which I haven't found a workaround for yet. It severely limits the use of not only the watch/debug but actually Lazarus itself.)Basically: ALL properties that have a getter function. Because the debugger can not call functions. (and because 1 or 2 more issues).
If Lazarus is to be a reliable tool, there is no way it will be acceptable, that because it can not find a constant that makes no sense outside the object, it also can not find the variables that the object actually exists to supply.Part of it needs to be fixed in FPC => so earliest (with a lot of luck) fpc 3.4 // with "lottery jackpot winning"-like luck, fpc 3.2.x
No matter if the problem is with Lazarus, a debugger or somewhere else.
Sometimes it's like beating nails with a hammer that keeps loosing the head, and you end up spending time finding workarounds for the tools shortcomings, rather than solving the problem you set out to solve.Try fixing/improving/writing a debugger, if the only debugger that you can use in order to debug the failing debugger, is (yes well) that failing debugger itself.... :)
I do understand it's not simple - and that it has probably not become simpler since I wrote my first programs back in the '80's.
Just voicing my opinion as a - not very experienced - Lazarus user.
Respect and appreciation of all the hard work.
I have no Linux.
(Have tried a couple of times, with old PC's. Linux is only free, if the users time has no value - so I haven't really been able to afford it - yet anyway).
No - I had not tried fpDebug.
(Don't jinx it - or if it ain't broke, don't fix it. So when things start functioning after a lot of problems, it takes a little courage to experiment again.)
I installed "fpdebug 0.0" from the internal list in Lazarus.
(Packages menu item Install/Uninstall packages)
This is the one that comes with Lazarus 2.0.8.
It still gives the problem with RegLoc
<TSETSET> = {<TOBJECT> = {_vptr$TOBJECT = $1002d2c88}, static REGLOC = <error reading variable>
(apparently missing one } in watch window.... ;) )
But all other values in the object are reported correct!
(Optimization 0) - this in contrast to whatever debug was used before installing fpDebug.
Is there a newer version of fpDebug I should use?
It still gives the problem with RegLoc
<TSETSET> = {<TOBJECT> = {_vptr$TOBJECT = $1002d2c88}, static REGLOC = <error reading variable>
[2020-08-19 21:12:46.349 Info] 19-08-2020 21:12:46: fpcupdeluxe: V304 (20200722) started.
[2020-08-19 21:12:46.349 Info] FPCUPdeluxe V1.8.0e for x86_64-win64 running on Win64-6.1.7601
[2020-08-19 21:12:46.349 Info] Checking dev-libs for:
[2020-08-19 21:18:45.347 Info] 19-08-2020 21:18:45: fpcupdeluxe: V304 (20200722) started.
[2020-08-19 21:18:45.347 Info] FPCUPdeluxe V1.8.0e for x86_64-win64 running on Win64-6.1.7601
[2020-08-19 21:18:45.347 Info] Checking dev-libs for: