[RFC] "single step" atomic instruction sequences as a whole on PPC

Luis Machado luisgpm@linux.vnet.ibm.com
Thu May 10 00:48:00 GMT 2007


> I'd just do "opcode = insn >> 26" same as in rs6000_software_single_step.
> (In fact I'm wondering why branch_dest doesn't just that for itself ...).

Follows the updated patch. The "opcode" variable is now being assigned
the correct instruction's opcode value (only the corresponding bits).

As a consequence of this change, i've noticed problems with branch
instructions next to the stwcx/stdcx instructions (the end of the
sequence). Getting the destination address of this type of branch could
potentially (upon a failing branch condition) lead to the function
placing a breakpoint right at the stwcx/stdcx instruction, thus leading
us back to the same locking problem.

The variable "closing_insn" was created to check if the breakpoint at
the branch instruction's destination is right at the stwcx/stdcx
instruction. If so, ignore this breakpoint and consider only the
breakpoint after the closing of the atomic sequence.

Regards,
Luis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_opcode_var.diff
Type: text/x-patch
Size: 2322 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20070510/81448036/attachment.bin>


More information about the Gdb-patches mailing list