This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/22501] New: Incorrect sizeof(symbol) == 4 on a 64-bit platform
- From: "bugzilla at tecnocode dot co.uk" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 27 Nov 2017 11:27:13 +0000
- Subject: [Bug gdb/22501] New: Incorrect sizeof(symbol) == 4 on a 64-bit platform
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=22501
Bug ID: 22501
Summary: Incorrect sizeof(symbol) == 4 on a 64-bit platform
Product: gdb
Version: 7.12
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: bugzilla at tecnocode dot co.uk
Target Milestone: ---
If I compile GLib normally on a 64-bit platform, without CFLAGS=-g, run a test
program, and `print sizeof(__glib_assert_msg)`, gdb (incorrectly) tells me it’s
4 bytes: However, it’s a char*, and its size according to objdump is
(correctly) 8 bytes:
(gdb) print sizeof(__glib_assert_msg)
$1 = 4
(gdb) print sizeof(char*)
$2 = 8
objdump -t ./glib/.libs/libglib-2.0.so.0.5400.2 | grep assert_msg
000000000032c3e0 g O .bss 0000000000000008
__glib_assert_msg
No debug information is being loaded while running gdb:
(gdb) info sharedlibrary
>From To Syms Read Shared Object Library
0x00007ffff7dd9aa0 0x00007ffff7df51b0 Yes /lib64/ld-linux-x86-64.so.2
0x00007ffff7ac6e90 0x00007ffff7b5ae90 Yes (*)
/tmp/build-snapshot.Ry9JWQsWNS/s/glib/.libs/libglib-2.0.so.0
0x00007ffff772c910 0x00007ffff7856423 Yes
/lib/x86_64-linux-gnu/libc.so.6
0x00007ffff749b5d0 0x00007ffff74edab1 Yes (*)
/lib/x86_64-linux-gnu/libpcre.so.3
0x00007ffff7282ab0 0x00007ffff728f811 Yes
/lib/x86_64-linux-gnu/libpthread.so.0
(*): Shared library is missing debugging information.
I can provide other information if needed.
---
This looks similar to bug #12281. The downstream GLib bug which triggered this
is https://bugzilla.gnome.org/show_bug.cgi?id=782057.
--
You are receiving this mail because:
You are on the CC list for the bug.