From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22151 invoked by alias); 18 Jan 2008 04:26:25 -0000 Received: (qmail 22143 invoked by uid 22791); 18 Jan 2008 04:26:25 -0000 X-Spam-Check-By: sourceware.org Received: from mail.sunnorth.com.cn (HELO bjmsw01.sunnorth.com.cn) (124.42.0.200) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 18 Jan 2008 04:26:05 +0000 Received: from maillog.sunnorth.com.cn (unverified [172.20.10.250]) by bjmsw01.sunnorth.com.cn (Clearswift SMTPRS 5.2.9) with ESMTP id ; Fri, 18 Jan 2008 12:25:57 +0800 Received: from ntns1cn.sunnorth.com.cn (ntns1cn.sunnorth.com.cn [172.20.10.252]) by maillog.sunnorth.com.cn (8.12.10/8.12.10) with ESMTP id m0I4U6gw004442; Fri, 18 Jan 2008 12:30:08 +0800 In-Reply-To: <20080117144410.GF9907@caradoc.them.org> To: Daniel Jacobowitz Cc: gdb@sourceware.org Subject: Re: mi-watch.exp fail, pls help MIME-Version: 1.0 X-Mailer: Lotus Notes Release 6.5 September 26, 2003 Message-ID: From: ligang@sunnorth.com.cn Date: Fri, 18 Jan 2008 04:26:00 -0000 Content-Type: text/plain; charset="US-ASCII" 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: 2008-01/txt/msg00161.txt.bz2 Daniel Jacobowitz wrote on 2008-01-17 22:44:10: > On Thu, Jan 17, 2008 at 11:57:33AM +0800, ligang@sunnorth.com.cn wrote: > > After setting watchpoint to C, it will be hit at 0x11e, and PC will be > > 0x120 at the time, > > but GDB will execute a single step, after that, PC will be 0x122, so > > source line will be 36 but not > > expected 35. > > Anyone can tell me how to resolve this problem? > > Check your target configuration. GDB thinks you have non-steppable > watchpoints, but you actually have continuable watchpoints. After a watchpoint trap in my target, the PC points to the instruction after the one that caused the trap. But after stepping over the traped instruction(example store), my target increases PC to the next instruction, so, the source line will not be correct. It occurs at whatever HAVE_NONSTEPPABLE_WATCHPOINT or HAVE_CONTINUABLE_WATCHPOINT. Dose it mean that my target can not match the action of GDB? > Daniel Jacobowitz > CodeSourcery