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]

Re: [PATCH] PPC - Stepping off breakpoints in non-stop mode


A Friday 02 May 2008 19:30:18, Luis Machado wrote:

+void
+ppc_displaced_step_fixup (struct gdbarch *gdbarch,
+                          struct displaced_step_closure *closure,
+                          CORE_ADDR from, CORE_ADDR to,
+                          struct regcache *regs)
+{
+  /* Since we use simple_displaced_step_copy_insn, our closure is a
+     copy of the instruction.  */
+  unsigned int *insn  = (unsigned int *) closure;
+  unsigned int opcode = (*insn & BRANCH_MASK);

...
+      char link_register_bit = (char) (*insn & 0x1);
+      unsigned long current_pc;

Using unsigned int, char and unsigned long in a tdep file isn't
safe.  Can you switch to gdb_bytes and CORE_ADDR's?  This file
is used for cross-debugging.

-- 
Pedro Alves


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