This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH]: Make Linux use the new unified x86 watchpoint support
- To: eliz at is dot elta dot co dot il
- Subject: Re: [PATCH]: Make Linux use the new unified x86 watchpoint support
- From: Mark Salter <msalter at redhat dot com>
- Date: Wed, 28 Mar 2001 08:11:55 -0500
- CC: kettenis at science dot uva dot nl, msnyder at cygnus dot com, gdb-patches at sources dot redhat dot com
- References: <Pine.SUN.3.91.1010328111631.4337A-100000@is>
>>>>> Eli Zaretskii writes:
> On Tue, 27 Mar 2001, Mark Salter wrote:
>> When a read wathcpoint is triggered, the target stops and informs gdb.
>> In breakpoint.c, gdb sees that there are read or access watchpoints set
>> and that the data address reported by the target matches. This causes
>> watchpoint_check() to be called. The problem is that watchpoint_check()
>> will try to read from the watched data area to see if it changed, but
>> this is done before gdb has removed watchpoints from the target. This
>> causes the target to respond with an error when gdb tries to access the
>> watched area.
> Sorry, I don't understand: why does reading a watched region generate
> an error? At least in the x86 implementation, watchpoints are set to
> be task-local, so reading the data from GDB, which is another process,
> should not produce any errors. Am I missing something?
I'm using a remote target which has global hw watchpoints and no OS.
The remote target still has the watchpoints installed when gdb tries
to read the area being watched. I don't know. Maybe the target stub
should take it upon itself to remove the watchpoints before telling
gdb it stopped?
--Mark