* Watchpoint single-stepping.
@ 2006-10-07 22:55 Rob Quill
2006-10-07 23:13 ` Frédéric Riss
[not found] ` <1160262732.5142.8.camel@funkylaptop>
0 siblings, 2 replies; 4+ messages in thread
From: Rob Quill @ 2006-10-07 22:55 UTC (permalink / raw)
To: gdb
Hi,
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?
Thanks for your time.
Rob
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Watchpoint single-stepping.
2006-10-07 22:55 Watchpoint single-stepping Rob Quill
@ 2006-10-07 23:13 ` Frédéric Riss
[not found] ` <1160262732.5142.8.camel@funkylaptop>
1 sibling, 0 replies; 4+ messages in thread
From: Frédéric Riss @ 2006-10-07 23:13 UTC (permalink / raw)
To: Rob Quill; +Cc: gdb
Le samedi 07 octobre 2006 à 23:55 +0100, Rob Quill a écrit :
> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Watchpoint single-stepping.
[not found] ` <baf6008d0610081301k49a5bff5ueed19f1c5f60e6ab@mail.gmail.com>
@ 2006-10-08 20:01 ` Rob Quill
2006-10-09 18:09 ` Michael Snyder
0 siblings, 1 reply; 4+ messages in thread
From: Rob Quill @ 2006-10-08 20:01 UTC (permalink / raw)
To: gdb
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édéric Riss <frederic.riss@gmail.com> wrote:
> Le samedi 07 octobre 2006 à 23:55 +0100, Rob Quill a écrit :
> > 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.
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Watchpoint single-stepping.
2006-10-08 20:01 ` Rob Quill
@ 2006-10-09 18:09 ` Michael Snyder
0 siblings, 0 replies; 4+ messages in thread
From: Michael Snyder @ 2006-10-09 18:09 UTC (permalink / raw)
To: Rob Quill; +Cc: gdb
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-10-09 18:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-07 22:55 Watchpoint single-stepping Rob Quill
2006-10-07 23:13 ` Frédéric Riss
[not found] ` <1160262732.5142.8.camel@funkylaptop>
[not found] ` <baf6008d0610081301k49a5bff5ueed19f1c5f60e6ab@mail.gmail.com>
2006-10-08 20:01 ` Rob Quill
2006-10-09 18:09 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox