From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21761 invoked by alias); 19 Oct 2016 01:21:37 -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 21739 invoked by uid 89); 19 Oct 2016 01:21:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 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; Wed, 19 Oct 2016 01:21:35 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7B676C04B923 for ; Wed, 19 Oct 2016 01:12:32 +0000 (UTC) Received: from cascais.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9J1CJji019701 for ; Tue, 18 Oct 2016 21:12:32 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH v2 13/31] Use ui_file_as_string in gdb/arm-tdep.c Date: Wed, 19 Oct 2016 01:21:00 -0000 Message-Id: <1476839539-8374-14-git-send-email-palves@redhat.com> In-Reply-To: <1476839539-8374-1-git-send-email-palves@redhat.com> References: <1476839539-8374-1-git-send-email-palves@redhat.com> X-SW-Source: 2016-10/txt/msg00551.txt.bz2 gdb/ChangeLog: yyyy-mm-yy Pedro Alves * arm-tdep.c (_initialize_arm_tdep): Use ui_file_as_string and std::string. --- gdb/arm-tdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 27a3ebe..31ebdc3 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -9558,7 +9558,7 @@ _initialize_arm_tdep (void) const char *setdesc; const char *const *regnames; int i; - static char *helptext; + static std::string helptext; char regdesc[1024], *rdptr = regdesc; size_t rest = sizeof (regdesc); @@ -9629,14 +9629,14 @@ _initialize_arm_tdep (void) _("The valid values are:\n"), regdesc, _("The default is \"std\".")); - helptext = ui_file_xstrdup (stb, NULL); + helptext = ui_file_as_string (stb); ui_file_delete (stb); add_setshow_enum_cmd("disassembler", no_class, valid_disassembly_styles, &disassembly_style, _("Set the disassembly style."), _("Show the disassembly style."), - helptext, + helptext.c_str (), set_disassembly_style_sfunc, NULL, /* FIXME: i18n: The disassembly style is \"%s\". */ -- 2.5.5