This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Change build_address_symbolic to return std::string
- From: Keith Seitz <keiths at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Wed, 6 Jun 2018 11:38:47 -0700
- Subject: Re: [RFA] Change build_address_symbolic to return std::string
- References: <20180505162454.5619-1-tom@tromey.com>
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