On 26/03/2023 15:50, Florian Klämpfl via fpc-devel wrote:
Am 23.03.23 um 09:45 schrieb Martin Frb via fpc-devel:

It's a little hard to comment all at once, but at least I start with one :)

4) "official" marker for string vs pchar vs array


What about using DW_TAG_string_type for this? IIRC, when I implemented dwarf, it was not available/not supported, but fpdebug can do they. I am not sure about the status of GDB about it though :)

That would work.
But it can't distinguish between strings of char or widechar.  I.e. it can only be used for short and long-string(ansi). But not WideString or UnicodeString. Only DWARF 5 introduces a "DW_AT_type" for DW_TAG_string_type that can then define the base type for each char.
Ignoring gdb, fpc could add that for lower dwarf versions too.


It also would fall short, if ever Fpc did what Delphi did: {$ZEROBASEDSTRINGS }
Though, maybe that is a "wont ever happen".


 It still needs to be added to fpdebug, but that will be easy.
It is present in gdb sources, but I have no idea how well it will then work.

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to