From: Jan Kiszka <jan.kiszka@web.de>
To: Liu Yu-B13201 <Yu.Liu@freescale.com>
Cc: kvm-ppc <kvm-ppc@vger.kernel.org>,
Nathan Froyd <froydnj@codesourcery.com>,
qemu-devel <qemu-devel@nongnu.org>,
Hollis Blanchard <hollisb@us.ibm.com>
Subject: [Qemu-devel] Re: [PATCH 0/5]
Date: Sat, 25 Jul 2009 12:43:51 +0200 [thread overview]
Message-ID: <4A6AE1E7.3030804@web.de> (raw)
In-Reply-To: <1248511217-22681-1-git-send-email-yu.liu@freescale.com>
[-- Attachment #1: Type: text/plain, Size: 2108 bytes --]
Liu Yu wrote:
> The whole patchset includes:
> patch 1: fix kvmppc build error
> patch 2: fix kvmppc init error
> patch 3~5: add kvmppc guest debug support
>
> The guest debug still have some problems I haven't solved.
>
> 1. gdb 'next' command uses software breakpoint
> software breakpoint is implemented via modify guest's code.
> In most case it works well,
> but when used by 'next' it's easy to make trouble on powerpc booke.
>
> For example booke has a code template for
> jumping to and returning from interrupt handlers:
>
> bl transfer
> .long handler_addr
> .long ret_addr
>
> when call transfer, it never return but
> in transfer assembly code it will read the handler_addr
> and ultimately call the handler.
> Gdb doesn't know that and treat it as a normal function call.
> so gdb put a software breakpoint instruction at handler_addr,
> in order to get trap there when return from transfer.
>
> Then guest will read software breakpoint as handler_addr and jump to there..
>
> I'm not sure if x86 suffer this kind of issue.
It would if it had such a pattern.
> Is there any way to avoid this?
Unless there is a mechanism via the debug infos of a binary to tell gdb
about this, I think one can only avoid it by not using next here.
>
>
> 2. gdb 'watch' command
> Jan told me gdb>6.8 can issue hardware watchpoint request via command 'watch',
> my gdb is 6.8.50.20080821-cvs and our toolchain provider confirm that it supports hardware watch
> However when I use 'watch', I can only see single step from gdbstub side.
> Did I miss anything?
Did you install a watchpoint on a symbol? If yes, try if placing one on
an absolute address changes the picture.
Frankly, I didn't understand gdb's logic for selecting soft or hard
watchpoints so far. Soft watchpoints are those you saw: single step to
the program, checking after each step if the watched variable has
changed. In theory it should be clear when to use which. But practice
appears to be non-deterministic, at least with the versions we recently
tried on x86.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
next prev parent reply other threads:[~2009-07-25 10:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-25 8:40 [Qemu-devel] [PATCH 0/5] Liu Yu
2009-07-25 8:40 ` [Qemu-devel] [PATCH 1/5] Fix kvmppc build error Liu Yu
2009-07-25 8:40 ` [Qemu-devel] [PATCH 2/5] Fix booke registers init Liu Yu
2009-07-25 8:40 ` [Qemu-devel] [PATCH 3/5] Add guest debug support for kvmppc Liu Yu
2009-07-25 8:40 ` [Qemu-devel] [PATCH 4/5] Add eaddr translator for fsl_booke mmu Liu Yu
2009-07-25 8:40 ` [Qemu-devel] [PATCH 5/5] guest debug init for 440 and e500 core Liu Yu
2009-07-25 10:27 ` [Qemu-devel] " Jan Kiszka
2009-07-25 10:18 ` [Qemu-devel] Re: [PATCH 3/5] Add guest debug support for kvmppc Jan Kiszka
2009-07-28 2:01 ` [Qemu-devel] " Liu Yu-B13201
2009-07-25 10:04 ` [Qemu-devel] Re: [PATCH 2/5] Fix booke registers init Jan Kiszka
2009-07-27 10:31 ` [Qemu-devel] " Liu Yu-B13201
2009-07-25 10:43 ` Jan Kiszka [this message]
2009-07-27 10:39 ` [Qemu-devel] RE: [PATCH 0/5] Liu Yu-B13201
2009-07-27 13:14 ` [Qemu-devel] " Nathan Froyd
2009-07-28 8:11 ` [Qemu-devel] " Liu Yu-B13201
-- strict thread matches above, loose matches on Subject: below --
2010-11-24 8:39 [Qemu-devel] " Nicholas A. Bellinger
2010-11-24 13:38 ` [Qemu-devel] " Stefan Hajnoczi
2010-11-24 16:47 ` Christoph Hellwig
2010-11-25 2:30 ` FUJITA Tomonori
2010-11-25 9:59 ` Stefan Hajnoczi
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=4A6AE1E7.3030804@web.de \
--to=jan.kiszka@web.de \
--cc=Yu.Liu@freescale.com \
--cc=froydnj@codesourcery.com \
--cc=hollisb@us.ibm.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).