From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8007 invoked by alias); 12 Jul 2007 11:10:28 -0000 Received: (qmail 7991 invoked by uid 22791); 12 Jul 2007 11:10:26 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 12 Jul 2007 11:10:24 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id B4E65982D0; Thu, 12 Jul 2007 11:10:23 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 71C90982A2; Thu, 12 Jul 2007 11:10:23 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1I8wYv-00079A-Oh; Thu, 12 Jul 2007 07:10:21 -0400 Date: Thu, 12 Jul 2007 11:10:00 -0000 From: Daniel Jacobowitz To: Atsushi Nemoto Cc: schwab@suse.de, gdb@sourceware.org Subject: Re: How to avoid stepping inside libpthread Message-ID: <20070712111021.GA27185@caradoc.them.org> Mail-Followup-To: Atsushi Nemoto , schwab@suse.de, gdb@sourceware.org References: <20070711.151820.55513191.nemoto@toshiba-tops.co.jp> <20070712.111540.126572286.nemoto@toshiba-tops.co.jp> <20070712.153049.37530505.nemoto@toshiba-tops.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070712.153049.37530505.nemoto@toshiba-tops.co.jp> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-07/txt/msg00113.txt.bz2 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