Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 627898 - sys-devel/gdb-7.12.1 ABI_X86=x32, USE=multitarget "Can't debug 64-bit process with 32-bit GDB"
Summary: sys-devel/gdb-7.12.1 ABI_X86=x32, USE=multitarget "Can't debug 64-bit process...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: x32
  Show dependency tree
 
Reported: 2017-08-15 01:50 UTC by Daniel Santos
Modified: 2020-03-25 23:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Santos 2017-08-15 01:50:07 UTC
I'm guessing this is an upstream bug because the configure from the ebuild log does contain --enable-targets=all, yet when I attempt to debug an executable built with -m64, I get this:


/home/daniel/proj/sys/gcc/builds/pr80969/gcc/testsuite/gcc
(daniel@goodenough-vm1)$ /home/daniel/proj/sys/gcc/builds/pr80969/gcc/xgcc -B/home/daniel/proj/sys/gcc/builds/pr80969/gcc/ /home/daniel/proj/sys/gcc/git/gcc/testsuite/gcc.target/i386/pr80969-2.c -Ofast -mabi=ms -mavx512f -lm -o ./pr80969-2.exe && gdb ./pr80969-2.exe
GNU gdb (Gentoo 7.12.1 vanilla) 7.12.1
Copyright (C) 2017 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.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnux32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./pr80969-2.exe...done.
(gdb) run
Starting program: /home/daniel/proj/sys/gcc/builds/pr80969/gcc/testsuite/gcc/pr80969-2.exe
Can't debug 64-bit process with 32-bit GDB
(gdb)

I can disassemble, examine the registers and all, I just can't resolve debug symbols, get a clean backtrace or run/step.


Here's the full configure command in ebuild log:

./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


$ emerge --info sys-devel/gdb
Portage 2.3.6 (python 3.4.5-final-0, default/linux/amd64/13.0/x32, gcc-5.4.0, glibc-2.23-r4, 4.9.39-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.9.39-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5450_@_3.00GHz-with-gentoo-2.3
KiB Mem:    32945300 total,    245608 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Sat, 12 Aug 2017 19:30:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.28 p1.2) 2.28
distcc 3.2rc1 x86_64-pc-linux-gnux32 [disabled]
ccache version 3.2.4 [disabled]
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/ccache:          3.2.4::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.28::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.15-r2::gentoo
sys-devel/binutils:       2.28-r2::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo, 6.4.0::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

happy-vm1-local
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnux32"
CFLAGS="-march=nocona -mcx16 -msahf -mfxsr -mtune=native -O2 -ggdb"
CHOST="x86_64-pc-linux-gnux32"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=nocona -mcx16 -msahf -mfxsr -mtune=native -O2 -ggdb"
DISTDIR="/home/distfiles"
EMERGE_DEFAULT_OPTS="-j3 --load-average=11 --with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg candy cgroup compress-build-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles installsources merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms split-elog split-log splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://gentoo.mirrors.tds.net/gentoo rsync://rsync.gtlib.gatech.edu/gentoo rsync://gentoo.cs.uni.edu/gentoo-distfiles"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8 --load-average=8.75"
PKGDIR="/home/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/tmp"
USE="acl aio amd64 berkdb bindist bzip2 cdda cddb cdio clang cli cmake cracklib crypt cx16 cxx dbus designer device-mapper dri fluidsynth fortran fuse fxsr gdbm git glamor hardened highlight iconv icu ipv6 jpeg2k lzma lzo midi mmx modules mtp multicall multilib multitarget natspec ncurses nls nptl objc objc++ objc-gc openmp pam pcre perl projectm rar readline sahf sasl savedconfig seccomp session sid smp snappy spice sqlite sse sse2 sse3 ssl static-libs subversion svg syslog systemtap tcpd threads tty-helpers unicode valgrind vim-syntax virtio xattr xen zeroconf zlib" ABI_X86="x32 64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx sse sse2 sse3 cx16 sahf fxsr" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="coreboot efi emu multiboot qemu pc" INPUT_DEVICES="keyboard mouse joystick evdev vmmouse" KERNEL="linux" L10N="en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_US en" LLVM_TARGETS="AMDGPU ARM BPF NVPTX Mips X86" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="aarch64 arm armeb i386 m68k mips mips64 mips64el mipsel mipsn32 mipsn32el ppc ppc64 ppc64abi32 ppc64le x86_64" QEMU_USER_TARGETS="aarch64 arm armeb i386 m68k mips mips64 mips64el mipsel mipsn32 mipsn32el ppc ppc64 ppc64abi32 ppc64le x86_64" RUBY_TARGETS="ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="intel radeon vesa qxl vmware" XFCE_PLUGINS="brightness clock trash" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

sys-devel/gdb-7.12.1::gentoo was built with the following:
USE="client lzma multitarget nls python server -test -vanilla -xml" ABI_X86="(x32)" PYTHON_SINGLE_TARGET="python3_4 -python2_7 (-python3_5)" PYTHON_TARGETS="python2_7 python3_4 (-python3_5)"
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2019-11-20 00:10:36 UTC
Is it still an issue?
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-03-25 23:02:35 UTC
Closing as obsolete.