This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] GDB patches for hw watchpoints - revised
- From: Daniel Jacobowitz <drow at false dot org>
- To: Wu Zhou <woodzltc at cn dot ibm dot com>
- Cc: Eli Zaretskii <eliz at gnu dot org>, gdb-patches at sources dot redhat dot com, mark at xs4all dot nl, bje at au1 dot ibm dot com, anton at au1 dot ibm dot com, pgilliam at us dot ibm dot com
- Date: Mon, 23 Jan 2006 22:43:04 -0500
- Subject: Re: [RFC] GDB patches for hw watchpoints - revised
- References: <Pine.LNX.4.64.0512221130150.16314@localhost.localdomain> <Pine.LNX.4.64.0512221153340.16314@localhost.localdomain> <uhd91eozf.fsf@gnu.org> <Pine.LNX.4.64.0512221241100.16314@localhost.localdomain> <20060122205641.GF27224@nevyn.them.org> <Pine.LNX.4.64.0601241108530.3568@wks190239wss.cn.ibm.com>
On Tue, Jan 24, 2006 at 11:40:16AM +0800, Wu Zhou wrote:
> p630 is one kind of POWER4 based pSeriese server. It is currently the only
> available ppc machine I can get. :-)
>
> In fact, I am not sure before if the ppc arch has nonsteppable watchpoints
> or not. But testing on my p630 box, it did had nonsteppable ones. Now
> that an architecture either have or doesn't have nonsteppable watchpoints,
> can we get from this test a result that ppc architecture has nonsteppable
> watchpoints?
>
> If so, maybe I can just remove the stupid conditional statement below.
> (my original intention is to verify that v->mach equals bfd_mach_ppc_630 :-)
Well, it'd be nice to have some architectural reference for this. But
it's probably a safe bet to assume that this is generally true for all
PowerPC targets, so let's just assume it.
> Function to_region_ok_for_hw_watchpoint is not in the current target
> vector (I means struct target_ops). Maybe we can add it into
> target_ops? There are a few other archs also use this. But they had to
> include it in nm-xxx-yyy.h. If not, the only method I can think of is
> also include its definition in nm-ppc64-linux.h. So what about the
> following patch section?
>
> int (*to_region_size_ok_for_hw_watchpoint) (int);
> + int (*to_region_ok_for_hw_watchpoint) (CORE_ADDR *, int);
> void (*to_terminal_init) (void);
I would recommend replacing to_region_size_ok_for_hw_watchpoint
with to_region_ok_for_hw_watchpoint. You'll have to update the
callers, including the non-multi-arch ones, to ignore the first
argument; shouldn't be hard?
--
Daniel Jacobowitz
CodeSourcery