<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 30/04/2026 00:50, Pierre Muller via
fpc-devel wrote:<br>
</div>
<blockquote type="cite"
cite="mid:01123c38-fe7d-4645-8d64-fb1e4f72e5c0@freepascal.org"> I
tried recently to use dwarfdump, a standard unix utility,
<br>
and this tool does indeed list a few issues with
<br>
the DWARF information generated by Free Pascal.</blockquote>
<br>
Ok, I tried dwarfdump myself.<br>
<br>
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)...<br>
<br>
I haven't gone through many yet.<br>
But, just blindly fixing them may not even help (not even for gdb).<br>
<br>
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).<br>
<br>
<br>
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).<br>
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).<br>
<br>
If that is of interest I may further look into it.<br>
<br>
But, <br>
=> while I am all for improving the gdb compatibility, <br>
=> I don't have any motivation to kill off features used by
FpDebug<br>
<br>
If the latter can be replaced (with something that works for gdb
too) => good.<br>
<br>
If not, then I really would want to have some feedback on other
options.<br>
E.g. introducing "-godwarffpdebug"<br>
<br>
Even if that would include some "not so strict" implementations.
Even gcc has "<span><code class="code">-gno-strict-dwarf" to allow
some digressions... (ok, so long as the receiving debugger will
be fine...).</code></span>
</body>
</html>