public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/30318] New: GDB showing outdate value even though DWARF has a new value.
@ 2023-04-06 3:03 hluaw at connect dot ust.hk
2023-04-06 17:58 ` [Bug gdb/30318] " hluaw at connect dot ust.hk
0 siblings, 1 reply; 2+ messages in thread
From: hluaw at connect dot ust.hk @ 2023-04-06 3:03 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30318
Bug ID: 30318
Summary: GDB showing outdate value even though DWARF has a new
value.
Product: gdb
Version: 13.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: hluaw at connect dot ust.hk
Target Milestone: ---
Given the following code:
#include "stdint.h"
int a, b;
int func_17() {
int32_t *l_26 = 0;
int32_t **c = &l_26;
*c = &a;
b = 0;
return a;
}
int main() { func_17(); }
Compiled with gcc 12.2.0 with -O2 and -g
For l_26 the DWARF says:
(gdb) info addr l_26
Symbol "l_26" is multi-location:
Base address 0x401020 Range 0x401020-0x401020: the constant 0
Range 0x401020-0x40102a: a complex DWARF expression:
0: DW_OP_addr 0x404030
9: DW_OP_stack_value
(gdb) p $pc
$2 = (void (*)()) 0x401020 <main>
(gdb) p l_26
$3 = (int32_t *) 0x0
Though $pc is at the inclusive beginning of a valid range, gdb still says it's
zero.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug gdb/30318] GDB showing outdate value even though DWARF has a new value.
2023-04-06 3:03 [Bug gdb/30318] New: GDB showing outdate value even though DWARF has a new value hluaw at connect dot ust.hk
@ 2023-04-06 17:58 ` hluaw at connect dot ust.hk
0 siblings, 0 replies; 2+ messages in thread
From: hluaw at connect dot ust.hk @ 2023-04-06 17:58 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30318
LU Hongyi <hluaw at connect dot ust.hk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from LU Hongyi <hluaw at connect dot ust.hk> ---
It seems the same issue as 28987, sorry for the duplicate.
*** This bug has been marked as a duplicate of bug 28987 ***
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-06 17:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-06 3:03 [Bug gdb/30318] New: GDB showing outdate value even though DWARF has a new value hluaw at connect dot ust.hk
2023-04-06 17:58 ` [Bug gdb/30318] " hluaw at connect dot ust.hk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).