From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21662 invoked by alias); 8 Oct 2006 20:01:55 -0000 Received: (qmail 21652 invoked by uid 22791); 8 Oct 2006 20:01:54 -0000 X-Spam-Check-By: sourceware.org Received: from wx-out-0506.google.com (HELO wx-out-0506.google.com) (66.249.82.236) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 08 Oct 2006 20:01:52 +0000 Received: by wx-out-0506.google.com with SMTP id s19so1369347wxc for ; Sun, 08 Oct 2006 13:01:50 -0700 (PDT) Received: by 10.70.117.3 with SMTP id p3mr9799950wxc; Sun, 08 Oct 2006 13:01:50 -0700 (PDT) Received: by 10.70.37.16 with HTTP; Sun, 8 Oct 2006 13:01:50 -0700 (PDT) Message-ID: Date: Sun, 08 Oct 2006 20:01:00 -0000 From: "Rob Quill" To: gdb@sourceware.org Subject: Re: Watchpoint single-stepping. In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1160262732.5142.8.camel@funkylaptop> 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-10/txt/msg00035.txt.bz2 Hi, Thanks for your help. What I am trying to do is mimic the way a software watchpoint works, in that I want to make GDB single-step through the program and then compare the values of the current variables to some other values. What suggestions would you have for implementing this, as I'm not sure how to go about it becasue there is no documentation in GDB Internals on how single-stepping is done. On a side note, does GDB maintain a internal model of the control flow graph of the program being executed. Thanks for your help. Rob On 08/10/06, Fr=E9d=E9ric Riss wrote: > Le samedi 07 octobre 2006 =E0 23:55 +0100, Rob Quill a =E9crit : > > I am trying to find the point in the code where the conditions of a > > software watchpoint are checked each step, as I wish to add something > > that also requires the checking of values of variables at each step. > > Does anyone know where this is? > > All the low-level stepping is done in the infrun.c file. Look > particularly at the handle_inferior_event function which is called for > each target stop event. There you'll find calls to bpstat_stop_status > (defined in breakpoint.c) where watchpoint expressions are re-evealuated > and compared to their old value. > > Fred. > >