From ccfcaba6fd9f69a9322af1911302e71127bee1e0 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Tue, 6 Sep 2011 03:55:52 +0400 Subject: 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 Signed-off-by: Blue Swirl --- target-xtensa/helper.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'target-xtensa/helper.c') 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, -- cgit v1.2.1