From: Daniel Jacobowitz <drow@false.org>
To: Cai Qian <caiqian@gmail.com>
Cc: teawater <teawater@gmail.com>, gdb@sourceware.org
Subject: Re: Virtual Machine and GDB
Date: Mon, 21 Aug 2006 12:48:00 -0000 [thread overview]
Message-ID: <20060821124806.GC16416@nevyn.them.org> (raw)
In-Reply-To: <a96350810608210522l28f7aa68y8eb9167233a19f5d@mail.gmail.com>
On Mon, Aug 21, 2006 at 01:22:34PM +0100, Cai Qian wrote:
> Hi,
>
> On 8/21/06, teawater <teawater@gmail.com> wrote:
> >Does GDB support the ARCH of you VM?
> >
>
> Sorry, what do you mean by GDB support the ARCH of VM? Do you mean
> port GDB? Does it really necessary to port GDB to the VM? At the
> moment, GDB can't run natively on my VM, nor gdbserver. I am wondering
> if I can still do remote debugging. According to the document [1], it
> seems I can create a remote stub for the target, and then link it to
> the program I am going to run on the target, ie, to implement at least
> the following functions,
>
> getDebugChar, putDebugChar, flush_i_cache, memset, exceptionHandler
>
> Although there are lots of things unclear,
No no no. This is almost certainly not what you want to do. This bit
of the documentation is not actually relevant.
You want to debug the bare code running inside the virtual machine,
right? Then what you probably want to do is a stub integrated directly
with the source code of the virtual machine. Then that stub can
respond to a single step packet by requesting the virtual machine
execute one instruction, and so forth. The stub runs outside the VM.
> 2) Can't find information on what kind of debug features I can have
> when after implementing the remote stub. Breakpoint, watchpoint,
> single step?
See the remote protocol appendix in the GDB manual. All of those are
supported.
> 3) Not sure how to write a download program to download executable
> from target to host in a debug session.
>
> [1] http://sources.redhat.com/gdb/current/onlinedocs/gdb_18.html#SEC160
You don't need one; you can either use "load", or you can load directly
from the virtual machine and just have GDB connect.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-08-21 12:48 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-20 21:10 Cai Qian
2006-08-21 0:07 ` Daniel Jacobowitz
2006-08-21 0:24 ` Cai Qian
2006-08-21 1:54 ` Daniel Jacobowitz
[not found] ` <daef60380608201849o49825a32s135b8131807ee71f@mail.gmail.com>
2006-08-21 10:25 ` Cai Qian
2006-08-21 11:38 ` teawater
2006-08-21 12:22 ` Cai Qian
2006-08-21 12:48 ` Daniel Jacobowitz [this message]
2006-08-21 13:35 ` teawater
2006-08-21 17:04 ` Neo
2006-08-21 17:59 ` Cai Qian
2006-08-21 18:28 ` Michael Snyder
2006-08-21 18:32 ` Daniel Jacobowitz
2006-08-21 18:50 ` Cai Qian
2006-08-21 19:13 ` Michael Snyder
2006-08-21 18:30 ` Neo
2006-08-21 18:57 ` Cai Qian
2006-08-21 19:16 ` Michael Snyder
2006-08-22 1:21 ` teawater
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
2006-08-22 6:26 Anupama Chandwani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060821124806.GC16416@nevyn.them.org \
--to=drow@false.org \
--cc=caiqian@gmail.com \
--cc=gdb@sourceware.org \
--cc=teawater@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox