[gdb/testsuite] Fix gdb.opt/inline-small-func.exp with clang
[binutils-gdb.git] / gdb / loongarch-tdep.h
index f3efa4601eff54844e5e3d046cd0cefc02fc2a97..c5527f7d148f0f9f9c17a12506d18476896c93db 100644 (file)
 #include "elf/loongarch.h"
 #include "opcode/loongarch.h"
 
-/* Register numbers of various important registers.  */
-enum
-{
-  LOONGARCH_RA_REGNUM = 1,             /* Return Address.  */
-  LOONGARCH_SP_REGNUM = 3,             /* Stack Pointer.  */
-  LOONGARCH_A0_REGNUM = 4,             /* First Argument/Return Value.  */
-  LOONGARCH_A7_REGNUM = 11,            /* Seventh Argument/Syscall Number.  */
-  LOONGARCH_FP_REGNUM = 22,            /* Frame Pointer.  */
-  LOONGARCH_PC_REGNUM = 32,            /* Program Counter.  */
-  LOONGARCH_BADV_REGNUM = 33,          /* Bad Vaddr for Addressing Exception.  */
-  LOONGARCH_LINUX_NUM_GREGSET = 45,    /* 32 GPR, PC, BADV, RESERVED 11.  */
-};
-
 /* Register set definitions.  */
 extern const struct regset loongarch_gregset;
+extern const struct regset loongarch_fpregset;
 
 /* Target-dependent structure in gdbarch.  */
-struct loongarch_gdbarch_tdep : gdbarch_tdep
+struct loongarch_gdbarch_tdep : gdbarch_tdep_base
 {
   /* Features about the abi that impact how the gdbarch is configured.  */
   struct loongarch_gdbarch_features abi_features;
+
+  /* Return the expected next PC if FRAME is stopped at a syscall instruction.  */
+  CORE_ADDR (*syscall_next_pc) (struct frame_info *frame) = nullptr;
 };
 
 #endif /* LOONGARCH_TDEP_H  */