This is an automated email from Gerrit. "Tomas Vanek <[email protected]>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9243
-- gerrit commit 8b7f5b5826525626e3deab32415d2fe9abe0086f Author: Tomas Vanek <[email protected]> Date: Wed Nov 19 09:09:23 2025 +0100 target/armv8: do not mark ELx banked regs as save-restore GDB uses this mark when creating a dummy frame for manual call of a function by GDB command. With the original setting of all registers as caller_save = true GDB inferior call fails in EL2H mode with the message Could not fetch register "ELR_EL3"; remote failure reply '0E' It also fails similarly in EL0 and EL1 modes. A standard function should not change EL banked registers anyway. Avoid marking ELx banked registers as save-restore. Treat pauth_dmask and pauth_cmask registers similarly. They are not typically changed in a function. Change-Id: Ibaf32210f3fcfa9dfb15e924b888243460e85fb4 Signed-off-by: Tomas Vanek <[email protected]> diff --git a/src/target/armv8.c b/src/target/armv8.c index 47a380c9d5..8cbe48bec3 100644 --- a/src/target/armv8.c +++ b/src/target/armv8.c @@ -1849,7 +1849,12 @@ struct reg_cache *armv8_build_reg_cache(struct target *target) reg_list[i].group = armv8_regs[i].group; reg_list[i].number = i; reg_list[i].exist = true; - reg_list[i].caller_save = true; /* gdb defaults to true */ + + /* Registers which should be preserved across GDB inferior function calls. + * Avoid saving ELx banked registers as a standard function should + * not change them and higher EL registers are not accessible + * in lower EL modes. */ + reg_list[i].caller_save = i < ARMV8_ELR_EL1; feature = calloc(1, sizeof(struct reg_feature)); if (feature) { --
