Why does gdb tell me a pointer is 4 bytes on x86-64?

Viewed 1898

Seen with gdb on openSUSE, CentOS, Fedora, and Ubuntu:

This gdb was configured as "x86_64-unknown-linux-gnu".

(gdb) p sizeof(void *)

$1 = 4

(gdb) p sizeof(long)

$2 = 4

Why is gdb giving me the wrong answers on all of my 64-bit systems?

1 Answers
Related