This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: supporting hw break/watch for embedded ppc
- From: "John S. Yates, Jr." <jyates at netezza dot com>
- To: "Andrew Cagney" <ac131313 at redhat dot com>
- Cc: "gdb" <gdb at sources dot redhat dot com>
- Date: Mon, 9 Jun 2003 11:07:12 -0400
- Subject: Re: supporting hw break/watch for embedded ppc
- Organization: Netezza Corporation
- References: <005d01c32a0f$86f44fa0$1400a8c0@astral> <3EE38BB8.1060904@redhat.com>
- Reply-to: "John S. Yates, Jr." <jyates at netezza dot com>
> > I have an mpc855 remote stub that implements Z0/z0.
> > This worked entirely as expected. Auto-detection
> > used to attempt Z0, discover it was unsupported,
> > and refrained from ever trying it again. Naively I
> > assumed that the remaining Zt variants would behave
> > similarly. This is not the case.
>
> It should be the case.
>
> > So where do I go to enable ppc hw breaks/watches?
>
> ``set debug remote 1'' to see exactly what the host/target are doing.
Been there. Done that.
The culprit is remote.c/remote_check_watch_resources
which is hardwired via the earlier definitions:
int remote_hw_watchpoint_limit = 0;
int remote_hw_breakpoint_limit = 0;
For now I have added comparisons between chip names
and TARGET_ARCHITECTURE->printable_name along with
corresponding known numbers of resource. It ain't
pretty but it does work.
Am I missing something?
I do not see a parameterized abstraction here that
would operate off the # of hw breakpoint resources,
the # of hw watchpoint resource and an indication
that heterogeneous watch sets are supported (see the
"ot" argument to remote_check_watch_resources).
Nor do I see a way to provide a chip-specific
implementation of to_can_use_hw_breakpoint.
(But then I have zero grasp of how architectural
parameterization works. I just grep and look for
obvious patterns that I can mimic.)
/john