This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix build breakage from commit 6ec2b2


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]