> 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