[llvm-bugs] [Bug 39724] New: [DebugInfo] Arguments are lost after a call across TUs
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Nov 20 09:28:33 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=39724
Bug ID: 39724
Summary: [DebugInfo] Arguments are lost after a call across TUs
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: DebugInfo
Assignee: unassignedbugs at nondot.org
Reporter: davide at freebsd.org
CC: aprantl at apple.com, friss at apple.com,
jdevlieghere at apple.com, keith.walker at arm.com,
llvm-bugs at lists.llvm.org,
paul_robinson at playstation.sony.com, rnk at google.com,
vk at vedantk.com, vsk at apple.com, zturner at google.com
Testcase (two TUs):
a.c:
extern void other_func(long int, long int, long int);
__attribute__((noinline))
int fn1 (long int x, long int y, long int z) {
int l = x * 2;
int q = y * z;
other_func(x, y, z);
return l + q;
}
__attribute__((noinline)) long int
fn2 (long int a, long int b, long int c)
{
long int q = 2 * a;
return fn1 (5, 6, 7);
}
int main(void) {
return fn2(14, 23, 34);
}
b.c:
void other_func(long int a, long int b, long int c) {}
built with: ${CC} a.c b.c -O3 -g
clang + lldb:
Process 38226 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x0000000100000f64 a.out`fn1(x=5, y=<unavailable>,
z=<unavailable>) at optout.c:8:12 [opt]
5 int l = x * 2;
6 int q = y * z;
7 other_func(x, y, z);
-> 8 return l + q;
9 }
10
11 __attribute__((noinline)) long int
(lldb) frame var
(long) x = 5
(long) y = <variable not available>
(long) z = <variable not available>
(int) q = 42
(int) l = <no location, value may have been optimized out>
gcc + gdb:
fn1 (x=x at entry=5, y=y at entry=6, z=z at entry=7) at opt.c:5
5 int l = x * 2;
(gdb) n
7 other_func(x, y, z);
(gdb) n
8 return l + q;
(gdb) info locals
l = 10
q = 42
(gdb) info args
x = 5
y = 6
z = 7
--
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/20181120/1d682296/attachment.html>
More information about the llvm-bugs
mailing list