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]

[commit] Fix s390-tdep.c build break


Hui Zhu wrote:

> ../../src/gdb/s390-tdep.c: In function 's390_displaced_step_fixup':
> ../../src/gdb/s390-tdep.c:1237: warning: passing argument 3 of
> 'regcache_cooked_read_unsigned' from incompatible pointer type

Ah, it's a ULONGEST vs. CORE_ADDR mismatch ... Sorry for the breakage.

I've checked the following obvious fix into mainline and branch.
Tested on s390(x)-linux.

Bye,
Ulrich

ChangeLog:

	* s390-tdep.c (s390_displaced_step_fixup): Use type ULONGEST
	instead of CORE_ADDR for "amode".

Index: gdb/s390-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/s390-tdep.c,v
retrieving revision 1.185
diff -c -p -r1.185 s390-tdep.c
*** gdb/s390-tdep.c	27 Sep 2009 20:47:42 -0000	1.185
--- gdb/s390-tdep.c	29 Sep 2009 12:05:15 -0000
*************** s390_displaced_step_fixup (struct gdbarc
*** 1230,1236 ****
  
    /* Get current PC and addressing mode bit.  */
    CORE_ADDR pc = regcache_read_pc (regs);
!   CORE_ADDR amode = 0;
  
    if (register_size (gdbarch, S390_PSWA_REGNUM) == 4)
      {
--- 1230,1236 ----
  
    /* Get current PC and addressing mode bit.  */
    CORE_ADDR pc = regcache_read_pc (regs);
!   ULONGEST amode = 0;
  
    if (register_size (gdbarch, S390_PSWA_REGNUM) == 4)
      {


-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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