target/xtensa: populate PS correctly during fetch
Read PS from EPS[debuglevel] during fetch such that it reflects the correct value when read via telnet (not just via gdb_server). Signed-off-by: Ian Thompson <ianst@cadence.com> Change-Id: I8504f68989bc6d5fe451a8cb69d01c86f4ec0100 Reviewed-on: https://review.openocd.org/c/openocd/+/7195 Tested-by: jenkins Reviewed-by: Erhan Kurubas <erhan.kurubas@espressif.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
parent
9464c801b9
commit
4279b23fca
|
@ -1100,6 +1100,9 @@ int xtensa_fetch_all_regs(struct target *target)
|
|||
if (reg_num == XT_PC_REG_NUM_VIRTUAL) {
|
||||
/* reg number of PC for debug interrupt depends on NDEBUGLEVEL */
|
||||
reg_num = (XT_PC_REG_NUM_BASE + xtensa->core_config->debug.irq_level);
|
||||
} else if (reg_num == xtensa_regs[XT_REG_IDX_PS].reg_num) {
|
||||
/* reg number of PS for debug interrupt depends on NDEBUGLEVEL */
|
||||
reg_num = (XT_PS_REG_NUM_BASE + xtensa->core_config->debug.irq_level);
|
||||
} else if (reg_num == xtensa_regs[XT_REG_IDX_CPENABLE].reg_num) {
|
||||
/* CPENABLE already read/updated; don't re-read */
|
||||
reg_fetched = false;
|
||||
|
|
Loading…
Reference in New Issue