[llvm-bugs] [Bug 45775] New: Differences in DWARF line number info between directly generated and assembled object files
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri May 1 17:47:45 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45775
Bug ID: 45775
Summary: Differences in DWARF line number info between directly
generated and assembled object files
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: LLVM assembly language parser
Assignee: unassignedbugs at nondot.org
Reporter: Wolfgang_Pieb at playstation.sony.com
CC: llvm-bugs at lists.llvm.org
The following source, when compiled directly to an object file vs. when first
compiled to an assembly file, and then assembled, produces different line
number information.
struct Ctx
{
int m1;
int m2;
};
static Ctx States[2] =
{
{0, 1}, {2, 3}
};
int getType(struct s* myS);
int foo(struct s* myS)
{
int type = getType(myS);
if (type != -1) {
return States[type].m2;
}
return 0;
}
The difference can be demonstrated with the following script:
#!/bin/sh
clang -g -O2 -c test.cpp -o test.o
clang -g -O2 -S test.cpp -o test.s
clang -g -c test.s -o test.assembled.o
objdump -WliarfsoR test.o > 1
objdump -WliarfsoR test.assembled.o > 2
diff 1 2
I'm seeing the following differences:
265c237
< Length: 87
---
> Length: 88
319,322c291,295
< [0x00000053] Advance Line by 20 to 20
< [0x00000055] Special opcode 33: advance Address by 2 to 0x18 and Line by 0
to 20
< [0x00000056] Advance PC by 2 to 0x1a
< [0x00000058] Extended opcode 1: End of Sequence
---
> [0x00000053] Set is_stmt to 1
> [0x00000054] Advance Line by 20 to 20
> [0x00000056] Special opcode 33: advance Address by 2 to 0x18 and Line by 0 to 20
> [0x00000057] Advance PC by 2 to 0x1a
> [0x00000059] Extended opcode 1: End of Sequence
--
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/20200502/bb0ce3a3/attachment.html>
More information about the llvm-bugs
mailing list