[PATCH]: Support memory banks debug with 68HC12
Stephane Carrez
stcarrez@nerim.fr
Tue Aug 13 10:27:00 GMT 2002
Hi!
This patch allows debugging 68HC12 code in its 16K memory bank window.
It creates a virtual PC (pseudo reg) which represents code in the banked memory.
It is computed using the real PC and the page number. The banked memory is a
flat address space starting at hypothetical address 0x1000000. It is accessed
using the 8-bit page register and the 14 lower bits of the PC.
I've committed this patch on mainline. (but only tested with simple program).
Stephane
2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
* m68hc11-tdep.c (M68HC12_NUM_PSEUDO_REGS): New define.
(M68HC12_HARD_PC_REGNUM): Define specific PC for 68HC12 (pseudo reg).
(m68hc11_pseudo_register_read): Compute the 68HC12 PC using the
real PC and the page number (if it's within the memory bank window).
(m68hc11_pseudo_register_write): Likewise when saving.
(m68hc11_register_name): Name the virtual pc 'pc' and the real one ppc.
(m68hc11_register_virtual_type): Return uint32 for virtual pc.
(m68hc11_register_raw_size): And use 32-bit for it.
(m68hc11_gdbarch_init): Use 32-bit address for 68HC12 if the
16K memory bank is used by the prog; also use the virtual pc.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: m68hc11-tdep.c.diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20020813/50096e82/attachment.ksh>
More information about the Gdb-patches
mailing list