This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
RE: Customizing remote-sim.c on a multi-arch target
- From: "Jon Beniston" <jbeniston at compxs dot com>
- To: "'Andrew Cagney'" <cagney at gnu dot org>
- Cc: <gdb at sources dot redhat dot com>
- Date: Thu, 1 Apr 2004 09:59:11 +0100
- Subject: RE: Customizing remote-sim.c on a multi-arch target
- Organization: CompXs
- Reply-to: <jbeniston at compxs dot com>
> >
> > The target vectors are already there (i.e.
> to_insert_watchpoint). It's
> > a question of how/when do I set them to point to the right thing.
> >
> > I'm guessing that I need to add some architecture vectors (i.e.
> > set_gdbarch_sim_*), and somehow get the target vector code to pick
> > these up, but that doesn't seem quite right.
>
> Possibly, there are choices here and both are correct:
>
> - gdb
> Using knowledge of the architectures debug registers. A
> combination of
> target and architecture.
>
> - the inferior
> Using local knowledge.
>
> The latter would mean additions to include/gdb/remote-sim.h
This is what I was planning on doing, however, if I do add the 3 or 4
required functions, it would mean that I would need to add these
functions to all of the simulators. Is that the best way to go about it,
or does it make sense to add a per architecture hook that only installs
them if available?
Cheers,
JonB