This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Watchpoint single-stepping.
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.