Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: bauerman@br.ibm.com, gdb-patches@sourceware.org, uweigand@de.ibm.com
Subject: Re: [RFA 2/3] Demote to sw watchpoint only in update_watchpoint
Date: Thu, 05 May 2011 15:27:00 -0000	[thread overview]
Message-ID: <201105051627.40873.pedro@codesourcery.com> (raw)
In-Reply-To: <E1QHvmw-0003Ir-R4@fencepost.gnu.org>

On Thursday 05 May 2011 11:28:06, Eli Zaretskii wrote:
> > From: Pedro Alves <pedro@codesourcery.com>
> > Date: Thu, 5 May 2011 09:15:18 +0100
> > Cc: Eli Zaretskii <eliz@gnu.org>,
> >  gdb-patches@sourceware.org,
> >  uweigand@de.ibm.com
> > 
> > On Wednesday 04 May 2011 23:20:48, Thiago Jung Bauermann wrote:
> > > Pedro's suggestion:
> > > 
> > > 1. The inferior is stopped and software bp_locations (both breakpoints 
> > >    and watchpoints) are removed. Hardware ones stay in place.
> > > 2. The user asks for a new watchpoint.
> > > 3. GDB evaluates the expression and creates the bp_locations.
> > > 4. GDB tries to insert the bp_locations as hw watches. If that fails, 
> > >    then converts to sw and registers the watchpoint for insertion.
> > > 5. The user asks the inferior to be continued.
> > > 6. GDB inserts sw breakpoints and watchpoints and resumes the inferior.
> > 
> > Either that or try keep hardware breakpoints and watchpoints uninserted,
> > and insert them just before 4.
> 
> If you really meant "before 4", then I must say I don't understand
> what are the 2 alternative suggestions.

 1. The inferior is stopped and software bp_locations (both breakpoints 
    and watchpoints) are removed. Hardware ones stay in place.
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 2. The user asks for a new watchpoint.
 3. GDB evaluates the expression and creates the bp_locations.
 4. GDB tries to insert the bp_locations as hw watches. If that fails, 
    then converts to sw and registers the watchpoint for insertion.
 5. The user asks the inferior to be continued.
 6. GDB inserts sw breakpoints and watchpoints and resumes the inferior.

vs

 1. The inferior is stopped and all sw/hw breakpoints/watchpoints are removed,
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    as currently.
 2. The user asks for a new watchpoint.
 3. GDB evaluates the expression and creates the bp_locations.
 4. GDB inserts the hw bp_locations of already existing
    hardware watchpoints/breakpoints.  This shouldn't fail,
    unless there's a bug, because otherwise, they wouldn't have
    been created in the first place.  This is a nop if 
    "breakpoint always-inserted" is on.
 5. GDB tries to insert the new bp_locations as hw watches. If that fails,
    remove any leftovers, and convert to sw.
 6. If "breakpoint always-inserted" is off, remove all breakpoints.
 7. The user asks the inferior to be continued.
 8. GDB inserts all breakpoints/watchpoints as usualy.

-- 
Pedro Alves


  reply	other threads:[~2011-05-05 15:27 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13 20:55 [RFA] Implement support for PowerPC BookE masked watchpoints Thiago Jung Bauermann
2011-01-31 20:09 ` Thiago Jung Bauermann
2011-02-17 15:10 ` Ulrich Weigand
2011-04-18 21:22   ` [RFA 1/3] Change watchpoint's enable state in do_enable_breakpoint Thiago Jung Bauermann
2011-04-29 17:21     ` Ulrich Weigand
2011-05-04  0:11       ` Thiago Jung Bauermann
2011-04-18 21:22   ` [RFA 2/3] Demote to sw watchpoint only in update_watchpoint Thiago Jung Bauermann
2011-04-29 17:26     ` Ulrich Weigand
2011-05-03  4:56       ` Thiago Jung Bauermann
2011-05-03  6:05         ` Eli Zaretskii
2011-05-03  9:58           ` Pedro Alves
2011-05-03 16:57             ` Eli Zaretskii
2011-05-03 17:41               ` Pedro Alves
2011-05-03 18:03                 ` Eli Zaretskii
2011-05-03 18:12                   ` Pedro Alves
2011-05-03 20:30                     ` Eli Zaretskii
2011-05-04  0:03                       ` Thiago Jung Bauermann
2011-05-04  3:07                         ` Eli Zaretskii
2011-05-04 22:21                           ` Thiago Jung Bauermann
2011-05-05  3:09                             ` Eli Zaretskii
2011-05-05  8:15                             ` Pedro Alves
2011-05-05 10:28                               ` Eli Zaretskii
2011-05-05 15:27                                 ` Pedro Alves [this message]
2011-05-05 16:27                                   ` Eli Zaretskii
2011-05-05 11:10                               ` Ulrich Weigand
2011-05-05 15:21                                 ` Pedro Alves
2011-05-04 19:12           ` Thiago Jung Bauermann
2011-05-04 20:31             ` Eli Zaretskii
2011-05-04 22:22               ` Thiago Jung Bauermann
2011-05-05 11:04         ` Ulrich Weigand
2011-04-18 21:24   ` [RFA 3/3] Implement support for PowerPC BookE masked watchpoints Thiago Jung Bauermann
2011-04-29 17:46     ` Ulrich Weigand
2011-05-03  4:56       ` [needs doc review] " Thiago Jung Bauermann
2011-05-03  6:24         ` Eli Zaretskii
2011-05-05 21:57           ` Thiago Jung Bauermann
2011-05-06 10:28             ` Eli Zaretskii
2011-05-06 20:35               ` Thiago Jung Bauermann
2011-05-05 11:07         ` Ulrich Weigand

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=201105051627.40873.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=bauerman@br.ibm.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.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