Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Mar 2008 22:07:11 -0500
From:      Yoshihiro Ota <ota@j.email.ne.jp>
To:        Kostik Belousov <kostikbel@gmail.com>, freebsd-hackers@freebsd.org
Subject:   Re: Remote Kernel Debugging over QEMU?
Message-ID:  <20080308220711.1f43614d.ota@j.email.ne.jp>
In-Reply-To: <20080308201832.GA10374@deviant.kiev.zoral.com.ua>
References:  <20080308144505.9c72e484.ota@j.email.ne.jp> <20080308201832.GA10374@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 8 Mar 2008 22:18:32 +0200
Kostik Belousov <kostikbel@gmail.com> wrote:

> On Sat, Mar 08, 2008 at 02:45:05PM -0500, Yoshihiro Ota wrote:
> > Hello, folks,
> > 
> > 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 do it often, with the stock gdb built from FSF sources.
> 
> Simply run the qemu with the "-s" switch, then start gdb with kernel.debug
> argument, and, in the gdb, do "target remote localhost:1234".
> 
> I use latest gdb since it much better handles debugging information
> generated by the 4.2 gcc.
> 
> Also, this setup allows me to use both convenience of ddb specific
> commands (inside QEMU) and gdb data inspection facilities (almost)
> simultaneously.
> 

Thank you for all replies.

This one was the simplest one, indeed.

My attempt was like how Robert described but I haven't understood
to do that way enough.

Regards,
Hiro



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080308220711.1f43614d.ota>