How to help improve debug experience w/ optimizations enabled?

Hello,

I’d like to help improve the debug experience in LLVM/Clang when optimizations are enabled, but I’m not sure where to start.
I’ve seen the umbrella bug for poor debug experiences (38768 https://bugs.llvm.org/show_bug.cgi?id=38768 ).

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?

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.

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.

Thank you.

Kind regards,
Pierre van Houtryve

Hello Pierre,

We have certainly tried to make bug 38768 the umbrella for all the various poor experiences. If other projects have poor debugging experiences when using clang, they should be reporting them here; otherwise we won’t know about them.

You could also look at bug 37953 (https://bugs.llvm.org/show_bug.cgi?id=37953) which is an umbrella for bugs where we seem to lose track of debug info, although these do not necessarily lead to poor debugging experiences. They are generally simpler, and would be a better choice for getting started with the LLVM project. I’d suggest starting with one or two of these before getting into the tougher problems under bug 38768.

Welcome to one of the nicer open-source communities around, and if you get stuck we can usually provide some help to get you going again.

–paulr

Hello Pierre,

We have certainly tried to make bug 38768 the umbrella for all the various poor experiences. If other projects have poor debugging experiences when using clang, they should be reporting them here; otherwise we won’t know about them.

You could also look at bug 37953 (https://bugs.llvm.org/show_bug.cgi?id=37953) which is an umbrella for bugs where we seem to lose track of debug info, although these do not necessarily lead to poor debugging experiences. They are generally simpler, and would be a better choice for getting started with the LLVM project. I’d suggest starting with one or two of these before getting into the tougher problems under bug 38768.

Welcome to one of the nicer open-source communities around, and if you get stuck we can usually provide some help to get you going again.

–paulr

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

Hello,

Thank you very much for your detailed answer.

I didn’t know DExTer was in the monorepo, I have been working on the “old” Dexter repo and I even made several changes/fixes to Dexter.
I’ll need to move my changes to the new version then (I hope to upstream a few of them, but it still needs some work)

I already picked up one bug from the umbrella bug (and it’s now waiting for review), I’ll try to pick up more of them in the next few days.

Kind regards,
Pierre van Houtryve

Hi Pierre,

I’ll put up a change at the old dexter repo to redirect to its new home. I should have done that a long time ago. Sorry for the inconvenience!

-Greg