This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to avoid stepping inside libpthread


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]