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: Luis Machado <luisgpm at linux dot vnet dot ibm dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 19 May 2008 10:27:02 -0300
- Subject: Re: [PATCH] PPC - Stepping off breakpoints in non-stop mode
- References: <1209753019.7131.29.camel@gargoyle> <200805191422.49117.pedro@codesourcery.com>
- Reply-to: luisgpm at linux dot vnet dot ibm dot com
On Mon, 2008-05-19 at 14:22 +0100, Pedro Alves wrote:
> 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.
Yes, that's true. I'll get this fixed. Thanks!
Regards,
Luis