I'm trying to debug a 64-bit program, but gdb seems to believe that it has an i386 architecture.
# file /usr/local/bin/foo /usr/local/bin/foo: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.4.0, not stripped
Pay attention to the warning:
warning: Selected architecture i386:x86-64 is not compatible with reported target architecture i386
and then:
gdbarch_find_by_info: Target rejected architecture gdbarch_update_p: Architecture not found warning: Architecture rejected target-supplied description
In gdb, if I type 'set architecture' and hit tab, I see the following:
(gdb) set architecture auto i386:intel i386:x64-32:intel i386:x86-64:intel i386 i386:x64-32 i386:x86-64 i8086
My question is: why does gdb believe that my file has an i386 architecture, although this is obviously an x86-64 binary, and what can I do to fix it?
My program was compiled using FreePascal version 2.6.0.
UPDATE: I am not getting any warnings using the same gdb binary and the same purepascal binary on my Ubuntu 12.04 machine (with kernel 3.2.0-31). The server I'm trying to debug on is starting the 2.6.34.10-24 kernel. Can something be configured incorrectly in the kernel or on the server, which will affect gdb?
source share