diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2011-09-06 03:55:52 +0400 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-09-10 16:57:40 +0000 |
commit | ccfcaba6fd9f69a9322af1911302e71127bee1e0 (patch) | |
tree | f68ec83f8fae54bf2dd78565966d58af6f3cf008 /target-xtensa/helper.c | |
parent | 97836ceed39bb1be9a72c9d7c122657d569731d9 (diff) |
target-xtensa: add gdb support
Specific xtensa processor overlay for GDB contains register map in
the gdb/xtensa-config.c. This description is used by the GDB to e.g.
parse 'g' response packets and it may be reused in the qemu's gdbstub
(only XTREG definitions for non-pseudoregisters are needed).
Currently mainline GDB does not support operations with privileged SRs
(see http://sourceware.org/ml/gdb/2011-07/msg00075.html). This support
may be enabled, see NUM_CORE_REGS comment in the gdbstub.c
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-xtensa/helper.c')
-rw-r--r-- | target-xtensa/helper.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/target-xtensa/helper.c b/target-xtensa/helper.c index dacb379221..11c318d1b8 100644 --- a/target-xtensa/helper.c +++ b/target-xtensa/helper.c @@ -34,6 +34,10 @@ #include "hw/loader.h" #endif +#define XTREG(idx, ofs, bi, sz, al, no, flags, cp, typ, grp, name, \ + a1, a2, a3, a4, a5, a6) \ + { .targno = (no), .type = (typ), .group = (grp) }, + void cpu_reset(CPUXtensaState *env) { env->exception_taken = 0; @@ -52,6 +56,13 @@ static const XtensaConfig core_config[] = { .options = -1 ^ (XTENSA_OPTION_BIT(XTENSA_OPTION_HW_ALIGNMENT) | XTENSA_OPTION_BIT(XTENSA_OPTION_MMU)), + .gdb_regmap = { + .num_regs = 176, + .num_core_regs = 117, + .reg = { +#include "gdb-config-sample-xtensa-core.c" + } + }, .nareg = 64, .ndepc = 1, .excm_level = 16, |