This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/21222] A function with a particular number of arguments corrupts a value calculated on the stack when stepping through the function
- From: "keiths at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 10 Mar 2017 20:55:57 +0000
- Subject: [Bug c++/21222] A function with a particular number of arguments corrupts a value calculated on the stack when stepping through the function
- Auto-submitted: auto-generated
- References: <bug-21222-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21222
--- Comment #7 from Keith Seitz <keiths at redhat dot com> ---
As you note, this is likely a display problem.
So the next question is, what does "info addr lambda" say? I wonder if the
debug info is incorrect.
On my system (which does not support VEX):
12 float lambda = C_LIGHT / f;
(gdb) n
13 printf("lambda = %f\n", lambda);
(gdb) p lambda
$1 = 0.031557098
(gdb) info addr lambda
Symbol "lambda" is a complex DWARF expression:
0: DW_OP_fbreg -20
.
(gdb) inf frame
Stack level 0, frame at 0x7fffffffd990:
rip = 0x400679 in testFunc (21222.cc:13); saved rip = 0x4006dd
called by frame at 0x7fffffffd9d0
source language c++.
Arglist at 0x7fffffffd980, args: a=0x0, n=0, sx=0x0, sy=0x0, rc=0x0, nr=0,
b=4, f=9.50000026e+09, c=0x0, d=0x0, e=0x0, gx=0x0, gy=0x0
Locals at 0x7fffffffd980, Previous frame's sp is 0x7fffffffd990
Saved registers:
rbp at 0x7fffffffd980, rip at 0x7fffffffd988
(gdb) p *(float*)(0x7fffffffd990-20)
$2 = 0.031557098
What compiler/version are you using?
--
You are receiving this mail because:
You are on the CC list for the bug.