Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
To: gdb-patches@sourceware.org
Cc: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>,
	       Ulrich Weigand <uweigand@de.ibm.com>
Subject: [PATCH] Fix build breakage from commit 6ec2b2
Date: Thu, 22 Sep 2016 14:30:00 -0000	[thread overview]
Message-ID: <1474554401-27177-1-git-send-email-emachado@linux.vnet.ibm.com> (raw)
In-Reply-To: <1474473422-16301-1-git-send-email-emachado@linux.vnet.ibm.com>

Hi,
I was notified by buildbot that my patch (commit 6ec2b2) has broken the build
on x86_64:

...
g++ -m32   -I. -I../../binutils-gdb/gdb -I../../binutils-gdb/gdb/common -I../../binutils-gdb/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I../../binutils-gdb/gdb/../include/opcode -I../../binutils-gdb/gdb/../opcodes/.. -I../../binutils-gdb/gdb/../readline/.. -I../../binutils-gdb/gdb/../zlib -I../bfd -I../../binutils-gdb/gdb/../bfd -I../../binutils-gdb/gdb/../include -I../libdecnumber -I../../binutils-gdb/gdb/../libdecnumber  -I../../binutils-gdb/gdb/gnulib/import -Ibuild-gnulib/import   -DTUI=1  -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-write-strings -Wno-narrowing -Wformat-nonliteral -Werror -c -o s390-linux-tdep.o -MT s390-linux-tdep.o -MMD -MP -MF .deps/s390-linux-tdep.Tpo ../../binutils-gdb/gdb/s390-linux-tdep.c
../../binutils-gdb/gdb/rs6000-tdep.c: In function int ppc_process_record_op31(gdbarch*, regcache*, CORE_ADDR, uint32_t):
../../binutils-gdb/gdb/rs6000-tdep.c:4705:50: error: cannot convert CORE_ADDR* {aka long unsigned int*} to ULONGEST* {aka long long unsigned int*} for argument 3 to register_status regcache_raw_read_unsigned(regcache*, int, ULONGEST*)
         tdep->ppc_gp0_regnum + PPC_RA (insn), &ea);
                                                  ^
../../binutils-gdb/gdb/rs6000-tdep.c:4718:50: error: cannot convert CORE_ADDR* {aka long unsigned int*} to ULONGEST* {aka long long unsigned int*} for argument 3 to register_status regcache_raw_read_unsigned(regcache*, int, ULONGEST*)
         tdep->ppc_gp0_regnum + PPC_RA (insn), &ea);
                                                  ^
Makefile:1140: recipe for target 'rs6000-tdep.o' failed
make[2]: *** [rs6000-tdep.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/gdb-buildbot-2/fedora-x86-64-2/fedora-i686/build/gdb'
Makefile:8827: recipe for target 'all-gdb' failed
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory '/home/gdb-buildbot-2/fedora-x86-64-2/fedora-i686/build'
Makefile:850: recipe for target 'all' failed
make: *** [all] Error 2

The patch below should fix it. Sorry for the disturbance.

Thanks,
--
Edjunior

gdb/ChangeLog:
2016-09-22  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>

	* rs6000-tdep.c (ppc_process_record_op31): Fix
	regcache_raw_read_unsigned call using the correct parameter type.

---
 gdb/rs6000-tdep.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 1add498..ca4d668 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -4700,9 +4700,11 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache,
 
     case 397:		/* Store VSX Vector with Length */
     case 429:		/* Store VSX Vector Left-justified with Length */
+      ra = 0;
       if (PPC_RA (insn) != 0)
 	regcache_raw_read_unsigned (regcache,
-				    tdep->ppc_gp0_regnum + PPC_RA (insn), &ea);
+				    tdep->ppc_gp0_regnum + PPC_RA (insn), &ra);
+      ea = ra;
       regcache_raw_read_unsigned (regcache,
 				  tdep->ppc_gp0_regnum + PPC_RB (insn), &rb);
       /* Store up to 16 bytes.  */
@@ -4713,9 +4715,11 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache,
 
     case 710:		/* Store Word Atomic */
     case 742:		/* Store Doubleword Atomic */
+      ra = 0;
       if (PPC_RA (insn) != 0)
 	regcache_raw_read_unsigned (regcache,
-				    tdep->ppc_gp0_regnum + PPC_RA (insn), &ea);
+				    tdep->ppc_gp0_regnum + PPC_RA (insn), &ra);
+      ea = ra;
       switch (ext)
 	{
 	case 710:	/* Store Word Atomic */
-- 
2.5.5


  parent reply	other threads:[~2016-09-22 14:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21 16:04 [PATCH] ppc: Add Power ISA 3.0/POWER9 instructions record support Edjunior Barbosa Machado
2016-09-21 16:23 ` Ulrich Weigand
2016-09-21 16:40   ` Edjunior Barbosa Machado
2016-09-22 14:30 ` Edjunior Barbosa Machado [this message]
2016-09-22 14:32   ` [PATCH] Fix build breakage from commit 6ec2b2 Ulrich Weigand
2016-09-22 15:05     ` Edjunior Barbosa Machado

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=1474554401-27177-1-git-send-email-emachado@linux.vnet.ibm.com \
    --to=emachado@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.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