This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Z packet support in Gdbserver?
- From: Andrew Cagney <cagney at gnu dot org>
- To: Orjan Friberg <orjan dot friberg at axis dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 25 May 2004 14:03:11 -0400
- Subject: Re: Z packet support in Gdbserver?
- References: <40B3650C.5090800@axis.com>
I noticed there's no support for z/Z packets for hardware watchpoints in the gdbserver. (I searched the archives for this, but came up empty-handed.) I'd guess that (from looking at ptrace.c for i386, where it accesses the DR_ registers) that the Gdbserver gets to configure the hardware breakpoint mechanism through ptrace (PTRACE_POKEUSR, ...). But how does it get there in the first place, if not as a result of a z/Z packet? Through direct register writes (G packet)?
Yep.
There are two ways to implement h/w watchpoints: in the target (as was
done for remote.c); or in the per-architecture code (as was done for
native i386). Both are correct. The missing bit is code to get the
per-architecture logic working with a remote target - this would involve
juggling things so that the h/w watchpoint registers are included in the
regcache and the target/arch to select either a local/remote mechanism.
More notes:
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=735
Andrew