Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@vmware.com>
To: Michael Snyder <msnyder@vmware.com>,
	  "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	 Daniel Jacobowitz <drow@false.org>
Subject: Re: [RFA] Resubmit, reverse debugging [0/5]
Date: Sat, 11 Oct 2008 02:48:00 -0000	[thread overview]
Message-ID: <48EFCFEE.3090007@vmware.com> (raw)
In-Reply-To: <20081010185808.GA12193@caradoc.them.org>

[-- Attachment #1: Type: text/plain, Size: 1497 bytes --]

Daniel Jacobowitz wrote:
> On Fri, Oct 10, 2008 at 11:35:17AM -0700, Michael Snyder wrote:
>> OK, I agree -- but it's in use, in the field.
>>
>> Wouldn't the practice be to deprecate it, and announce
>> the intention of removing it at some future time, rather
>> than just suddenly take it away?
> 
> Sorry, but it's hard to be sympathetic to this.  I go through this on
> a regular basis, so do other GDB contributors: it's the risk you take
> for deploying things before they're merged.  If you don't get at least
> the protocol documentation committed to the master repository, then
> this is what happens.

Fine, but we want to encourage outside contribution, don't we?
VirtuTech were the original contributors of this functionality,
(albeit they wouldn't recognize more than a line or two of code
by now, this being one of them).  Can you blame them for not
waiting two years to distribute it?  In this industry, that is
the equivalent of several lifetimes.

Can't we compromise, and be nice to them, to thank them
for the contribution?

> Speaking of documentation, is there a documentation part for the
> remote protocol changes?  I haven't seen one in the most recent patch
> set, and I don't want any new protocol extensions without docs (for
> the obvious reason).

OK, here's a patch that adds
   1) remote protocol documentation
   2) The requested extension to the 'T' reply to replace E06
   3) A big honking "deprecated" warning for E06.

Tested using gdb-freeplay.
Is this good?


[-- Attachment #2: remotelog.txt --]
[-- Type: text/plain, Size: 3524 bytes --]

2008-10-10  Michael Snyder  <msnyder@vmware.com>

	* remote.c (remote_wait): Recognize "replaylog" reply as part 
	of 'T' stop event (NO_HISTORY).
	Declare "end of replay history" error reply as deprecated.

2008-10-10  Michael Snyder  <msnyder@vmware.com>

	* gdb.texinfo: Document the 'bc' and 'bs' (reverse) commands,
	and the 'replaylog' annotation of the 'T' stop event message.

Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.310.2.4
diff -u -p -r1.310.2.4 remote.c
--- remote.c	8 Oct 2008 00:26:28 -0000	1.310.2.4
+++ remote.c	10 Oct 2008 20:37:48 -0000
@@ -3616,6 +3616,7 @@ remote_wait (ptid_t ptid, struct target_
   ptid_t event_ptid = null_ptid;
   ULONGEST addr;
   int solibs_changed = 0;
+  int replay_event = 0;
 
   status->kind = TARGET_WAITKIND_EXITED;
   status->value.integer = 0;
@@ -3661,6 +3662,7 @@ remote_wait (ptid_t ptid, struct target_
 	  warning (_("Remote failure reply: %s"), buf);
 	  if (buf[1] == '0' && buf[2] == '6')
 	    {
+	      warning (_("Use of 'E6' to indicate NO_HISTORY is deprecated, and will go away in a future GDB release."));
 	      status->kind = TARGET_WAITKIND_NO_HISTORY;
 	    }
 	  else
@@ -3734,6 +3736,16 @@ Packet: '%s'\n"),
 			solibs_changed = 1;
 			p = p_temp;
 		      }
+		    else if (strncmp (p, "replaylog", p1 - 1) == 0)
+		      {
+			/* NO_HISTORY event.
+			   p1 will indicate "begin" or "end", but
+			   it makes no difference for now, so ignore it.  */
+			replay_event = 1;
+			p_temp = strchr (p1 + 1, ';');
+			if (p_temp)
+			  p = p_temp;
+		      }
 		    else
  		      {
  			/* Silently skip unknown optional info.  */
@@ -3779,6 +3791,8 @@ Packet: '%s'\n"),
 	case 'S':		/* Old style status, just signal only.  */
 	  if (solibs_changed)
 	    status->kind = TARGET_WAITKIND_LOADED;
+	  else if (replay_event)
+	    status->kind = TARGET_WAITKIND_NO_HISTORY;
 	  else
 	    {
 	      status->kind = TARGET_WAITKIND_STOPPED;
Index: doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.525.2.3
diff -u -p -r1.525.2.3 gdb.texinfo
--- doc/gdb.texinfo	4 Oct 2008 19:11:51 -0000	1.525.2.3
+++ doc/gdb.texinfo	10 Oct 2008 20:37:49 -0000
@@ -24611,6 +24611,20 @@ breakpoint at @var{addr}.
 Don't use this packet.  Use the @samp{Z} and @samp{z} packets instead
 (@pxref{insert breakpoint or watchpoint packet}).
 
+@item bc
+@cindex @samp{bc} packet
+Backward continue.  Execute the target system in reverse.  No parameter.
+
+Reply:
+@xref{Stop Reply Packets}, for the reply specifications.
+
+@item bs
+@cindex @samp{bs} packet
+Backward single step.  Execute one instruction in reverse.  No parameter.
+
+Reply:
+@xref{Stop Reply Packets}, for the reply specifications.
+
 @item c @r{[}@var{addr}@r{]}
 @cindex @samp{c} packet
 Continue.  @var{addr} is address to resume.  If @var{addr} is omitted,
@@ -25228,6 +25242,14 @@ hex.
 The packet indicates that the loaded libraries have changed.
 @value{GDBN} should use @samp{qXfer:libraries:read} to fetch a new
 list of loaded libraries.  @var{r} is ignored.
+
+@cindex replay log events, remote reply
+@item replaylog
+The packet indicates that the target cannot continue replaying 
+logged execution events, because it has reached the end (or the
+beginning when executing backward) of the log.  The value of @var{r}
+will be either @samp{begin} or @samp{end}.
+
 @end table
 
 @item W @var{AA}

  reply	other threads:[~2008-10-11  2:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-08  2:17 Michael Snyder
2008-10-10 17:44 ` Michael Snyder
2008-10-10 17:54   ` Daniel Jacobowitz
2008-10-10 18:38     ` Michael Snyder
2008-10-11  2:43       ` Daniel Jacobowitz
2008-10-11  2:48         ` Michael Snyder [this message]
2008-10-11  8:02           ` Eli Zaretskii
2008-10-13 19:21             ` Michael Snyder
2008-10-14  7:56               ` Jakob Engblom
2008-10-14  9:07                 ` teawater
2008-10-14 12:24                   ` Daniel Jacobowitz
2008-10-14 12:27           ` Daniel Jacobowitz
2008-10-15 18:20             ` Michael Snyder
2008-10-15 18:30               ` Daniel Jacobowitz
2008-10-15 18:42                 ` Michael Snyder
2008-10-15 18:47                   ` Pedro Alves
2008-10-15 18:49                     ` Michael Snyder
2008-10-11  9:47       ` Joel Brobecker
2008-10-13 19:22         ` Michael Snyder

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=48EFCFEE.3090007@vmware.com \
    --to=msnyder@vmware.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /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