From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 8 22:32:32 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C26401065673 for ; Sat, 8 Mar 2008 22:32:32 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9D0EA8FC14 for ; Sat, 8 Mar 2008 22:32:32 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 58A2646BAF; Sat, 8 Mar 2008 17:32:32 -0500 (EST) Date: Sat, 8 Mar 2008 22:32:32 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Yoshihiro Ota In-Reply-To: <20080308144505.9c72e484.ota@j.email.ne.jp> Message-ID: <20080308223118.E11432@fledge.watson.org> References: <20080308144505.9c72e484.ota@j.email.ne.jp> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Remote Kernel Debugging over QEMU? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2008 22:32:32 -0000 On Sat, 8 Mar 2008, Yoshihiro Ota wrote: > Has anyone tried to remote-debugging of a system running on Qemu? > > I thought if I could attach kgdb from Qemu host to a guest FreeBSD running > on Qemu, it would be very helpful for many reasons, i.e. no hardware > requirements, avoid fscking all disks, and so on. > > Has anyone ever attempted? I spent a half day but due to lack of remote > debugging experience and some other knowledge, it wasn't successful. I don't use Qemu, but if it has an option to expose a host serial port as a guest serial port and FreeBSD works with the guest serial port emulation, you might take a look at nmdm(4), which creates two ttys set up as a "null modem". You can then attach kgdb to one end, and qemu to the other, which is a tricky used by our VMware users to do much the same thing. Robert N M Watson Computer Laboratory University of Cambridge