Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [RFA] Change build_address_symbolic to return std::string
Date: Wed, 06 Jun 2018 18:38:00 -0000	[thread overview]
Message-ID: <b6b7bd36-5a25-c7bb-0273-b7dae50fdb31@redhat.com> (raw)
In-Reply-To: <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


  parent reply	other threads:[~2018-06-06 18:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-05 16:25 Tom Tromey
2018-05-21 16:32 ` Tom Tromey
2018-06-06 18:38 ` Keith Seitz [this message]
2018-06-06 22:38   ` Tom Tromey
2018-06-07  3:36     ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b6b7bd36-5a25-c7bb-0273-b7dae50fdb31@redhat.com \
    --to=keiths@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox