Date: Mon, 08 May 2017 11:30:53 -0700 From: John Baldwin <jhb@freebsd.org> To: Mark Millard <markmi@dsl-only.net> Cc: FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, FreeBSD Ports <freebsd-ports@freebsd.org>, andreast@freebsd.org Subject: Re: Lack of TARGET_ARCH=powerpc support in kgdb from devel/gdb (e.g., -r440115 of /usr/ports): "ABI doesn't support a vmcore target" Message-ID: <2567165.qjEVz8HF8R@ralph.baldwin.cx> In-Reply-To: <568491A5-0BDC-41CD-945C-E42B53EC2393@dsl-only.net> References: <CC5B5B39-A4FE-4C30-B936-E368863F512F@dsl-only.net> <568491A5-0BDC-41CD-945C-E42B53EC2393@dsl-only.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, May 06, 2017 10:03:57 PM Mark Millard wrote: > THING #0: > > It appears that usr.sbin/crashinfo/crashinfo.sh assumes > that /usr/local/bin/gdb will work better for all architectures, > including for kgdb types of activity: > > find_gdb() > { > local binary > > for binary in /usr/local/bin/gdb /usr/libexec/gdb /usr/bin/gdb; do > if [ -x ${binary} ]; then > GDB=${binary} > return > fi > done > } > > But it appears that on powerpc /usr/local/bin/gdb and > /usr/local/bin/kgdb do not support TARGET_ARCH=powerpc > at all for such activity. Not really. kgdb on powerpc doesn't work period as neither the base nor ports kgdb can unwind a stack frame. I spent some time last year trying to get the unwind out of cpu_switch() to work to no avail. The current hack attempts are here: https://github.com/bsdjhb/gdb/compare/freebsd-7.11-kgdb...kgdb-ppc > THING #1: > > Another oddity is for the combination: > > ${MK_GDB} == no && ${MK_GDB_LIBEXEC} == yes As I think you figured out, MK_GDB_LIBEXEC depends on MK_GDB=yes. If WITHOUT_GDB=yes is set, then no "base" GDB is installed at all. WITH_GDB_LIBEXEC is just to decide in the MK_GDB=yes case where "base" GDB goes: /usr/bin vs /usr/libexec. > THING #2: > > /usr/libexec/kgdb (when present) does not support the > powerpc architecture for head either . . . > > On a head -r317820 powerpc I attempted: > > # /usr/libexec/kgdb /usr/lib/debug/boot/kernel/kernel.debug /var/crash/vmcore.7 > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you are > welcome to change it and/or distribute copies of it under certain conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "powerpc-marcel-freebsd"... > Failed to open vmcore: unsupported architecture This is a different problem with libkvm. I would start with 'ps -M' and use a debugger to step through the _powerpc_probe and _powerpc64_probe routines in libkvm to see why the appropriate probe routine isn't claiming the core. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2567165.qjEVz8HF8R>