[llvm-dev] Dwarf debugging information lost

Muhui Jiang via llvm-dev llvm-dev at lists.llvm.org
Tue Jan 22 04:59:53 PST 2019


Hi

Below is a snippet of binary codes and the binary is compiled by clang with
flag gdwarf-3. It is easy to see  that 0x912c is an indirect jump and
instruction 0x9128 and 0x912c would be together as a basic block

.text:0000911C loc_911C                                ; CODE XREF:
main+7F4 j
.text:0000911C                 SUB             R0, R0, #1
.text:00009120                 CMP             R0, #3  ; switch 4 cases
.text:00009124                 BHI             loc_9218 ; jumptable
0000912C default case
.text:00009128                 ADR             R1, off_9130
.text:0000912C                 LDR             PC, [R1,R0,LSL#2] ; switch
jump
.text:00009130 off_9130        DCD loc_9778            ; DATA XREF:
main+818 o
.text:00009130                 DCD loc_9108            ; jump table for
switch statement
.text:00009130                 DCD loc_9778
.text:00009130                 DCD loc_9140

I use llvm-dwarfdump -debug-line to dump the debug information. However, I
find the related output below.0x912c is not described while the line of
0x9128 is zero, which does not help.

  542 0x0000000000009108      0      0      3   0             0
  543 0x000000000000911c    474      4      3   0             0
  544 0x0000000000009128      0      4      3   0             0
  545 0x0000000000009140    511     45      3   0             0  is_stmt

I find nearly all the instructions that are indirect jumps would not be
described by the dwarf debugging information. Anyone know the reason? Any
comments or suggestions are welcome. Many Thanks

Regards
Muhui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190122/dfcb1d46/attachment-0001.html>


More information about the llvm-dev mailing list