This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Redeclaration of regcache_register_status differs from previous declaration
- From: Pedro Alves <palves at redhat dot com>
- To: selven <pcthegreat at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 28 Sep 2012 13:05:32 +0100
- Subject: Re: Redeclaration of regcache_register_status differs from previous declaration
- References: <CADW03iqgC=8e2XEsQfnSiuHNiKHhXzCOaY2naCOaF6wzDN94NA@mail.gmail.com>
On 09/28/2012 12:27 PM, selven wrote:
> Hi, I've never submitted a patch to gdb before, I don't know how to do
> this,
See <http://sourceware.org/gdb/contribute/>.
> and I searched the wiki couldn't find more info.
Yeah, we certainly could do better here.
> I was trying to compile gdb on aix
> Currently:
> gdb/regcache.c
> 414 int
> 415 regcache_register_status (const struct regcache *regcache, int regnum)
>
> Definition in regcache.h:
> gdb/regcache.h
> 66 enum register_status regcache_register_status (const struct
> regcache *regcache,
> 67 int regnum);
>
>
> Should be:
> 414 enum register_status
> 415 regcache_register_status (const struct regcache *regcache, int regnum)
Whoops.
>
> (So i kinda decided to post a patch, which sounded awesome :p )
It is. :-) The AIX port is in need of TLC (particularly to adapt
it to modern interfaces). It would be great of someone stepped up
to give it some. ;-)
I've applied this for you.
Thanks!
2012-09-28 selven <pcthegreat@gmail.com>
Make definition match declaration.
* regcache.c (regcache_register_status): Change return type to
enum register_status.
---
gdb/regcache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/regcache.c b/gdb/regcache.c
index c716280..449f682 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -411,7 +411,7 @@ regcache_dup (struct regcache *src)
return newbuf;
}
-int
+enum register_status
regcache_register_status (const struct regcache *regcache, int regnum)
{
gdb_assert (regcache != NULL);