[fpc-devel] fixing/extending dwarf support // Re: RECENT Commit breaking FpDebug - Dwarf / and not even fully fixing the original issue
Martin Frb
lazarus at mfriebe.de
Thu Apr 30 16:35:38 CEST 2026
On 30/04/2026 00:50, Pierre Muller via fpc-devel wrote:
> I tried recently to use dwarfdump, a standard unix utility,
> and this tool does indeed list a few issues with
> the DWARF information generated by Free Pascal.
Ok, I tried dwarfdump myself.
Just a random glance into the output, some may be easy to fix (there is
a missing OP_nop for a OP_skip to end)...
I haven't gone through many yet.
But, just blindly fixing them may not even help (not even for gdb).
Its very possible that some stuff happens to work with gdb, because its
"special". And that getting it right breaks gdb (as we know for fact
that gdb does fail on various valid encodings).
I was thinking about a tool (maybe to be included in automated testing)
that could run gdb and lldb on given test-code (including compiling that
code).
And then inject commands like "p MyObject^" and regex the output for
known field-names and -value (the formatting of those doesn't matter,
only the presence).
If that is of interest I may further look into it.
But,
=> while I am all for improving the gdb compatibility,
=> I don't have any motivation to kill off features used by FpDebug
If the latter can be replaced (with something that works for gdb too) =>
good.
If not, then I really would want to have some feedback on other options.
E.g. introducing "-godwarffpdebug"
Even if that would include some "not so strict" implementations. Even
gcc has "|-gno-strict-dwarf" to allow some digressions... (ok, so long
as the receiving debugger will be fine...).|
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20260430/24388846/attachment.htm>
More information about the fpc-devel
mailing list