This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Adding MAC registers on H8300 Simulator [H8S/2600]
- From: Petr Ledvina <ledvinap at n dot cz>
- To: "D.Venkatasubramanian, Noida" <dvenkat at noida dot hcltech dot com>
- Cc: <gnuh8 at gnuh8 dot org dot uk>, <gdb at sources dot redhat dot com>
- Date: Thu, 20 Feb 2003 17:18:00 +0100 (MET)
- Subject: Re: Adding MAC registers on H8300 Simulator [H8S/2600]
> As the H8S/2600 CPU has MAC registers, specifically
> MACH and MACL, I added them to the H8300 Simulator. How
> do I make GDB recognize these registers, more
> specifically, what are the files that need to be
> modified?
in target definition, NUM_REGS specifies how many registers gdb uses.
REGISTER_NAME return name of given register.
This vector already contains special registers (cycles, inst, .. ), so it
should be possible to add new registers.
gdbstub needs to only know register index mapping, so adding new registers
to end of this list should be compatible.
Also check cvs log, someone (Andrew Volkov?) added exr register recently
to simulator, so he could know better.
> Also, how do I make these registers conditionally
> displayed on GDB when the CPU is H8S/2600.
IIRC gdb knows only h8s target, so this could be quite difficult.
> Any pointers will be highly appreciated. ;-)
Expanding register vector should work fine, but gdb maintainers opinion
may be different ...
Petr Ledvina
ledvinap at n dot cz