[PATCH] D49426: [DEBUG_INFO] fix .loc directives emitted for missing prologues

Tom Weaver via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 17 10:27:58 PDT 2018


TWeaver added a comment.

In https://reviews.llvm.org/D49426#1165146, @dblaikie wrote:

> Could you provide a small example dump of the invalid line table you're addressing?


Hi David,

thanks for your review.

I built a pre-patch version of clang and recompiled the source in the test (which I've updated as was out of date).

I fed the resulting .elf into dwarfdump with -l and got the following output:

root at clangbox-VirtualBox:~/dev/clang/lldb_release/bin# dwarfdump -l leafCall.elf

.debug_line: line number info for a single cu
Source lines (from CU-DIE at .debug_info offset 0x0000000b):

  NS new statement, BB new basic block, ET end of text sequence
  PE prologue end, EB epilogue begin
  IS=val ISA number, DI=val discriminator value

<pc>        [lno,col] NS BB ET PE EB IS= DI= uri: "filepath"
0x00400480  [   2, 0] NS uri: "/home/clangbox/dev/clang/lldb_release/bin/./leafCall.cpp"
0x00400480  [   3, 3] NS PE
0x00400490  [   7, 0] NS
0x00400490  [   8, 3] NS PE
0x00400496  [   8, 3] NS ET

You can see there's two sets of two line entries (one for each function) where a single instruction is mapped to two different source lines.


https://reviews.llvm.org/D49426





More information about the llvm-commits mailing list