Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH c++ 5/5] mips: Add cast for int to enum conversion
Date: Mon, 12 Oct 2015 10:54:00 -0000	[thread overview]
Message-ID: <561B9166.7090101@redhat.com> (raw)
In-Reply-To: <1444538238-7468-5-git-send-email-simon.marchi@polymtl.ca>

On 10/11/2015 05:37 AM, Simon Marchi wrote:
> This patch is taken directly from Pedro's branch.
> 
> /home/pedro/gdb/mygit/src/gdb/mips-tdep.c: In function ‘ULONGEST mips_fetch_instruction(gdbarch*, mips_isa, CORE_ADDR, int*)’:
> /home/pedro/gdb/mygit/src/gdb/mips-tdep.c:1460:28: error: invalid conversion from ‘int’ to ‘target_xfer_status’ [-fpermissive]
>   memory_error (status, addr);
> 
> gdb/ChangeLog:
> 
> 	* mips-tdep.c (mips_fetch_instruction): Add cast.
> ---
>  gdb/mips-tdep.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
> index 2275138..73b9221 100644

> --- a/gdb/mips-tdep.c
> +++ b/gdb/mips-tdep.c
> @@ -1456,7 +1456,7 @@ mips_fetch_instruction (struct gdbarch *gdbarch,
>    if (status)
>      {
>        if (statusp == NULL)
> -	memory_error (status, addr);
> +	memory_error ((enum target_xfer_status) status, addr);
>        return 0;
>      }

Please don't.  As discussed a while ago in IRC, I think we should
stop making target_read_memory & friends return a target_xfer_status.

I have a different patch in the branch to do that:

 https://github.com/palves/gdb/commit/22e5f84529cbe06a7b5c7fbbf662640b84e5cfb9

Thanks,
Pedro Alves


  reply	other threads:[~2015-10-12 10:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-11  4:37 [PATCH c++ 1/5] lm32: Add (const gdb_byte *) cast Simon Marchi
2015-10-11  4:37 ` [PATCH c++ 3/5] mep: Add cast for int to enum conversion Simon Marchi
2015-10-12 10:35   ` Yao Qi
2015-10-12 16:43     ` Simon Marchi
2015-10-11  4:37 ` [PATCH c++ 2/5] m32c: Split m32c_move_reg_t in read/write variants Simon Marchi
2015-10-12 10:47   ` Yao Qi
2015-10-12 16:42     ` Simon Marchi
2015-10-11  4:37 ` [PATCH c++ 4/5] mips: fix void*/gdb_byte* compilation errors Simon Marchi
2015-10-22 13:13   ` Pedro Alves
2015-10-11  4:44 ` [PATCH c++ 5/5] mips: Add cast for int to enum conversion Simon Marchi
2015-10-12 10:54   ` Pedro Alves [this message]
2015-10-12 16:28     ` Simon Marchi
2015-10-12 10:52 ` [PATCH c++ 1/5] lm32: Add (const gdb_byte *) cast Yao Qi
2015-10-12 11:10 ` Pedro Alves
2015-10-12 12:18   ` Jon Beniston
2015-10-13 17:14   ` Simon Marchi
2015-10-13 17:32     ` Pedro Alves
2015-10-13 17:37       ` Simon Marchi
2015-10-22  9:59 ` Simon Marchi
2015-10-22 13:34   ` Pedro Alves
2015-10-22 13:39     ` Simon Marchi
2015-10-22 15:21   ` 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=561B9166.7090101@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /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