How to avoid stepping inside libpthread

Daniel Jacobowitz drow@false.org
Thu Jul 12 11:10:00 GMT 2007


On Thu, Jul 12, 2007 at 03:30:49PM +0900, Atsushi Nemoto wrote:
> +      /* Assume that there is at most one branch in the atomic
> +	 sequence.  If a branch is found, put a breakpoint in its
> +	 destination address.  */
> +      branch_bp = mips_next_pc (loc);
> +      if (branch_bp != loc + MIPS_INSN32_SIZE)

That's not what you want to do.  mips_next_pc decides based on the
current registers whether each branch is taken or not taken, so this
will not detect untaken branches (and it's got the wrong set of
registers, since loc != current pc).  I think we'll have to make
mips_next_pc return whether a control flow changing instruction was
found.  Possibly whether an acceptable branch was found, to avoid
subroutine calls, if that's going to be a problem.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb mailing list