This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] "single step" atomic instruction sequences as a whole on PPC
- From: Luis Machado <luisgpm at linux dot vnet dot ibm dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 09 May 2007 15:05:26 -0300
- Subject: Re: [RFC] "single step" atomic instruction sequences as a whole on PPC
- References: <200705091433.l49EXOfG024847@d12av02.megacenter.de.ibm.com>
- Reply-to: luisgpm at linux dot vnet dot ibm dot com
> Actually, I think there's still a problem with the patch. Sorry for
> not noticing earlier. You call:
>
> > +#define BC_INSTRUCTION 0x40000000
> > + const int opcode = BC_INSTRUCTION; /* Branch instruction's OPcode. */
> > + branch_bp = branch_dest (opcode, insn, pc, breaks[0]);
>
> branch_dest with 0x40000000 as opcode -- however, it appears the
> routine expects to be called with just the opcode bits, i.e. 16
> in the case of a conditional branch.
>
> See the call in rs6000_software_single_step:
> > opcode = insn >> 26;
> > breaks[1] = branch_dest (opcode, insn, loc, breaks[0]);
>
> Could you implement and test a patch to fix this, please?
Sure, no problem. I will update the patch, test and re-subtmit when it's
ready.
Regards,
Luis