DWARF v5 unit headers

I'm planning to commit a patch (⚙ D30206 [DWARF5] Emit new unit header) which will
cause Clang/LLVM to emit correct unit headers if you ask for version 5.
I've run the lldb tests and I *think* I pointed to my modified Clang
correctly (cmake with -DLLDB_TEST_COMPILER=/my/clang) and AFAICT it does
not introduce new problems.
I saw 3 Failure and 12 Error with or without the patch.
(One Expected Failure seems to have become an Unexpected Success. Haven't
tried to decipher logs to figure out which one yet.)

If anybody can predict a problem with my patch, please let me know by
noon Pacific time (2000 GMT) tomorrow (28th).

We're going to be doing more work implementing various bits of DWARF v5
in the coming months. If anybody thinks they can predict that there are
particular bits that would be especially problematic for LLDB, it would
be useful to know up front which bits those are.

Thanks
--paulr

As far as I know the only dwarf v5 functionality currently implemented in LLDB is the split dwarf support so I don’t expect it to work with the new dwarf v5 data but as long as clang emits dwarf v4 (or older) by default it shouldn’t cause any immediate problem with the test suite (we will still have to teach LLDB to handle dwarf v5).

For the future changes, when you start to emit the new dwarf v5 tag and form values instead of the current GNU extension tag and form values for split dwarf and for the related new data form-s we will have to teach LLDB to understand them (currently we expect only the GNU versions) so a heads up for that change would be appreciated. Other then this I expect no issue regarding the addition of dwarf v5 support for LLDB.

Tamas

Thanks for the heads up Paul. I’ve tried your change on linux, and I don’t see any regressions, so it should be safe to land.

Regarding the test failures you were seeing: what is the system you were testing this on? If it is linux, could you send me the list of failures – I’d be interested in getting them sorted out.

regards,
pavel

Thanks for the feedback! Clang will continue to emit v4 by default for quite some time, the v5 work is just getting started.

Would someone like to be subscribed to LLVM reviews that do new v5 work? Or just rely on us remembering to send notes to lldb-dev?

Once I get the unit headers in place, my focus is likely to be on the features that reduce the number of relocations that the linker has to process. This would include the new indirect forms for strings and addresses.

Pavel, I will start a new thread about the failures I see on Linux.

Thanks,

–paulr

I look forward to seeing DWARF5 support integrated into LLDB. No problems that I know of that you will run into. Please include me in on the LLDB related patches for DWARF5. One particular area of interest is the emission of the new accelerator tables and having LLDB support them. I believe the new DWARF5 standard specifies name accelerator tables that replace the ones we make on Apple platforms and have been using for many years. They speed debugging up on linux by a lot so as the current code doesn't trust any DWARF accelerator tables and it indexes the DWARF manually.