[llvm-bugs] [Bug 38990] New: llvm-dwarfdump doesn't apply Split DWARF cu_index for debug_loc.dwo
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Sep 18 17:53:06 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38990
Bug ID: 38990
Summary: llvm-dwarfdump doesn't apply Split DWARF cu_index for
debug_loc.dwo
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: DebugInfo
Assignee: Wolfgang_Pieb at playstation.sony.com
Reporter: dblaikie at gmail.com
CC: llvm-bugs at lists.llvm.org
Created attachment 20888
--> https://bugs.llvm.org/attachment.cgi?id=20888&action=edit
Incomplete patch
Dumping large dwps produces a bunch of parse failures on debug_loc because the
cu_index entry for debug_loc is not accounted for when parsing the debug_loc
section.
While this example doesn't produce the error message, it does show the bug:
a.cpp:
void y();
void a(int i) {
y();
asm("" : : : "rdi");
}
b.cpp:
void b(int i) { asm("" : : : "rdi"); }
$ clang++-tot -gsplit-dwarf a.cpp b.cpp -c -O1 && llvm-dwp a.dwo b.dwo -o
ab.dwp && llvm-dwarfdump-tot ab.dwp | grep RDI
Addr idx 0 (w/ length 6): DW_OP_reg5 RDI)
Addr idx 0 (w/ length 6): DW_OP_reg5 RDI)
But run each .dwo file individually through dwarfdump:
$ llvm-dwarfdump-tot a.dwo b.dwo | grep RDI
Addr idx 0 (w/ length 6): DW_OP_reg5 RDI)
Addr idx 0 (w/ length 0): DW_OP_reg5 RDI)
Note the difference in length of these location list entries. This shows that
when dumping b.cpp's CU in ab.dwp, it's reading a.cpp's location list instead
of b.cpp's.
I've attached half a patch that was meant to start plumbing this through. It
isn't quite tied into the actual index lookup/offset yet - in part because of
some issues with the design there, that I'll file in a separate couple of bugs.
There's some other cleanup in this patch too - welcome to commit those parts,
or undo them, etc.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180919/8b414468/attachment.html>
More information about the llvm-bugs
mailing list