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: unassignedb...@nondot.org
Reporter: ys114...@gmail.com
CC: llvm-bugs@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@devbig474.prn1 ~/work/debug_llvm/dwarf] cat test.c
int test(int *p) {
*p = 2;
return 1;
}
[yhs@devbig474.prn1 ~/work/debug_llvm/dwarf] clang -g -target bpf -O2 -c test.c
[yhs@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@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@devbig474.prn1 ~/work/debug_llvm/dwarf]
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs