From owner-freebsd-current Fri Jan 3 7:13:55 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B61E137B401 for ; Fri, 3 Jan 2003 07:13:52 -0800 (PST) Received: from mx01.goddamnbastard.org (12-249-234-146.client.attbi.com [12.249.234.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id 122D843ED8 for ; Fri, 3 Jan 2003 07:13:47 -0800 (PST) (envelope-from ryanb@goddamnbastard.org) Received: by mx01.goddamnbastard.org (Postfix, from userid 1000) id E7129154DC; Fri, 3 Jan 2003 09:13:44 -0600 (CST) Date: Fri, 3 Jan 2003 09:13:44 -0600 From: ryan beasley To: freebsd-current@freebsd.org Subject: current/stable remote gdb interoperability Message-ID: <20030103151344.GA50346@goddamnbastard.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bp/iNruPH9dso1Pn" Content-Disposition: inline User-Agent: Mutt/1.4i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=unknown-8bit Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I'm running -CURRENT from around Dec 28th, 2002, 04:00 -0600, on a testing machine. While debugging a 3rd party module, I occasionally find myself in situations where I can't obtain a core dump. (e.g., a panic related to a lock assertion occurs just before the dump routine begins.) To get around this, I decided I'd use my other RELENG_4_7 box as a remote GDB master. The serial port on the -CURRENT machine is compiled at 38400. FYI, jesper =3D=3D 4.7R-p2 debugging box, and fredrik =3D=3D 5.0 panic box. = This instance of gdb was compiled from source w/ the patches found in the devel/gdb52 port. (I don't have room for the ports tree locally.) The problem I'm running into is primarily erratic behavior. The trace trap shown below occurs frequently, and while it's only a minor annoyance, my main concern is gdb randomly freezing when attempting to get a backtrace. (Sometimes it'll run to completion, others will hang between frames.) Is this a case of user error? (I've never had a problem w/ serial rates >9600 bps between similarly configured RELENG_4 boxes.) Is cross- release debugging taboo? What do the experts recommend I do? TIA! Session output is included below: ryanb@jesper ~/FREDRIK_DP_INV> gdb52 --baud 38400 GNU gdb 5.2 (FreeBSD) Copyright 2002 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 "i386-unknown-freebsd4.7". (gdb) target remote /dev/cuaa0 Remote debugging using /dev/cuaa0 0xc02a5aba in ?? () (gdb) add-symbol-file kernel.debug add symbol table from file "kernel.debug" at (y or n) y Reading symbols from kernel.debug...done. (gdb) dir sys Source directories searched: /home/ryanb/FREDRIK_DP_INV/sys:$cdir:$cwd (gdb) dir ipfilter Source directories searched: /home/ryanb/FREDRIK_DP_INV/ipfilter:/home/ryanb/FREDRIK_DP_INV/sys:$cdir:$c= wd (gdb) c Continuing. Program received signal SIGTRAP, Trace/breakpoint trap. Debugger (msg=3D0x19
) at atomic.h:260 260 atomic.h: No such file or directory. in atomic.h (gdb) bt #0 Debugger (msg=3D0x19
) at atomic.h:260 #1 0xc01bc5c7 in witness_lock (lock=3D0xc1264734, flags=3D8, file=3D0xc02d9e6d "/usr/src/sys/kern/kern_descrip.c", line=3D2108) at /usr/src/sys/kern/subr_witness.c:720 #2 0xc0190441 in _mtx_lock_flags (m=3D0x0, opts=3D0, file=3D0xc1264734 " \0170=C0U\230-=C0U\230-=C0", line=3D-1070255508) at /usr/src/sys/kern/kern_mutex.c:328 #3 0xc017eba3 in sysctl_kern_file (oidp=3D0xc02fdfe0, arg1=3D0x0, arg2=3D0, req=3D0xc5f47c0c) at /usr/src/sys/kern/kern_descrip.c:2108 #4 0xc01a279b in sysctl_root (oidp=3D0x0, arg1=3D0xc5f47ca8, arg2=3D2, req=3D0xc5f47c0c) at /usr/src/sys/kern/kern_sysctl.c:1150 (Session just dies here.) ryanb@jesper ~> ps auxww | grep gdb ryanb 50317 0.0 5.4 22272 21160 p4 S+ 7:35AM 0:01.87 gdb52 --baud 38400 Its current wait channel is (surprise!) ttyin. --=20 ryan beasley GPG ID: 0x16EFBD48 http://www.goddamnbastard.org =09 --bp/iNruPH9dso1Pn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE+FaioskfdOxbvvUgRAl0uAJ4o7+1Pxtht0zsDYmmfE7faBXPAogCeNtjY MizDHkGl2zKdMLZ7drOlmmI= =y6G+ -----END PGP SIGNATURE----- --bp/iNruPH9dso1Pn-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message