On 20/05/2020 19:54, Martin Frb wrote:
If you look at using FpDebug directly, then you use TFpValue.
(returned by PascalParser, or any Parser you want to add)
All you need is to encapsulate PascalBuilder into a class.
And stick the value and the builder into yet another object, holding
both of them.
TPascalBuilder would then be a formatter class.
It would also deliver the structures for fields, elements, children.....
TPascalBuilderĀ can be configured, for verbosity. (optino to skip all
the typenames, it currently includes)
With TPascalBuilderĀ it can also be passed to whatever code builds
stackframes. So formatting for those can be affected. (because the
class carries the config)
And then there is/was the idea with: getting data on request.
Creating a list of objects for all the fields of a class, needs to be
optional.
Well it is, by means of flags passed to Pascalbuilder.
What is missing, is the ability to later upgrade. There are 2
considerations.
1) re-reading target mem.
There already is a cache for target mem.
If TFpValue and TPascalBuilder are hold by a "watch value class", this
can control the cache, and keep the memory.
This memory is only the class. Vaules by ref, like strings are not included.
2) adding list of fields, to watch that was text only
This will also rebuild the text. That can be suppressed, if needed....
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal