GDB SIGSEGV with 32 binaries on 10.1-amd64
Roman Naumann
roman.naumann at fu-berlin.de
Mon Jan 5 16:06:07 UTC 2015
Hi,
I noticed the GNU Debugger (GDB) seems to be unable to debug 32 bit binaries
on the FreeBSD amd64 platform.
A simple example gives a SIGSEGV when running the binaries in GDB, as shown below.
GDB 7.8 shows a warning. GDB 6.1 just reports the signal.
There exists a /libexec/ld-elf32.so.1, but I cannot figure out how to
make gdb use it. Maybe it will not fix the issue even if gdb uses this
library.
Ideas and hints much appreciated.
Best regards,
Roman
-- checked so far:
-> /usr/lib32 exists
-> recompile gdb7 from ports instead of using pkg
-- system:
FreeBSD bulldozer.local 10.1-RELEASE FreeBSD 10.1-RELEASE #3 r275043M:
Tue Nov 25 16:52:35 CET 2014
namor at bulldozer.local:/usr/obj/usr/src/sys/GENERIC amd64
-- how to reproduce:
[namor at bulldozer ~]$ cat test2.c
int main()
{
return 0;
}
[namor at bulldozer ~]$ gcc -m32 -o test2 test2.c
[namor at bulldozer ~]$ gdb test2
[namor at bulldozer ~]$ gdb78 test2
GNU gdb (GDB) 7.8 [GDB v7.8 for FreeBSD]
(...)
(gdb) run
Starting program: /grave/home/namor/test2
warning: `/libexec/ld-elf.so.1': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
warning: `/libexec/ld-elf.so.1': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
Program received signal SIGSEGV, Segmentation fault.
0x000004e3 in ?? ()
More information about the freebsd-questions
mailing list