From owner-freebsd-questions Tue Aug 24 10:34:56 1999 Delivered-To: freebsd-questions@freebsd.org Received: from relay2.mail.uk.psi.net (relay2.mail.uk.psi.net [154.32.107.6]) by hub.freebsd.org (Postfix) with ESMTP id 4AFCD1511D for ; Tue, 24 Aug 1999 10:34:53 -0700 (PDT) (envelope-from mvernon@allstor-sw.co.uk) Received: from mail.plasmon.co.uk ([193.115.5.217]) by relay2.mail.uk.psi.net with smtp (Exim 2.12 #2) id 11JINJ-00067S-00 for freebsd-questions@freebsd.org; Tue, 24 Aug 1999 16:20:44 +0100 Received: from virgo.software.plasmon ([193.115.4.42]) by mail.plasmon.co.uk (Lotus SMTP MTA v4.6.4 (830.2 3-23-1999)) with SMTP id 802567D7.00543A23; Tue, 24 Aug 1999 16:19:59 +0100 Received: from mail by virgo.software.plasmon with local-esmtp (Exim 2.12 #1) id 11JIKy-0004Fv-00 (FreeBSD); Tue, 24 Aug 1999 16:18:12 +0100 Received: from matthew by aardvark.software.plasmon with local-smtp (Exim 3.03 #1) id 11JIND-0004oo-00 (Debian); Tue, 24 Aug 1999 16:20:31 +0100 Date: Tue, 24 Aug 1999 16:20:31 +0100 (BST) From: Matthew Vernon X-Sender: matthew@aardvark.software.plasmon To: freebsd-questions@freebsd.org Subject: Kernel debugging using remote GDB Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I'm trying to get this working over a serial line. I can test the serial line by cat'ing data to and from /dev/cuaa1 on the two machines - transfer is slow, but all the data goes back and forth. Both machines are running the same (stripped) kernel. The debugging machine runs gdb -k kernel in the build directory of the kernel (which was built with config -g) The target machine is booted with the -d flag, and enters the debugger On the debugging box: bash-2.01# gdb -k kernel GDB is free software and you are welcome to 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. GDB 4.16 (i386-unknown-freebsd), Copyright 1996 Free Software Foundation, Inc... (kgdb) target remote /dev/cuaa1 Remote debugging using /dev/cuaa1 Then, according to the handbook, on the target machine: db> gdb Next trap will enter GDB remote protocol mode db> s At which point, the following occurs on the debugging box: Ignoring packet error, continuing... Ignoring packet error, continuing... Couldn't establish connection to remote target Malformed response to offset query, timeout (kgdb) The target machine hangs at this point, requiring a hard reboot. Any ideas as to why it isn't working??? Thanks, Matthew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message