From patchwork Tue Oct 3 14:36:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 23298 Received: (qmail 17294 invoked by alias); 3 Oct 2017 14:36:29 -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 17284 invoked by uid 89); 3 Oct 2017 14:36:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: gproxy7-pub.mail.unifiedlayer.com Received: from gproxy7-pub.mail.unifiedlayer.com (HELO gproxy7-pub.mail.unifiedlayer.com) (70.40.196.235) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Oct 2017 14:36:27 +0000 Received: from cmgw2 (unknown [10.0.90.83]) by gproxy7.mail.unifiedlayer.com (Postfix) with ESMTP id DA33E215D4C for ; Tue, 3 Oct 2017 08:36:25 -0600 (MDT) Received: from box522.bluehost.com ([74.220.219.122]) by cmgw2 with id H2cN1w00w2f2jeq012cRJ2; Tue, 03 Oct 2017 08:36:25 -0600 X-Authority-Analysis: v=2.2 cv=dZfw5Tfe c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=02M-m0pO-4AA:10 a=zstS-IiYAAAA:8 a=6gWdmbmwxw1a04EocEwA:9 a=4G6NA9xxw8l3yy4pmD5M:22 Received: from 75-166-0-208.hlrn.qwest.net ([75.166.0.208]:34296 helo=pokyo.Home) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1dzOJ4-00439R-8F; Tue, 03 Oct 2017 08:36:22 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA] Fix incorrect string_printf use in utils.c Date: Tue, 3 Oct 2017 08:36:16 -0600 Message-Id: <20171003143616.3698-1-tom@tromey.com> X-BWhitelist: no X-Exim-ID: 1dzOJ4-00439R-8F X-Source-Sender: 75-166-0-208.hlrn.qwest.net (pokyo.Home) [75.166.0.208]:34296 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-Local-Domain: yes I made a mistake earlier and used string_printf where I should have used string_vprintf. I'm checking this in as obvious. 2017-10-03 Tom Tromey * utils.c (internal_vproblem): Use string_vprintf. --- gdb/ChangeLog | 4 ++++ gdb/utils.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 439df4a..6e135f2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2017-10-03 Tom Tromey + * utils.c (internal_vproblem): Use string_vprintf. + +2017-10-03 Tom Tromey + * printcmd.c (info_symbol_command): Use std::string. 2017-10-03 Tom Tromey diff --git a/gdb/utils.c b/gdb/utils.c index 03b66c4..118fcc3 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -425,7 +425,7 @@ internal_vproblem (struct internal_problem *problem, style similar to a compiler error message. Include extra detail so that the user knows that they are living on the edge. */ { - std::string msg = string_printf (fmt, ap); + std::string msg = string_vprintf (fmt, ap); reason = string_printf ("%s:%d: %s: %s\n" "A problem internal to GDB has been detected,\n" "further debugging may prove unreliable.",