This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Support DWARF-5 DW_FORM_line_strp (used by GCC)
ClosedPublic

Authored by jankratochvil on Mar 1 2021, 12:42 PM.

Details

Summary

LLDB has been failing on binaries produced by new GCC 11.0 with -gdwarf-5.

Diff Detail

Event Timeline

jankratochvil requested review of this revision.Mar 1 2021, 12:42 PM
jankratochvil created this revision.
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: sstefan1. · View Herald Transcript
jankratochvil removed a project: Restricted Project.Mar 1 2021, 12:42 PM
jankratochvil edited subscribers, added: Restricted Project; removed: Restricted Project.
labath accepted this revision.Mar 2 2021, 12:01 AM

Looks good.

lldb/test/Shell/SymbolFile/DWARF/dwarf5-line-strp.s
52–55

If you make the function return type void, this will go away.

115–126

You can delete this.

This revision is now accepted and ready to land.Mar 2 2021, 12:01 AM
jankratochvil marked 2 inline comments as done.Mar 2 2021, 6:16 AM
This revision was landed with ongoing or failed builds.Mar 2 2021, 6:18 AM
This revision was automatically updated to reflect the committed changes.
kwk added a subscriber: kwk.Mar 2 2021, 4:02 PM

@jankratochvil out of curiosity. Can you give a pointer to what the C program looks like that produces the object code? I know GCC might change and no longer produce this code so it's better to have the obj code instead. But still I'm not nearly close to understanding

In D97721#2598798, @kwk wrote:

@jankratochvil out of curiosity. Can you give a pointer to what the C program looks like that produces the object code?

int main() {}
Fedora Rawhide: gcc -o main.s main.c -gdwarf-5 -S -gno-as-loc-support -dA

But it is hand edited, Besides DWARF simplification I removed the .text assembly instructions (and put .long 0 there) to make it arch-independent which was my original intention. But then I remember the DWARF assembly is not fully arch-independent anyway so to prevent some false failures in buildbots again I kept there that # REQUIRES: x86 anyway. One could try to remove the REQUIRES if one really wanted to test the bots. Still I am not sure if it did not cause any buildbots failure as the buildbots are down these days, incl. Apple Green Bot.