From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28435 invoked by alias); 15 May 2012 15:00:21 -0000 Received: (qmail 28379 invoked by uid 22791); 15 May 2012 15:00:19 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 May 2012 14:59:54 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id EC8DB1C6522; Tue, 15 May 2012 10:59:53 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id l0BDUv9q5WoW; Tue, 15 May 2012 10:59:53 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id BD1431C64A2; Tue, 15 May 2012 10:59:53 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 3BF2B145616; Tue, 15 May 2012 07:59:44 -0700 (PDT) From: Joel Brobecker To: gdb-patches@sourceware.org Cc: Joel Brobecker Subject: [RFC] init_breakpoint_sal: Add quotes around part of command in error message Date: Tue, 15 May 2012 15:00:00 -0000 Message-Id: <1337093982-27099-1-git-send-email-brobecker@adacore.com> 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: 2012-05/txt/msg00572.txt.bz2 Hello, What do you guys think of the following change. If changes: (gdb) b *rendez_vous'address TASK 2 Garbage TASK 2 at end of command ... into ... (gdb) b *rendez_vous'address TASK 2 Garbage `TASK 2' at end of command (actually, the current output is `Garbage 2 at end of command', but that's a bug that I am planning on fixing). Surprisingly, this doesn't appear to be tested at all, at the moment, as a quick grep for `Garbage' in all of gdb/testsuite did not yield any match. I will submit a testcase with my fix that will test this. gdb/ChangeLog: * breakpoint.c (init_breakpoint_sal): Add quotes around part of command in two error message. Untested for now, just trying to get feedback. Will definitely test before checking in, if people like the change. Thanks, -- Joel --- gdb/breakpoint.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 9eecdf8..9557430 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -8629,7 +8629,7 @@ init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch, char *arg = b->cond_string; loc->cond = parse_exp_1 (&arg, block_for_pc (loc->address), 0); if (*arg) - error (_("Garbage %s follows condition"), arg); + error (_("Garbage `%s' follows condition"), arg); } /* Dynamic printf requires and uses additional arguments on the @@ -8642,7 +8642,7 @@ init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch, error (_("Format string required")); } else if (b->extra_string) - error (_("Garbage %s at end of command"), b->extra_string); + error (_("Garbage `%s' at end of command"), b->extra_string); } b->display_canonical = display_canonical; -- 1.7.1