This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 0/3] Unit test to regcache::cooked_read and remove Morpho mt port
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 15 Nov 2017 09:12:48 +0000
- Subject: [PATCH 0/3] Unit test to regcache::cooked_read and remove Morpho mt port
- Authentication-results: sourceware.org; auth=none
This patch series adds unit test to regcache::cooked_read, because I am
going to change class regcache, and cooked_read is the most complicated
and basic method, we can't test GDB on every target architecture.
Patches #2 and #3 are about calling cooked_read in readwrite regcache
and readonly regcache.
The tests find two issues, one is in m68hc11, which is fixed by patch #1,
and the other one is in mt, which is difficult to fix. In mt, some
registers are banked, but they are modeled as pseudo registers, which
is wrong to me. As a result, when GDB reads these pseudo registers,
mt backend needs to *write* to a register to select the right bank.
That is, we can't get mt pseudo registers in readonly regcache, because
writing to a readonly regcache will trigger the gdb assert.
The right fix is to model all banked registers as raw registers. However,
Morpho MT GCC port was obsolete in 4.3 and removed in 4.4, so I propose
to remove this port from GDB. I'll send this proposal to
gdb-announce@sourceware.org if I don't get any feedback here.
*** BLURB HERE ***
Yao Qi (3):
Fix M68HC11_NUM_REGS
regcache::cooked_read unit test
cooked_read test for readonly regcache
gdb/gdbarch-selftests.c | 50 +--------
gdb/m68hc11-tdep.c | 2 +-
gdb/regcache.c | 267 ++++++++++++++++++++++++++++++++++++++++++++++++
gdb/target.c | 47 +++++++++
gdb/target.h | 14 +++
5 files changed, 330 insertions(+), 50 deletions(-)
--
1.9.1