From: "J.T. Conklin" <jtc@RedBackNetworks.com>
To: gdb@cygnus.com
Subject: breakpoint extension for remote protocol, take II
Date: Thu, 10 Dec 1998 17:51:00 -0000 [thread overview]
Message-ID: <199812110150.RAA21699@jtc.redbacknetworks.com> (raw)
I've had some time to refine my break/watchpoint extensions, and have
come up with this revised proposal.
Request Packet
insert break B<type>,<address>[,<length>]
reply OK for success.
ENN for an error.
remove break D<type>,<address>[,<length>]
reply OK for success.
ENN for an error.
In my earlier proposal, if the 'B' command successfully inserted a
breakpoint, it returned a integer cookie uniquely identifying that
breakpoint. The 'D' command used the cookies to remove breakpoints.
I have changed 'D' to specify breakpoints in the same manner as they
are inserted.
This was done because GDB internally represents break/watchpoints by
type/address/length. It would require additional hair in both GDB's
remote.c and the stub to index breakpoints by a cookie. In light of
this, there is no compelling reason to use a cookie.
I also proposed using the characters 'r', 'w', and 'x' for <type>
(indicating read, write and execute breakpoints), but I now think
<type> should be an integer. I found that there are at least 5 types
that need to be supported. And although I can't think of any more off
hand, there may be more. A numeric <type> is a bit easier to parse in
the stub, and although the 'r', 'w', 'x' mnemonic is nice, it's likely
to break down as new types are added. Since the remote protocol is
primarily for machine/machine communication, an integer is sufficient.
There was one type defined for execution breakpoints, but I've decided
that separate types to indicate software and hardware breakpoints are
required. It's unrealistic to assume that the stub can make the
decision whether to use a hard- or soft- breakpoint as well as the
programmer driving GDB. I've also discovered that GDB currently
supports read, write, and read/write (access) watchpoints.
My current definition for <type> is:
0 software breakpoint
1 hardware breakpoint
2 write watchpoint
3 read watchpoint
4 read/write (access) watchpoint
It so happens that the <type>s used for watchpoints are the same as the
the TYPE argument to target_{insert,remove}_watchpoint + 2.
Thoughts? I'd like to get the protocol nailed down so I don't have to
change it after I roll it out within RedBack.
--jtc
--
J.T. Conklin
RedBack Networks
next reply other threads:[~1998-12-10 17:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-12-10 17:51 J.T. Conklin [this message]
[not found] <375D205F.F191C5@cygnus.com>
[not found] ` <5mzp222x5d.fsf@jtc.redbacknetworks.com>
[not found] ` <3765916E.2D458BAF@cygnus.com>
1999-06-14 16:48 ` J.T. Conklin
[not found] <199906150023.RAA14961@netcom16.netcom.com>
1999-06-14 17:43 ` J.T. Conklin
[not found] <199906142359.QAA06291@andros.cygnus.com>
[not found] ` <3765A855.5EF176AF@cygnus.com>
1999-06-16 14:06 ` Jim Blandy
1999-06-16 18:46 ` Jim Blandy
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=199812110150.RAA21699@jtc.redbacknetworks.com \
--to=jtc@redbacknetworks.com \
--cc=gdb@cygnus.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