From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19007 invoked by alias); 9 Oct 2006 18:09:10 -0000 Received: (qmail 18998 invoked by uid 22791); 9 Oct 2006 18:09:09 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.palmsource.com (HELO mx2.palmsource.com) (12.7.175.14) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 09 Oct 2006 18:09:03 +0000 Received: from localhost (localhost [127.0.0.1]) by localhost.domain.tld (Postfix) with ESMTP id EB96F26FD7; Mon, 9 Oct 2006 11:09:00 -0700 (PDT) Received: from mx2.palmsource.com ([127.0.0.1]) by localhost (mx2.palmsource.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07117-04-14; Mon, 9 Oct 2006 11:08:59 -0700 (PDT) Received: from ussunex01.palmsource.com (unknown [192.168.101.9]) by mx2.palmsource.com (Postfix) with ESMTP id 4CB5F26F94; Mon, 9 Oct 2006 11:08:58 -0700 (PDT) Received: from 192.168.92.75 ([192.168.92.75]) by ussunex01.palmsource.com ([192.168.101.9]) via Exchange Front-End Server owa.palmsource.com ([10.0.20.17]) with Microsoft Exchange Server HTTP-DAV ; Mon, 9 Oct 2006 18:08:59 +0000 Received: from svmsnyderlnx by owa.palmsource.com; 09 Oct 2006 11:08:57 -0700 Subject: Re: Watchpoint single-stepping. From: Michael Snyder To: Rob Quill Cc: gdb@sourceware.org In-Reply-To: References: <1160262732.5142.8.camel@funkylaptop> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Mon, 09 Oct 2006 18:09:00 -0000 Message-Id: <1160417337.14535.27.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 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/msg00042.txt.bz2 On Sun, 2006-10-08 at 21:01 +0100, Rob Quill wrote: > 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. This is a tall order. Even to attempt to explain how gdb works in this area would be a big effort. I suggest that, if you want to do something that works kind of like a watchpoint, you spend some time figuring out how watchpoints work. Set a watchpoint, then step thru the gdb code to figure out how it works. Concentrate on infrun.c and breakpoint.c. Take lots of notes. ;-) > On a side note, does GDB maintain a internal model of the control flow > graph of the program being executed. No. Nothing even remotely similar.