From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11601 invoked by alias); 11 Oct 2008 02:48:38 -0000 Received: (qmail 446 invoked by uid 22791); 10 Oct 2008 22:01:19 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 10 Oct 2008 22:00:43 +0000 Received: from mailhost3.vmware.com (mailhost3.vmware.com [10.16.27.45]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 8528413442; Fri, 10 Oct 2008 15:00:39 -0700 (PDT) Received: from [10.20.92.59] (promb-2s-dhcp59.eng.vmware.com [10.20.92.59]) by mailhost3.vmware.com (Postfix) with ESMTP id 7A959C9A7E; Fri, 10 Oct 2008 15:00:39 -0700 (PDT) Message-ID: <48EFCFEE.3090007@vmware.com> Date: Sat, 11 Oct 2008 02:48:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: Michael Snyder , "gdb-patches@sourceware.org" , Daniel Jacobowitz Subject: Re: [RFA] Resubmit, reverse debugging [0/5] References: <48EC1781.2030005@vmware.com> <48EF93A5.7060808@vmware.com> <20081010175332.GA9028@caradoc.them.org> <48EFA065.5070108@vmware.com> <20081010185808.GA12193@caradoc.them.org> In-Reply-To: <20081010185808.GA12193@caradoc.them.org> Content-Type: multipart/mixed; boundary="------------020700000201030001090907" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-10/txt/msg00329.txt.bz2 This is a multi-part message in MIME format. --------------020700000201030001090907 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1497 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? --------------020700000201030001090907 Content-Type: text/plain; name="remotelog.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="remotelog.txt" Content-length: 3524 2008-10-10 Michael Snyder * 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 * 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} --------------020700000201030001090907--