Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* How do I set a hard watchpoint with gdbserver?
@ 2009-09-17 23:31 Garrod, David
  2009-09-18  0:32 ` Michael Snyder
  0 siblings, 1 reply; 3+ messages in thread
From: Garrod, David @ 2009-09-17 23:31 UTC (permalink / raw)
  To: gdb

I'm using a configuration of gdb and gdbserver. Both the host (gdb) and the target (gdbserver) are running on Linux on Intel 486 or 586 sytstems.

I would like to be able to issue the command:

watch *(int*)addr

and have it set a "hard" watchpoint on the target. What seems to happening is that a soft watchpoint is being set since when I continue everything seems to hang until I ^C and remove the watchpoint.

How do I persuade gdbserver to set a hard watchpoint rather than a soft watchpoint? Breakpoints work fine in that they get set hard.

Thanks,

Dave Garrod


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How do I set a hard watchpoint with gdbserver?
  2009-09-17 23:31 How do I set a hard watchpoint with gdbserver? Garrod, David
@ 2009-09-18  0:32 ` Michael Snyder
  2009-09-18  9:45   ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Snyder @ 2009-09-18  0:32 UTC (permalink / raw)
  To: Garrod, David; +Cc: gdb

Garrod, David wrote:
> I'm using a configuration of gdb and gdbserver. Both the host (gdb) and the target (gdbserver) are running on Linux on Intel 486 or 586 sytstems.
> 
> I would like to be able to issue the command:
> 
> watch *(int*)addr
> 
> and have it set a "hard" watchpoint on the target. What seems to happening is that a soft watchpoint is being set since when I continue everything seems to hang until I ^C and remove the watchpoint.
> 
> How do I persuade gdbserver to set a hard watchpoint rather than a soft watchpoint? Breakpoints work fine in that they get set hard.
> 
> Thanks,
> 
> Dave Garrod
> 

When you give the "watch" command, does gdb respond by saying
that it has set a "hardware watchpoint", or just a "watchpoint"?

If it doesn't say "hardware watchpoint", then probably hardware
watchpoints are disabled.  You enable them like this:

	(gdb) set can-use-hw-watchpoints 1

If that doesn't solve your problem, then do this --

	(gdb) set debug remote 1

right before you say "continue".  You should see a number of
messages, one of which should look like "Z2," followed by the
address that you're trying to watch.

If you don't see that, then gdb is still not trying to send
a hardware watchpoint to gdbserver.  At that point, we would
need to ask what version of gdb, what version of gdbserver, etc.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How do I set a hard watchpoint with gdbserver?
  2009-09-18  0:32 ` Michael Snyder
@ 2009-09-18  9:45   ` Pedro Alves
  0 siblings, 0 replies; 3+ messages in thread
From: Pedro Alves @ 2009-09-18  9:45 UTC (permalink / raw)
  To: gdb; +Cc: Michael Snyder, Garrod, David

Note that gdbserver x86/x86-64 hardware watchpoint support was only added
post 6.8.  There's a 7.0 preview snapshot available you could try.

-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-09-18  9:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-17 23:31 How do I set a hard watchpoint with gdbserver? Garrod, David
2009-09-18  0:32 ` Michael Snyder
2009-09-18  9:45   ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox