Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: selven <pcthegreat@gmail.com>
To: gdb-patches@sourceware.org
Subject: Redeclaration of regcache_register_status differs from previous declaration
Date: Fri, 28 Sep 2012 11:27:00 -0000	[thread overview]
Message-ID: <CADW03iqgC=8e2XEsQfnSiuHNiKHhXzCOaY2naCOaF6wzDN94NA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2233 bytes --]

Hi, I've never submitted a patch to gdb before, I don't know how to do
this, and I searched the wiki couldn't find more info. I was trying to
compile gdb on aix

0|myuser@abox Downloads $ uname -a
AIX abox 1 6 00C2EE1A4C00

Was configuring with:
 ./configure --prefix=/home/myuser/chrooted --disable-option-checking
--disable-libada --disable-libssp --disable-build-with-cxx
--disable-ppl-version-check  --disable-cloog-version-check
--disable-objc-gc --enable-serial-configure --disable-maintainer-mode
--disable-stage1-checking --disable-werror --disable-sim

Which went fine , I did a make, which ended in:


"regcache.c", line 229.9: 1506-068 (W) Operation between types "signed
char*" and "unsigned char*" is not allowed.
"regcache.c", line 236.9: 1506-068 (W) Operation between types "signed
char*" and "unsigned char*" is not allowed.
"regcache.c", line 415.1: 1506-343 (S) Redeclaration of
regcache_register_status differs from previous declaration on line 66
of "regcache.h".
"regcache.c", line 415.1: 1506-050 (I) Return type "int" in
redeclaration is not compatible with the previous return type "enum
register_status".
"regcache.c", line 417.3: 1506-045 (S) Undeclared identifier __func__.
make: 1254-004 The error code from the last command is 1.

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)

(So i kinda decided to post a patch, which sounded awesome :p )
Patch:
--- regcache.c  2012-09-28 07:12:18.019876000 -0400
+++ regcache_fixed.c    2012-09-28 07:12:19.049855400 -0400
@@ -411,7 +411,7 @@
   return newbuf;
 }

-int
+enum register_status
 regcache_register_status (const struct regcache *regcache, int regnum)
 {
   gdb_assert (regcache != NULL);




My sincere apologies if this shouldn't have been posted here.

--
Pirabarlen Cheenaramen | $3|v3n
L'escalier

/*memory is like prison*/ (user==selven)?free(user):user=malloc(sizeof(brain));

[-- Attachment #2: regcache_patch.diff --]
[-- Type: application/octet-stream, Size: 287 bytes --]

--- regcache.c	2012-09-28 07:12:18.019876000 -0400
+++ regcache_fixed.c	2012-09-28 07:12:19.049855400 -0400
@@ -411,7 +411,7 @@
   return newbuf;
 }
 
-int
+enum register_status
 regcache_register_status (const struct regcache *regcache, int regnum)
 {
   gdb_assert (regcache != NULL);

             reply	other threads:[~2012-09-28 11:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-28 11:27 selven [this message]
2012-09-28 12:05 ` Pedro Alves

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='CADW03iqgC=8e2XEsQfnSiuHNiKHhXzCOaY2naCOaF6wzDN94NA@mail.gmail.com' \
    --to=pcthegreat@gmail.com \
    --cc=gdb-patches@sourceware.org \
    /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