Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tromey@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/3] constify exec_file_attach
Date: Thu, 24 Jul 2014 01:27:00 -0000	[thread overview]
Message-ID: <53D06044.4060808@redhat.com> (raw)
In-Reply-To: <1406150844-17134-2-git-send-email-tromey@redhat.com>

On 07/23/2014 10:27 PM, Tom Tromey wrote:
> @@ -420,6 +420,14 @@ typedef struct cmdarg {
>  /* Define type VEC (cmdarg_s).  */
>  DEF_VEC_O (cmdarg_s);
>  
> +/* A wrapper for exec_file_attach that has the correct type.  */
> +
> +static void
> +call_exec_file_attach (char *arg, int from_tty)
> +{
> +  exec_file_attach (arg, from_tty);
> +}
> +
>  static int
>  captured_main (void *data)
>  {
> @@ -1068,7 +1076,7 @@ captured_main (void *data)
>        /* The exec file and the symbol-file are the same.  If we can't
>           open it, better only print one error message.
>           catch_command_errors returns non-zero on success!  */
> -      if (catch_command_errors (exec_file_attach, execarg,
> +      if (catch_command_errors (call_exec_file_attach, execarg,
>  				!batch_flag, RETURN_MASK_ALL))

Why not use catch_command_errors_const instead?  Seems like
you wouldn't need call_exec_file_attach then.

>  	catch_command_errors_const (symbol_file_add_main, symarg,
>  				    !batch_flag, RETURN_MASK_ALL);

-- 
Pedro Alves


  reply	other threads:[~2014-07-24  1:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-23 21:27 [PATCH 0/3] constification of to_open Tom Tromey
2014-07-23 21:27 ` [PATCH 3/3] constify to_open Tom Tromey
2014-07-24  1:34   ` Pedro Alves
2014-07-23 21:27 ` [PATCH 1/3] constify exec_file_attach Tom Tromey
2014-07-24  1:27   ` Pedro Alves [this message]
2014-07-24 15:23     ` Tom Tromey
2014-07-24 15:27       ` Pedro Alves
2014-07-23 22:06 ` [PATCH 2/3] constify some cli-utils stuff Tom Tromey
2014-07-24  1:32   ` Pedro Alves
2014-07-30 14:04 ` [PATCH 0/3] constification of to_open Tom Tromey

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=53D06044.4060808@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.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