[PATCH] D96678: [llvm-dwp] Join dwo paths correctly when DWOPath is absolute

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 11:55:17 PST 2021


dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.

Sounds good, thanks for walking me through it.

(as a heads up: llvm-dwp isn't great (I wrote it years ago to mitigate some risk with binutils dwp memory usage which ended up being resolved otherwise) - specifically I don't think it's ever been used in any production use case that I know of, has I believe significantly worse runtime/memory usage than binutils/gold dwp and while neither supports DWARFv5, I do have some patches I need to upstream to add DWARFv5 support for binutils/gold dwp

At some point llvm-dwp probably will be/needs to be rewritten, probably using some of lld's infrastructure (in a similar way to binutils/gold dwp uses some gold infrastructure) to reduce overheads.

But small patches with tests like this aren't too bad and the tests will ensure we preserve the functionality during any such rewrite in the future)



================
Comment at: llvm/test/tools/llvm-dwp/X86/absolute_paths.test:8-15
+; CHECK-LABEL: .debug_abbrev.dwo contents:
+; CHECK: DW_AT_name
+; CHECK: DW_AT_GNU_dwo_name
+; CHECK: DW_AT_name
+; CHECK-LABEL: .debug_str.dwo contents:
+; CHECK: "banana"
+; CHECK: "/tmp/test.c"
----------------
Maybe only dump/test the debug_info section ( `llvm-dwarfdump %t/test.dwp` should do that, only dumping the debug_info section by default) and check DW_AT_subprogram has a DW_AT_name of "banana" - would check this specific dwo file was included in the dwp (& indirectly exercises a bunch of other functionality, like index usage, strings, abbreviations, etc).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96678/new/

https://reviews.llvm.org/D96678



More information about the llvm-commits mailing list