Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Eli Zaretskii" <eliz@is.elta.co.il>
To: ac131313@redhat.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfa:breakpoint] Correctly count watchpoints
Date: Tue, 01 Oct 2002 11:23:00 -0000	[thread overview]
Message-ID: <2427-Tue01Oct2002212319+0200-eliz@is.elta.co.il> (raw)
In-Reply-To: <3D9939CF.8050205@redhat.com> (message from Andrew Cagney on Tue, 01 Oct 2002 01:59:43 -0400)

> Date: Tue, 01 Oct 2002 01:59:43 -0400
> From: Andrew Cagney <ac131313@redhat.com>
> > 
> > Why two?  Some expressions might need 3 registers.  If you use this 
> > worst-case scenario, GDB will think it cannot watch more than a single 
> > expression, and that some data types, such as double's, and complex 
> > aggregates, such as struct's, cannot be watched at all.  It's hardly a 
> > Good Thing to refuse to set watchpoints based on inaccurate decisions 
> > like this.
> 
> You mentioned two :-)

That was an example.

> Under the current arangement, an architecture has two choices:
> 
> - have target_can_use_hardware_watchpoints() always return true (most 
> targets appear to do this) and then error while trying to insert the 
> watchpoints.  This is what the i386 currently does.
> 
> - have target_can_use...() make use of the counts and return an 
> indication based on that

The reason the first strategy is widely used is that the high-level
code of GDB makes it very hard to do anything intelligent otherwise,
especially since refusing the target_can_use_hardware_watchpoints call
means GDB won't even try to insert that watchpoint.  IIRC, GDB doesn't
even promise to call that function (macro) only once for each
watchpoint.


  reply	other threads:[~2002-10-01 18:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3D98A393.6010801@redhat.com>
2002-09-30 21:54 ` Eli Zaretskii
2002-09-30 23:00   ` Andrew Cagney
2002-10-01 11:23     ` Eli Zaretskii [this message]
2002-09-29 20:34 Andrew Cagney
2002-09-29 22:40 ` Eli Zaretskii
2002-09-30  9:34   ` Andrew Cagney
2002-09-30 11:26     ` Eli Zaretskii
2002-09-30 12:42       ` Andrew Cagney

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=2427-Tue01Oct2002212319+0200-eliz@is.elta.co.il \
    --to=eliz@is.elta.co.il \
    --cc=ac131313@redhat.com \
    --cc=gdb-patches@sources.redhat.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