This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: supporting hw break/watch for embedded ppc


> > 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]