[llvm-dev] How to help improve debug experience w/ optimizations enabled?

Jeremy Morse via llvm-dev llvm-dev at lists.llvm.org
Wed Feb 26 04:40:18 PST 2020


Hi Pierre,

> Is there any bug in this list that isn't being looked at (and that doesn't require a lot of knowledge) that I could work on?

As others say, please do pick up any unassigned bug. Some of the bugs
in the umbrella bugs haven't been touched in roughly a year -- just
identifying whether they reproduce or not on the master branch today
is worthwhile, so that we know what to focus on,

> In general, if I want to find bug reports about missing debug info/poor debug experience, where should I look at?
> e.g. bug trackers for clang-built projects, particular code examples, issues you encountered but haven't reported yet, etc.

A while back I wrote some small Dexter tests to stimulate different
optimisations in LLVM [0], on the principle that this should generate
a suite of programs with different behaviours, that we could look at
the debuginfo for. Most of the worst errors were reported under the
umbrella bug, but there were some strange behaviours that didn't end
up being reported. It might be worth re-running Dexter over these
tests to see if there are still weird behaviours present. Note that
differences in the code generated in the meantime may have altered or
even invalidated the tests since then (alas), and a certain amount of
analysis is needed to determine whether debuginfo can really be
improved.

> I also tried using Dexter (https://github.com/SNSystems/dexter ) to find issues, but it's hard to find something that I can fix in a reasonable amount of time using Dexter alone as I don't have enough LLVM experience to know where to look at/what to look for.

(Note that Dexter is now in the 'debuginfo-tests' dir of the
monorepo). I've tended to use Dexter in a very tight loop of modifying
code and then running Dexter to see what the debugger observes about
that code, to quickly try out code patterns that might be faulty. If I
had to pick an area, I'd say that manipulating structs / passing them
between functions might be an area worth analysing, we've had a few
bugs with struct fragments being misinterpreted recently.

[0] https://github.com/jmorse/dexter/tree/92f8ee722dda9710eb33969f00d29b48059b95bb/tests/nostdlib/llvm_passes

--
Thanks,
Jeremy


More information about the llvm-dev mailing list