This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Advise needed on memory mapped control registers
- To: dolson at dotcast dot com
- Subject: Re: Advise needed on memory mapped control registers
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 10 Oct 2001 01:10:56 -0400
- Cc: gdb at sourceware dot cygnus dot com
- References: <E5693199C332CE4491F9E119C2A55A9001430A@Dc-sea1.dotcast.com>
> I'm changing gdb to work with a new CPU architecture that defines a bunch of
> (80) memory mapped control registers. I have at least two options for
> refering to these registers in the debugger by name:
>
> 1. Have the assembler generate stabs for each control register name and
> address. But then gdb will only know about the control registers when
> executable has debug info.
>
> 2. Create global symbols for each control register within gdb so that can
> use control register names regardless if debug info is available.
>
> Any opinions?
None of the above?
Several things you probably want to look at:
o multi-arch - unless this is a native target it will need to be
pure-multi-arch. native targets need to be multi-arch, just not pure.
The m68hc11 is a good example.
o the recently added methods gdbarch_register_{read,write} and pseudo registers.
o the TODO file where there is a very long list of functions and global
variables that should be avoided.
enjoy,
Andrew