[Bug debug/82509] DW_AT_endianity issues with attribute scalar_storage_order
peeterjoot at protonmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Oct 13 12:04:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82509
--- Comment #4 from Peeter Joot <peeterjoot at protonmail dot com> ---
Here's the debug session that shows the compiler+debugger stack playing nicely
together:
(gdb) n
40 int cb = memcmp( &b, &n, sizeof( b ) );
(gdb) p bt
$1 = {v = 3, a = {1, 2, 3, 4}}
(gdb) p b
$2 = {v = 3, a = {1, 2, 3, 4}}
(gdb) p n
$3 = {v = 3, a = {1, 2, 3, 4}}
(gdb) p lt
$4 = {v = 3, a = {1, 2, 3, 4}}
(gdb) p l
$5 = {v = 3, a = {1, 2, 3, 4}}
(gdb) p bt.v = 4
$6 = 4
(gdb) p bt
$7 = {v = 4, a = {1, 2, 3, 4}}
(gdb) x/4x &bt
0x7fffffffd32c: 0x04000000 0x02000100 0x04000300 0x00000000
(gdb) x/4x <
0x7fffffffd308: 0x00000003 0x00020001 0x00040003 0x00000003
(gdb) q
This uses your patch to gcc, plus the following patch to gdb:
https://sourceware.org/ml/gdb-patches/2017-10/msg00266.html
More information about the Gcc-bugs
mailing list