diff options
Diffstat (limited to 'gdbserver/linux-riscv-low.cc')
-rw-r--r-- | gdbserver/linux-riscv-low.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gdbserver/linux-riscv-low.cc b/gdbserver/linux-riscv-low.cc index 8c742f4..f70ed59 100644 --- a/gdbserver/linux-riscv-low.cc +++ b/gdbserver/linux-riscv-low.cc @@ -58,6 +58,10 @@ protected: void low_set_pc (regcache *regcache, CORE_ADDR newpc) override; bool low_breakpoint_at (CORE_ADDR pc) override; + + bool low_supports_catch_syscall () override; + + void low_get_syscall_trapinfo (regcache *regcache, int *sysno) override; }; /* The singleton target ops object. */ @@ -78,6 +82,26 @@ riscv_target::low_cannot_store_register (int regno) "is not implemented by the target"); } +/* Implementation of linux target ops method "low_supports_catch_syscall". */ + +bool +riscv_target::low_supports_catch_syscall () +{ + return true; +} + +/* Implementation of linux target ops method "low_get_syscall_trapinfo". */ + +void +riscv_target::low_get_syscall_trapinfo (regcache *regcache, int *sysno) +{ + LONGEST l_sysno; + + /* The content of a register. */ + collect_register_by_name (regcache, "a7", &l_sysno); + *sysno = (int)l_sysno; +} + /* Implementation of linux target ops method "low_arch_setup". */ void |