This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Setting watchpoints
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Al Niessner <Al dot Niessner at jpl dot nasa dot gov>
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 17 Apr 2003 16:20:08 -0400
- Subject: Re: Setting watchpoints
- References: <1050610199.24880.20.camel@morte.jpl.nasa.gov>
On Thu, Apr 17, 2003 at 01:09:59PM -0700, Al Niessner wrote:
>
> Platform information:
> OS: Linux
> Kernel: 2.4.19
> gcc/g++: 3.2.2
> gdb: 5.3
> threads: 1 -- single threaded application
>
>
> How do I set a watch point so that the debugger halts when memory at a
> specific address is changed? There is no easy to define variable that I
> can latch onto, but I do know its address. When I set a watch point to
> this address -- 'watch 0x8559ff4' or 'watch *0x8559ff4' -- gdb just
> sails by this memory being changed. If I set a conditional break point
> just prior to the segmentation fault I can see the change and so can gdb
> it just does not sense it with the watch. So, what am I doing wrong and
> how do I get gdb to monitor a memory location and halt when it changes?
> I have already searched the web (google) and did not find any solutions
> there.
Does "watch *(int *) 0x8559ff4" work? How big is the area you're
watching?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer