[RFA] Change build_address_symbolic to return std::string
Keith Seitz
keiths@redhat.com
Wed Jun 6 18:38:00 GMT 2018
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
More information about the Gdb-patches
mailing list