From: Nathan Froyd <froydnj@codesourcery.com>
To: kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 0/5]
Date: Tue, 28 Jul 2009 12:40:40 +0000 [thread overview]
Message-ID: <20090728124039.GB32566@codesourcery.com> (raw)
In-Reply-To: <1248511217-22681-1-git-send-email-yu.liu@freescale.com>
On Tue, Jul 28, 2009 at 04:11:57PM +0800, Liu Yu-B13201 wrote:
> > On Sat, Jul 25, 2009 at 04:40:12PM +0800, Liu Yu wrote:
> > > 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.
> > > Is there any way to avoid this?
> >
> > You would need to modify GDB to recognize this sort of case with the
> > skip_trampoline_code gdbarch method.
>
> Hmm.. I am not a gdb expert.
> But even gdb can recognize this pattern, is it safe to skip it?
The code doesn't get skipped. skip_trampoline_code is a hook for
telling GDB "this function doesn't return in the normal way: here's
where execution will resume once this function finishes." That way GDB
can place the software breakpoint in the correct location: in this case,
at the address handler_addr.
-Nathan
next prev parent reply other threads:[~2009-07-28 12:40 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-25 8:40 [PATCH 0/5] Liu Yu
2009-07-25 8:40 ` [PATCH 1/5] Fix kvmppc build error Liu Yu
2009-07-25 8:40 ` [PATCH 2/5] Fix booke registers init Liu Yu
2009-07-25 8:40 ` [PATCH 3/5] Add guest debug support for kvmppc Liu Yu
2009-07-25 8:40 ` [PATCH 4/5] Add eaddr translator for fsl_booke mmu Liu Yu
2009-07-25 8:40 ` [PATCH 5/5] guest debug init for 440 and e500 core Liu Yu
2009-07-25 10:27 ` Jan Kiszka
2009-07-25 10:18 ` [PATCH 3/5] Add guest debug support for kvmppc Jan Kiszka
2009-07-28 2:01 ` Liu Yu-B13201
2009-07-25 10:04 ` [PATCH 2/5] Fix booke registers init Jan Kiszka
2009-07-27 10:31 ` Liu Yu-B13201
2009-07-25 10:43 ` [PATCH 0/5] Jan Kiszka
2009-07-27 10:39 ` Liu Yu-B13201
2009-07-27 13:14 ` Nathan Froyd
2009-07-28 8:11 ` Liu Yu-B13201
2009-07-28 12:40 ` Nathan Froyd [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-07-01 9:08 Jason Wang
2017-05-23 18:44 kusumi.tomohiro
2017-05-24 2:03 ` Jens Axboe
2016-01-19 17:09 minyard
2015-07-24 4:38 Joshua Clayton
2007-04-24 18:01 Luiz Fernando N. Capitulino
2007-04-24 20:52 ` Luiz Fernando N. Capitulino
2007-04-24 20:56 ` Junio C Hamano
2007-04-25 14:04 ` Luiz Fernando N. Capitulino
2007-04-25 19:04 ` Hermes Trismegisto
2007-04-25 19:36 ` Luiz Fernando N. Capitulino
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=20090728124039.GB32566@codesourcery.com \
--to=froydnj@codesourcery.com \
--cc=kvm-ppc@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.