From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10635 invoked by alias); 6 Jun 2018 18:38:50 -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 10622 invoked by uid 89); 6 Jun 2018 18:38:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=UD:defs.h, defsh, defs.h 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, 06 Jun 2018 18:38:49 +0000 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E8FB430D2964; Wed, 6 Jun 2018 18:38:47 +0000 (UTC) Received: from theo.uglyboxes.com (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9EB392015660; Wed, 6 Jun 2018 18:38:47 +0000 (UTC) Subject: Re: [RFA] Change build_address_symbolic to return std::string To: Tom Tromey , gdb-patches@sourceware.org References: <20180505162454.5619-1-tom@tromey.com> From: Keith Seitz Message-ID: Date: Wed, 06 Jun 2018 18:38:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180505162454.5619-1-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00159.txt.bz2 Did someone looks this over already? In any case... On 05/05/2018 09:24 AM, Tom Tromey wrote: > This changes two out parameters of build_address_symbolic to be > std::string, and updates the callers. This allows removing some > cleanups. > > This patch also moves the declaration of build_address_symbolic out of > defs.h. I think that many things in defs.h should be elsewhere > instead. In this case, I moved the declaration to valprint.h, becuase > there is no "printcmd.h" -- but perhaps it would be better to > introduce that instead. That seems reasonable. One small request: > diff --git a/gdb/valprint.h b/gdb/valprint.h > index f005c31f87..29053b5028 100644 > --- a/gdb/valprint.h > +++ b/gdb/valprint.h > @@ -229,4 +229,13 @@ extern void print_command_parse_format (const char **expp, const char *cmdname, > struct format_data *fmtp); > extern void print_value (struct value *val, const struct format_data *fmtp); > > +extern int build_address_symbolic (struct gdbarch *, > + CORE_ADDR addr, > + int do_demangle, > + std::string *name, > + int *offset, > + std::string *filename, > + int *line, > + int *unmapped); > + > #endif Since you're moving the declaration here, could you please copy the comment from the definition here, too, while you're at it, replacing it with the usual "See XYZ.h"? [Warning: IANAM] Otherwise, LGTM. Keith