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 warning/error in rs6000-tdep.c


I've just committed the patch below.  It fixes a warning (or an error
when -Werror is enabled).

The affected function, ppc_displaced_step_fixup(), makes a call to
regcache_cooked_read_unsigned() whose third argument is supposed
to be of type `ULONGEST *'.  I've adjusted the type of the variable
whose address is passed to regcache_cooked_read_unsigned() in order
to eliminate the type mismatch.

Kevin

	* rs6000-tdep.c (ppc_displaced_step_fixup): Change type of
	`current_pc' from CORE_ADDR to ULONGEST.

Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.316
diff -u -p -r1.316 rs6000-tdep.c
--- rs6000-tdep.c	30 Jun 2008 14:11:48 -0000	1.316
+++ rs6000-tdep.c	10 Jul 2008 19:38:05 -0000
@@ -876,7 +876,7 @@ ppc_displaced_step_fixup (struct gdbarch
   /* Handle PC-relative branch instructions.  */
   if (opcode == B_INSN || opcode == BC_INSN || opcode == BXL_INSN)
     {
-      CORE_ADDR current_pc;
+      ULONGEST current_pc;
 
       /* Read the current PC value after the instruction has been executed
 	 in a displaced location.  Calculate the offset to be applied to the


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