This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] PPC - Stepping off breakpoints in non-stop mode
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org, luisgpm at linux dot vnet dot ibm dot com
- Date: Mon, 19 May 2008 14:22:48 +0100
- Subject: Re: [PATCH] PPC - Stepping off breakpoints in non-stop mode
- References: <1209753019.7131.29.camel@gargoyle>
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