aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/python.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2026-03-25 14:12:11 +0100
committerTom de Vries <tdevries@suse.de>2026-03-25 14:12:11 +0100
commita570ac19e30c17211f414c13af031b0e093b4cc1 (patch)
tree04c9e686ff525d4ba0f8987e668b8cf297e80bd2 /gdb/python/python.c
parentb77de06b8b4d4c8365b6885d6baa5589460d949b (diff)
downloadbinutils-a570ac19e30c17211f414c13af031b0e093b4cc1.tar.gz
binutils-a570ac19e30c17211f414c13af031b0e093b4cc1.tar.bz2
binutils-a570ac19e30c17211f414c13af031b0e093b4cc1.zip
[gdb/record] Fix syscall exit recording for riscv
[ Submitted earlier [1] with $subject: "[gdb/record] Fix syscall recording for riscv". ] On riscv64-linux, I run into: ... (gdb) continue^M Continuing.^M The next instruction is syscall exit_group. It will make the program exit. \ Do you want to stop the program?([y] or n) yes^M Process record: failed to record execution log.^M ^M Program stopped.^M __GI__exit (status=status@entry=0) at _exit.c:30^M warning: 30 _exit.c: No such file or directory^M (gdb) FAIL: gdb.reverse/sigall-reverse.exp: continue to signal exit ... The problem is here in record_insn_len4: ... /* We are in linux mode. */ return (read_reg (RISCV_A7_REGNUM, reg_val) && m_gdbarch->riscv_syscall_record (m_regcache, reg_val) == 0); ... where return values 1 and -1 are handled the same. Fix this in the usual way, by passing through the 1 value all the way to riscv_process_record. That requires changing a few functions from type bool to int. That's also the case for record_insn_len4, where I factored out record_insn_len4_1 to keep changes to a minimum. Also introduce a common enum record_result, and use it instead of hardcoded 1/0/-1. Tested on riscv64-linux. Approved-By: Guinevere Larsen <guinevere@redhat.com> [1] https://sourceware.org/pipermail/gdb-patches/2026-February/225384.html
Diffstat (limited to 'gdb/python/python.c')
0 files changed, 0 insertions, 0 deletions