Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Nathan Sidwell <nathan@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: patch for invalid hw breakpoints
Date: Thu, 01 Jun 2006 20:53:00 -0000	[thread overview]
Message-ID: <ufyioegx9.fsf@gnu.org> (raw)
In-Reply-To: <20060601180321.GA26791@nevyn.them.org> (message from Daniel 	Jacobowitz on Thu, 1 Jun 2006 14:03:21 -0400)

> Date: Thu, 1 Jun 2006 14:03:21 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sourceware.org
> 
> -> Z2,11110000
> <- [empty: I don't support that.]
> tries to send: -> z2,11110000
> [internal error, I already know I don't support that!]
> 
> That could be changed in remote.c, but not removing what we didn't
> insert does seem cleaner.

Is it really clean for remote.c to throw an internal error?  I always
thought remote.c implemented an API similar to ptrace, so it should
behave like ptrace, i.e. return an error code, not throw exceptions.

More to the point, I don't like the solution: IMHO it assumes too much
about the procedure we use to insert high-level watchpoints.  The
assumption that we never insert target-side watchpoints past some
point in the value chain is not guaranteed to hold forever.

If solving this in remote.c seems unclean for some reason (I don't
think so, but that's me), how about adding to the watchpoint data
structure a flag for each low-level watchpoint we insert, and storing
there whether it was actually inserted?  The code that removes
watchpoints could then consult that flag and refrain from removing a
non-inserted watch.  Does this make sense?


  reply	other threads:[~2006-06-01 20:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <447EE9A8.4050800@codesourcery.com>
2006-06-01 17:21 ` Eli Zaretskii
2006-06-01 17:26   ` Daniel Jacobowitz
2006-06-01 17:46     ` Nathan Sidwell
2006-06-01 18:03       ` Daniel Jacobowitz
2006-06-01 20:53         ` Eli Zaretskii [this message]
2006-06-01 21:12           ` Daniel Jacobowitz
2006-06-02  8:44             ` Eli Zaretskii
2006-06-02 13:52               ` Daniel Jacobowitz
2006-06-02 20:56                 ` Eli Zaretskii
2006-06-02 20:57                   ` Daniel Jacobowitz
2006-06-05 14:30               ` Nathan Sidwell
2006-06-05 19:58                 ` Eli Zaretskii
2006-06-02  7:26         ` Nathan Sidwell
2006-06-02  8:13           ` Eli Zaretskii
2006-06-01 18:33       ` Nathan Sidwell

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=ufyioegx9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=nathan@codesourcery.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