From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2439 invoked by alias); 3 Jun 2014 07:04:23 -0000 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 Received: (qmail 2387 invoked by uid 89); 3 Jun 2014 07:04:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pb0-f47.google.com Received: from mail-pb0-f47.google.com (HELO mail-pb0-f47.google.com) (209.85.160.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 03 Jun 2014 07:04:18 +0000 Received: by mail-pb0-f47.google.com with SMTP id rp16so5089422pbb.6 for ; Tue, 03 Jun 2014 00:04:17 -0700 (PDT) X-Received: by 10.68.223.202 with SMTP id qw10mr10909138pbc.163.1401779056962; Tue, 03 Jun 2014 00:04:16 -0700 (PDT) Received: from seba.sebabeach.org.gmail.com (173-13-178-50-sfba.hfc.comcastbusiness.net. [173.13.178.50]) by mx.google.com with ESMTPSA id iq10sm24074579pbc.14.2014.06.03.00.04.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Jun 2014 00:04:16 -0700 (PDT) From: Doug Evans To: Phil Muldoon Cc: Tom Tromey , "gdb-patches\@sourceware.org" Subject: Re: [PATCH 05/14] change how the CLI handles comments References: <1400253995-12333-1-git-send-email-tromey@redhat.com> <1400253995-12333-6-git-send-email-tromey@redhat.com> <537A1004.9040404@redhat.com> Date: Tue, 03 Jun 2014 07:04:00 -0000 In-Reply-To: <537A1004.9040404@redhat.com> (Phil Muldoon's message of "Mon, 19 May 2014 15:07:00 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00064.txt.bz2 Phil Muldoon writes: > On 19/05/14 00:26, Doug Evans wrote: >> On Fri, May 16, 2014 at 8:26 AM, Tom Tromey wrote: >>> diff --git a/gdb/top.c b/gdb/top.c >>> index fa20025..16694e6 100644 >>> --- a/gdb/top.c >>> +++ b/gdb/top.c >>> @@ -560,11 +560,14 @@ command_loop (void) >>> >>> make_command_stats_cleanup (1); >>> >>> - execute_command (command, instream == stdin); >>> - >>> - /* Do any commands attached to breakpoint we are stopped at. */ >>> - bpstat_do_actions (); >>> + /* Do not execute commented lines. */ >>> + if (command[0] != '#') >>> + { >>> + execute_command (command, instream == stdin); >>> >>> + /* Do any commands attached to breakpoint we are stopped at. */ >>> + bpstat_do_actions (); >>> + } >>> do_cleanups (old_chain); >>> } >>> } >>> @@ -1057,15 +1060,6 @@ command_line_input (char *prompt_arg, int repeat, char *annotation_suffix) >>> if (*linebuffer && input_from_terminal_p ()) >>> add_history (linebuffer); >>> >>> - /* Note: lines consisting solely of comments are added to the command >>> - history. This is useful when you type a command, and then >>> - realize you don't want to execute it quite yet. You can comment >>> - out the command and then later fetch it from the value history >>> - and remove the '#'. The kill ring is probably better, but some >>> - people are in the habit of commenting things out. */ >>> - if (*p1 == '#') >>> - *p1 = '\0'; /* Found a comment. */ >>> - >>> /* Save into global buffer if appropriate. */ >>> if (repeat) >>> { >>> -- >>> 1.9.0 >>> >> >> Hi. I have an equivalent patch that I need for guile support. >> E.g., >> guile >> (foo >> #:bar 42) >> end >> >> Since this is really independent of the rest of the patch set, >> can this be checked in right away? >> TIA > > I have no problems with you checking this patch in as long as nobody > else objects. Lets give it a day or so for people to speak up. > Pending that I would say go ahead. > > Cheers, > > Phil Hi. I have committed this. Thanks.