Package: gdb-multiarch Version: 7.6-5 Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu ubuntu-patch saucy
Ubuntu bug: https://launchpad.net/bugs/1233185 Hello, I use gdb-multiarch with Apport to be able to produce symbolic stack traces for i386/amd64/armhf/powerpc crash reports on an amd64 machine. This has worked fine until about a year ago (in Ubuntu we enabled gdb-multiarch a bit before Debian did), but broke since then. Current gdb-multiarch is unable to do anything sensible with ARM coredumps, while gdb itself works. This even happens when running gdb-multiarch on an actual ARM machine, not just on a "foreign" architecture. Test case: 1. create a core dump of bash: $ cd /tmp/ $ bash -c 'ulimit -c unlimited; kill -SEGV $$' 2. Run it with gdb: $ gdb --batch --ex 'file /bin/bash' --ex 'core-file core' --ex 'bt' Core was generated by `bash -c ulimit -c unlimited; kill -SEGV $$'. Program terminated with signal 11, Segmentation fault. #0 0x00007f2eae349257 in kill () at ../sysdeps/unix/syscall-template.S:8181 ../sysdeps/unix/syscall-template.S: Datei oder Verzeichnis nicht gefunden. #0 0x00007f2eae349257 in kill () at ../sysdeps/unix/syscall-template.S:81 #1 0x00000000004418a1 in kill_pid () [...] There are not a lot of symbols as usually one doesn't have bash-dbg etc. installed, but it's clearly able to produce a stack trace. 3. Run the same with gdb-multiarch: $ gdb-multiarch --batch --ex 'file /bin/bash' --ex 'core-file core' --ex 'bt' warning: wrong size gregset struct in core file Core was generated by `bash -c ulimit -c unlimited; kill -SEGV $$'. Program terminated with signal 11, Segmentation fault. warning: wrong size gregset struct in core file #0 <unavailable> in ?? () #0 <unavailable> in ?? () PC not available The same test case on amd64 works fine BTW, i. e. gdb-multiarch can process amd64 core dump on amd64. I bisected this down to the change of configuring gdb-multiarch from --enable-targets=<long explicit list of targets> to --enable-targets=all. As a bandaid we could revert this change at least temporarily, as in attached debdiff. The suspicion is that some other target that gets added with "all" which is not in the static list somehow breaks arm-linux. So one could bisect all targets to find out which particular one (or several?) it is, and then just patch that one out of the Makefiles. It certainly seems more important to support linux than, say, debugging Solaris crashes on Linux. Thanks for considering, Martin -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
diff -Nru gdb-7.6/debian/changelog gdb-7.6/debian/changelog --- gdb-7.6/debian/changelog 2013-07-30 09:37:24.000000000 +0200 +++ gdb-7.6/debian/changelog 2013-09-30 17:55:08.000000000 +0200 @@ -1,3 +1,11 @@ +gdb (7.6-5ubuntu3) saucy; urgency=low + + * debian/rules: Revert configuring with "MULTIARCH_TARGET=all" and go back + to static list of targets. "all" is broken and does not work at least on + ARM. (LP: #1233185) + + -- Martin Pitt <martin.p...@ubuntu.com> Mon, 30 Sep 2013 17:54:20 +0200 + gdb (7.6-5ubuntu2) saucy; urgency=low * Re-apply changes dropped in last merge: diff -Nru gdb-7.6/debian/rules gdb-7.6/debian/rules --- gdb-7.6/debian/rules 2013-07-28 11:39:02.000000000 +0200 +++ gdb-7.6/debian/rules 2013-10-01 10:26:06.000000000 +0200 @@ -137,38 +137,40 @@ # multiarch targets; this is taken from the binutils-multiarch package but # doesn't seem like a terribly nice list; see # <20110117211551.ga7...@bee.dooz.org> for discussion -- locally updated -#MULTIARCH_TARGETS := \ -# alpha-linux-gnu \ -# arm-linux-gnu \ -# arm-linux-gnueabi \ -# arm-linux-gnueabihf \ -# hppa-linux-gnu \ -# i686-linux-gnu \ -# ia64-linux-gnu \ -# m68k-linux-gnu \ -# m68k-rtems \ -# mips-linux-gnu \ -# mipsel-linux-gnu \ -# mips64-linux-gnu \ -# mips64el-linux-gnu \ -# powerpc-linux-gnu \ -# powerpcspe-linux-gnu \ -# ppc64-linux-gnu \ -# s390-linux-gnu \ -# s390x-linux-gnu \ -# sh-linux-gnu \ -# sh64-linux-gnu \ -# sparc-linux-gnu \ -# sparc64-linux-gnu \ -# x86_64-linux-gnu \ -# m32r-linux-gnu \ -# spu -# --enable-targets=`set -- $(MULTIARCH_TARGETS); IFS=,; echo "$$*"` -MULTIARCH_TARGETS := all +MULTIARCH_TARGETS := \ + alpha-linux-gnu \ + aarch64-linux-gnu \ + arm-linux-gnu \ + arm-linux-gnueabi \ + arm-linux-gnueabihf \ + hppa-linux-gnu \ + i686-linux-gnu \ + ia64-linux-gnu \ + m68k-linux-gnu \ + m68k-rtems \ + mips-linux-gnu \ + mipsel-linux-gnu \ + mips64-linux-gnu \ + mips64el-linux-gnu \ + powerpc-linux-gnu \ + ppc64-linux-gnu \ + s390-linux-gnu \ + s390x-linux-gnu \ + sh-linux-gnu \ + sh64-linux-gnu \ + sparc-linux-gnu \ + sparc64-linux-gnu \ + x86_64-linux-gnu \ + m32r-linux-gnu \ + spu + +# broken, see https://launchpad.net/bugs/1233185 +#MULTIARCH_TARGETS := all +# --enable-targets=$(MULTIARCH_TARGETS) \ # multiarch flags DEB_CONFIGURE_FLAGS_MULTIARCH := $(DEB_CONFIGURE_EXTRA_FLAGS) \ --enable-64-bit-bfd \ - --enable-targets=$(MULTIARCH_TARGETS) \ + --enable-targets=`set -- $(MULTIARCH_TARGETS); IFS=,; echo "$$*"` \ --disable-werror \ --disable-sim
signature.asc
Description: Digital signature