Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: drow@false.org (Daniel Jacobowitz)
Cc: gdb-patches@sourceware.org
Subject: Re: [rfc] [4/4] SPU overlay support: Bugfix in remove_breakpoint
Date: Fri, 11 May 2007 18:55:00 -0000	[thread overview]
Message-ID: <200705111855.l4BIt8oB016684@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <20070511172943.GB22529@caradoc.them.org> from "Daniel Jacobowitz" at May 11, 2007 01:29:43 PM

Daniel Jacobowitz wrote:
> On Fri, May 11, 2007 at 12:05:45AM +0200, Ulrich Weigand wrote:
> > The way to handle read-write overlay managers is to arrange for
> > the LMA to point to the backing-store RAM address where the
> > overlay has been swapped to, and remove the swapped-out breakpoint
> > at the *LMA* address.  The existing code already handles that
> > correctly (assuming overlay_events_enabled is false, as it should
> > be for read-write overlay managers).
> 
> I followed you right up until the end.  Why should
> overlay_events_enabled be false for read-write overlay management?
> 
> We could still be using hardware breakpoints (for example) with
> RAM-based overlays.  We'd want notification events so that we could
> enable or disable the hardware breakpoint appropriately.

OK, I didn't consider that case.  Well, that's not supported right
now -- common code does not actually *know* whether the overlay
manager is read-only or read-write, it simply infers that from
whether or not we have event notification.

If we want to support read-write overlays with both hardware and
software breakpoints, we'd need to make common code aware that
the target does support writing to the breakpoint LMA, and
handle software breakpoint as follows:

 - To install, always set breakpoint at the LMA; and if mapped,
   set it also at the VMA.

 - To remove, always remove breakpoint at the LMA; and if
   mapped, remove it also at the VMA.

In any case, removing a software breakpoint at the VMA in
an unmapped section would still be wrong ...


I guess we can implement that once we have a target that actually
supports this particular overlay mode.


Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


  reply	other threads:[~2007-05-11 18:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-07 22:27 Ulrich Weigand
2007-05-10 21:52 ` Daniel Jacobowitz
2007-05-10 22:05   ` Ulrich Weigand
2007-05-11 17:29     ` Daniel Jacobowitz
2007-05-11 18:55       ` Ulrich Weigand [this message]
2007-05-11 19:00         ` Daniel Jacobowitz

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=200705111855.l4BIt8oB016684@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.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