Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: "Sérgio Durigan Júnior" <sergiodj@linux.vnet.ibm.com>
Cc: gdb@sourceware.org
Subject: Re: Modifications on gdbserver
Date: Tue, 29 Sep 2009 19:48:00 -0000	[thread overview]
Message-ID: <20090929194756.GA25953@caradoc.them.org> (raw)
In-Reply-To: <200909291640.14995.sergiodj@linux.vnet.ibm.com>

On Tue, Sep 29, 2009 at 04:40:14PM -0300, Sérgio Durigan Júnior wrote:
> 1) I could extend the remote protocol and include one more type of `Z' packet 
> (`Z5', for example) which would represent this type of hardware breakpoint.
> 
> 2) I could extend the existing `Z1' (hardware breakpoint) packet in order to 
> include a "length" (or "range") parameter.  This will be different from the 
> existing "size" parameter, because "size" is currently used the size of the 
> instruction on the architecture.
> 
> What do you think?  Considering that there will be more "special" types of 
> hardware breakpoints/watchpoints, probably I should choose (2) and try to 
> modify the remote protocol as few as possible.  Do you agree?  Also, do you 
> see other option(s) that could be better for this case?

The vital thing to remember when modifying the remote protocol is to
be compatible.  We shouldn't send packets to existing servers that
won't understand them.  So I think (1) is better, because then we can
probe for the existance of the new packet and refuse to set
watchpoints if the target can't implement them.  If you change an
existing packet, it's impossible to guess all the ways existing
servers will parse it incorrectly :-)

New packets are a hassle to add, enable, probe, and document, but it's
mechanical and safe.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2009-09-29 19:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-29 19:40 Sérgio Durigan Júnior
2009-09-29 19:48 ` Daniel Jacobowitz [this message]
2009-09-29 20:09   ` Sérgio Durigan Júnior

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=20090929194756.GA25953@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb@sourceware.org \
    --cc=sergiodj@linux.vnet.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