[llvm-bugs] [Bug 32932] New: Debug information not processed if llvm-objdump reads input from standard input
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu May 4 22:10:11 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=32932
Bug ID: 32932
Summary: Debug information not processed if llvm-objdump reads
input from standard input
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: ys114321 at gmail.com
CC: llvm-bugs at lists.llvm.org
When I tried to write a C based unit test for one of BPF changes, I encountered
a problem where llvm-objdump does not process debug information in the .o file
properly. The following procedure can demonstrate the problem.
[yhs at devbig474.prn1 ~/work/debug_llvm/dwarf] cat test.c
int test(int *p) {
*p = 2;
return 1;
}
[yhs at devbig474.prn1 ~/work/debug_llvm/dwarf] clang -g -target bpf -O2 -c test.c
[yhs at devbig474.prn1 ~/work/debug_llvm/dwarf] llvm-objdump -S test.o
test.o: file format ELF64-BPF
Disassembly of section .text:
test:
; int test(int *p) {
0: b7 02 00 00 02 00 00 00 r2 = 2
; *p = 2;
1: 63 21 00 00 00 00 00 00 *(u32 *)(r1 + 0) = r2
; return 1;
2: b7 00 00 00 01 00 00 00 r0 = 1
3: 95 00 00 00 00 00 00 00 exit
[yhs at devbig474.prn1 ~/work/debug_llvm/dwarf] llvm-objdump -S - < test.o
<stdin>: file format ELF64-BPF
Disassembly of section .text:
test:
0: b7 02 00 00 02 00 00 00 r2 = 2
1: 63 21 00 00 00 00 00 00 *(u32 *)(r1 + 0) = r2
2: b7 00 00 00 01 00 00 00 r0 = 1
3: 95 00 00 00 00 00 00 00 exit
[yhs at devbig474.prn1 ~/work/debug_llvm/dwarf]
--
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/20170505/5dc8e3f8/attachment.html>
More information about the llvm-bugs
mailing list