From patchwork Fri Aug 10 22:01:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 28850 Received: (qmail 100340 invoked by alias); 10 Aug 2018 22:02:13 -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 100326 invoked by uid 89); 10 Aug 2018 22:02:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.2 spammy= X-HELO: sessmg22.ericsson.net Received: from sessmg22.ericsson.net (HELO sessmg22.ericsson.net) (193.180.251.58) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 Aug 2018 22:02:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/simple; q=dns/txt; i=@ericsson.com; t=1533938528; h=From:Sender:Reply-To:Subject:Date:Message-Id:To:CC:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=L/DsSplBV04rKbuzBstMylE/79b2mknhN8uZaoBfbGc=; b=SyDx4CcPWcoQaDy6d+qswjOZcpK8SO6bF+9FOuxqVk7WAJjh1Qc95R8zcnWdfR60 MADR85SySqsa3HaFY3y398h0ONWc0xwyM99k8hMLm6/hctoGZeyZ5sGW+I7QbiAN T40MHgRH2JzTp0nNsmhKXI3E+9wzbZTYDFa1+zjbm8I=; Received: from ESESBMB502.ericsson.se (Unknown_Domain [153.88.183.115]) by sessmg22.ericsson.net (Symantec Mail Security) with SMTP id 75.56.05215.06B0E6B5; Sat, 11 Aug 2018 00:02:08 +0200 (CEST) Received: from ESESBMB505.ericsson.se (153.88.183.172) by ESESBMB502.ericsson.se (153.88.183.169) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Sat, 11 Aug 2018 00:02:07 +0200 Received: from NAM03-DM3-obe.outbound.protection.outlook.com (153.88.183.157) by ESESBMB505.ericsson.se (153.88.183.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3 via Frontend Transport; Sat, 11 Aug 2018 00:02:08 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aT32o07V/p4EwYRCsPVQlKT+xQwPj2F/0H676VMJ3CQ=; b=X9IoDv0ZgZRlRDYOFXGlMZ3IpMlKPbDIO+70xFv21frNz7xH/1rpZJc/2CfjyD3pPubyJhlHGFUNG9Z32OQynBfmWmITo5zy+IE1gAOCUvo7JfuB5CKxcyBd3L2IIc/bHxIVHHj8KhV8aUr66kGU3AtLoZBEI16saV+JEO0Ft3I= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=simon.marchi@ericsson.com; Received: from elxacz23q12.ca.am.ericsson.se (192.75.88.130) by DM6PR15MB2393.namprd15.prod.outlook.com (2603:10b6:5:8d::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1038.21; Fri, 10 Aug 2018 22:02:05 +0000 From: Simon Marchi To: CC: Simon Marchi Subject: [pushed] Fix forgotten xstrprintf -> string_printf change Date: Fri, 10 Aug 2018 18:01:56 -0400 Message-Id: <1533938516-23385-1-git-send-email-simon.marchi@ericsson.com> MIME-Version: 1.0 Return-Path: simon.marchi@ericsson.com Received-SPF: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) X-IsSubscribed: yes The patch 528e157 ("Replace some uses of xstrprintf with string_printf") forgot to actually change an xstrprintf call to string_printf, this one fixes it. gdb/ChangeLog: * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf with string_printf. --- gdb/ChangeLog | 5 +++++ gdb/nat/linux-osdata.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e046b64..8559185 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-08-10 Simon Marchi + + * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf + with string_printf. + 2018-08-10 Keith Seitz * compile/compile-c-support.c (add_code_header, add_code_footer): diff --git a/gdb/nat/linux-osdata.c b/gdb/nat/linux-osdata.c index 9850cad..7d603a6 100644 --- a/gdb/nat/linux-osdata.c +++ b/gdb/nat/linux-osdata.c @@ -150,7 +150,7 @@ command_from_pid (char *command, int maxlen, PID_T pid) static char * commandline_from_pid (PID_T pid) { - std::string pathname = xstrprintf ("/proc/%lld/cmdline", pid); + std::string pathname = string_printf ("/proc/%lld/cmdline", pid); char *commandline = NULL; gdb_file_up f = gdb_fopen_cloexec (pathname, "r");