This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/22878] New: gdb prints address instead of value for std::chrono::time_point::time_since_epoch
- From: "sourceware-bugzilla at zulan dot net" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Thu, 22 Feb 2018 18:29:09 +0000
- Subject: [Bug gdb/22878] New: gdb prints address instead of value for std::chrono::time_point::time_since_epoch
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=22878
Bug ID: 22878
Summary: gdb prints address instead of value for
std::chrono::time_point::time_since_epoch
Product: gdb
Version: HEAD
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: sourceware-bugzilla at zulan dot net
Target Milestone: ---
Created attachment 10842
--> https://sourceware.org/bugzilla/attachment.cgi?id=10842&action=edit
minimal example to reproduce
In certain situations when calling a function involving std::chrono, gdb will
print addresses from the stack or code segment instead of the actual value.
GNU gdb (GDB) 8.1.50.20180222-git [snip]
(gdb) break test.cpp:13
Breakpoint 1 at 0xa2b: file test.cpp, line 13.
(gdb) run
Starting program: ./test
1519324049580340957
1519324049580340957
Breakpoint 1, main () at test.cpp:13
13 return 0;
(gdb) p tp
$1 = {__d = {__r = 1519324049580340957}}
(gdb) p tp.__d
$2 = {__r = 1519324049580340957}
(gdb) p tp.time_since_epoch()
$3 = {__r = 93824992234325}
(gdb) p tp.time_since_epoch().count()
$4 = 93824992234325
(gdb) p wtf(tp)
$5 = 140737488348072
(gdb) p (long)(&tp)
$6 = 140737488348072
--
You are receiving this mail because:
You are on the CC list for the bug.