From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13760 invoked by alias); 30 Aug 2008 01:56:41 -0000 Received: (qmail 13750 invoked by uid 22791); 30 Aug 2008 01:56:39 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 30 Aug 2008 01:56:04 +0000 Received: from wpaz5.hot.corp.google.com (wpaz5.hot.corp.google.com [172.24.198.69]) by smtp-out3.google.com with ESMTP id m7U1u0F4011220 for ; Sat, 30 Aug 2008 02:56:01 +0100 Received: from rv-out-0506.google.com (rvbf6.prod.google.com [10.140.82.6]) by wpaz5.hot.corp.google.com with ESMTP id m7U1tHCN010610 for ; Fri, 29 Aug 2008 18:56:00 -0700 Received: by rv-out-0506.google.com with SMTP id f6so947474rvb.27 for ; Fri, 29 Aug 2008 18:55:59 -0700 (PDT) Received: by 10.141.23.7 with SMTP id a7mr1894133rvj.58.1220061359167; Fri, 29 Aug 2008 18:55:59 -0700 (PDT) Received: by 10.140.201.10 with HTTP; Fri, 29 Aug 2008 18:55:59 -0700 (PDT) Message-ID: Date: Sat, 30 Aug 2008 01:56:00 -0000 From: "Doug Evans" To: "Pedro Alves" Subject: Re: [PATCH] fix thinko in pre/post hook help output Cc: gdb-patches@sourceware.org In-Reply-To: <200808300118.26587.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080829235547.5279D1C7801@localhost> <200808300118.26587.pedro@codesourcery.com> 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-08/txt/msg00666.txt.bz2 On Fri, Aug 29, 2008 at 5:18 PM, Pedro Alves wrote: > On Saturday 30 August 2008 00:55:47, Doug Evans wrote: >> fyi, checked in as obvious (swap before/after). >> >> 2008-08-29 Doug Evans >> >> * cli/cli-decode.c (help_cmd): Fix thinko in pre/post hook help output. >> >> Index: cli/cli-decode.c >> =================================================================== >> RCS file: /cvs/src/src/gdb/cli/cli-decode.c,v >> retrieving revision 1.69 >> diff -u -p -u -p -r1.69 cli-decode.c >> --- cli/cli-decode.c 30 Jul 2008 01:10:17 -0000 1.69 >> +++ cli/cli-decode.c 29 Aug 2008 23:48:28 -0000 >> @@ -797,12 +797,12 @@ help_cmd (char *command, struct ui_file >> "\nThis command has a hook (or hooks) defined:\n"); >> >> if (c->hook_pre) >> - fprintf_filtered (stream, >> - "\tThis command is run after : %s (pre hook)\n", >> + fprintf_filtered (stream, >> + "\tThis command is run before : %s (pre hook)\n", >> c->hook_pre->name); > > I don't think this change is correct. The command refered to in this > context does run *after* the pre-hook, > >> if (c->hook_post) >> - fprintf_filtered (stream, >> - "\tThis command is run before : %s (post hook)\n", >> + fprintf_filtered (stream, >> + "\tThis command is run after : %s (post hook)\n", >> c->hook_post->name); >> } > > and *before* the post-hook runs. E.g., > > (gdb) define hook-thread > Type commands for definition of "hook-thread". > End with a line saying just "end". > >print "before" > >end > (gdb) help thread > ... > This command has a hook (or hooks) defined: > This command is run after : hook-thread (pre hook) > (gdb) thread > $1 = "before" > [Current thread is 1 (Thread 0x7ffff7fd46e0 (LWP 7467))] > (gdb) > > "thread" does runs *after* "hook-thread". > > -- > Pedro Alves > Oh bother. I guess it can be interpreted that way. Serves me right for assuming interpreting English is obvious. Reverted.