mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-11 19:19:04 +08:00
xtensa: make sure ar_base is initialized
ar_base is uninitialized for cores w/o windowed registers as their regmap doesn't have register 0x0100. Check that ar_base is initialized and if not initialize it with a0_base. gdb/ * xtensa-tdep.c (xtensa_derive_tdep): Make sure ar_base is initialized. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
committed by
Alexey Lapshin
parent
5a7b8602ad
commit
30fcf51e11
@@ -3138,6 +3138,9 @@ xtensa_derive_tdep (xtensa_gdbarch_tdep *tdep)
|
||||
if (tdep->num_regs == 0)
|
||||
tdep->num_regs = tdep->num_nopriv_regs;
|
||||
|
||||
if (tdep->ar_base == -1)
|
||||
tdep->ar_base = tdep->a0_base;
|
||||
|
||||
/* Number of pseudo registers. */
|
||||
tdep->num_pseudo_regs = n - tdep->num_regs;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user