From patchwork Thu May 16 20:35:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Durigan Junior X-Patchwork-Id: 32731 Received: (qmail 64812 invoked by alias); 16 May 2019 20:41:40 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 64804 invoked by uid 89); 16 May 2019 20:41:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 16 May 2019 20:41:39 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 42FD4C070148 for ; Thu, 16 May 2019 20:35:13 +0000 (UTC) Received: from psique.yyz.redhat.com (unused-10-15-17-196.yyz.redhat.com [10.15.17.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id EDFA75C70A; Thu, 16 May 2019 20:35:12 +0000 (UTC) From: Sergio Durigan Junior To: GDB Patches Cc: Sergio Durigan Junior Subject: [FYI 4/5] Fix complaint string formatting on stap-probe.c Date: Thu, 16 May 2019 16:35:00 -0400 Message-Id: <20190516203501.25992-5-sergiodj@redhat.com> In-Reply-To: <20190516203501.25992-1-sergiodj@redhat.com> References: <20190516203501.25992-1-sergiodj@redhat.com> X-IsSubscribed: yes I think the string formatting for complaints was messed up by Tom's patch to simplify the complaint mechanism. This small and trivial patch fixes them. Pushed as obvious. gdb/ChangeLog: 2019-05-16 Sergio Durigan Junior * stap-probe.c (handle_stap_probe): Fix complaint formatting. (stap_static_probe_ops::get_probes): Likewise. --- gdb/ChangeLog | 5 +++++ gdb/stap-probe.c | 13 +++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c89b7039e8..faee99916e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-05-16 Sergio Durigan Junior + + * stap-probe.c (handle_stap_probe): Fix complaint formatting. + (stap_static_probe_ops::get_probes): Likewise. + 2019-05-16 Sergio Durigan Junior * stap-probe.c (stap_parse_register_operand): Make "if (*p->arg == diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c index db9231558f..5261a1aaa4 100644 --- a/gdb/stap-probe.c +++ b/gdb/stap-probe.c @@ -1512,12 +1512,11 @@ handle_stap_probe (struct objfile *objfile, struct sdt_note *el, /* Making sure there is a name. */ if (name == NULL) { - complaint (_("corrupt probe name when " - "reading `%s'"), + complaint (_("corrupt probe name when reading `%s'"), objfile_name (objfile)); /* There is no way to use a probe without a name or a provider, so - returning zero here makes sense. */ + returning here makes sense. */ return; } else @@ -1549,11 +1548,10 @@ handle_stap_probe (struct objfile *objfile, struct sdt_note *el, || (memchr (probe_args, '\0', (char *) el->data + el->size - name) != el->data + el->size - 1)) { - complaint (_("corrupt probe argument when " - "reading `%s'"), + complaint (_("corrupt probe argument when reading `%s'"), objfile_name (objfile)); /* If the argument string is NULL, it means some problem happened with - it. So we return 0. */ + it. So we return. */ return; } @@ -1661,8 +1659,7 @@ stap_static_probe_ops::get_probes { /* If we are here, it means we have failed to parse every known probe. */ - complaint (_("could not parse SystemTap probe(s) " - "from inferior")); + complaint (_("could not parse SystemTap probe(s) from inferior")); return; } }