This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
GDB 7.12.1 on Gentoo's x32 profile: Can't debug 64-bit process with 32-bit GDB
- From: Daniel Santos <daniel dot santos at pobox dot com>
- To: binutils <binutils at sourceware dot org>
- Date: Mon, 14 Aug 2017 21:20:19 -0500
- Subject: GDB 7.12.1 on Gentoo's x32 profile: Can't debug 64-bit process with 32-bit GDB
- Authentication-results: sourceware.org; auth=none
The gentoo ebuild *appears* to be configuring gdb correctly for multitarget:
configure --prefix=/usr --build=x86_64-pc-linux-gnux32
--host=x86_64-pc-linux-gnux32 --target=x86_64-pc-linux-gnux32
--mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share
--sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/libx32
--with-pkgversion=Gentoo 7.12.1 vanilla
--with-bugurl=https://bugs.gentoo.org/ --disable-werror
--disable-binutils --disable-etc --disable-gas --disable-gold
--disable-gprof --disable-ld --enable-gdbserver=auto --enable-64-bit-bfd
--disable-install-libbfd --disable-install-libiberty --without-guile
--disable-readline --with-system-readline --without-zlib
--with-system-zlib --with-separate-debug-dir=/usr/lib/debug
--without-expat --with-lzma --enable-nls --enable-targets=all
--with-python=python3.4
But trying to debug an executable built with -m64 produces the message
"Can't debug 64-bit process with 32-bit GDB" from
x86_linux_read_description() in x86-linux-nat.c. Is this the intended
behaviour? If one needs to debug 32, 64 and x32 executables, does gdb
simply require that you build a 64-bit version with --enable-targets=all?
I've opened a Gentoo bug for this:
https://bugs.gentoo.org/show_bug.cgi?id=627898 , but there is a
sourceware outage right now, so I can't get into bugzilla or update my
git repo.
Thanks,
Daniel