[Bug cli/33189] New: Incorrect sizeof(long) output on x86_64-pc-linux-gnu
sam at gentoo dot org
sourceware-bugzilla@sourceware.org
Sun Jul 20 18:52:45 GMT 2025
https://sourceware.org/bugzilla/show_bug.cgi?id=33189
Bug ID: 33189
Summary: Incorrect sizeof(long) output on x86_64-pc-linux-gnu
Product: gdb
Version: unknown
Status: NEW
Severity: normal
Priority: P2
Component: cli
Assignee: unassigned at sourceware dot org
Reporter: sam at gentoo dot org
Target Milestone: ---
On x86_64-pc-linux-gnu, I see:
```
$ gdb
(gdb) p sizeof(long)
$1 = 4
```
which is incorrect.
If I load a file, everything's then fine:
```
(gdb) file /bin/bash
Reading symbols from /bin/bash...
Reading symbols from /usr/lib/debug/usr/bin/bash.debug...
(gdb) p sizeof(long)
$2 = 8
```
```
$ gdb --version
GNU gdb (Gentoo 9999 vanilla) 17.0.50.20250720-git
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
```
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Gdb-prs
mailing list