From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14410 invoked by alias); 16 Jan 2006 07:17:07 -0000 Received: (qmail 14401 invoked by uid 22791); 16 Jan 2006 07:17:07 -0000 X-Spam-Check-By: sourceware.org Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.201) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 16 Jan 2006 07:17:06 +0000 Received: by zproxy.gmail.com with SMTP id 34so982818nzf for ; Sun, 15 Jan 2006 23:17:04 -0800 (PST) Received: by 10.36.77.16 with SMTP id z16mr4833533nza; Sun, 15 Jan 2006 23:17:04 -0800 (PST) Received: by 10.37.2.42 with HTTP; Sun, 15 Jan 2006 23:17:04 -0800 (PST) Message-ID: <8f2776cb0601152317x5146926ard81b8ad36ba2d362@mail.gmail.com> Date: Mon, 16 Jan 2006 07:17:00 -0000 From: Jim Blandy To: Wu Zhou Subject: Re: A problem about read / access watchpoint Cc: gdb@sources.redhat.com, anton@au1.ibm.com, pgilliam@us.ibm.com In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00135.txt.bz2 On 1/15/06, Wu Zhou wrote: > I did some tracing on that, and find that the kernel _did_ issue signal > trap on line 15, and gdb could also get the stopped data address by > ptrace. But when gdb call watchpoint_check to check if the value changed > or not. It will reports WP_VALUE_CHANGED, which really confuse me. Just out of curiosity, could you post a disassembly of main? The kernel is watching what the machine code version of the program does, and I wouldn't assume that it was the same as what the source code version does, even if you compile with -O0.