diff options
Diffstat (limited to 'gdbserver/linux-or1k-low.cc')
-rw-r--r-- | gdbserver/linux-or1k-low.cc | 58 |
1 files changed, 22 insertions, 36 deletions
diff --git a/gdbserver/linux-or1k-low.cc b/gdbserver/linux-or1k-low.cc index 498955a..2916f11 100644 --- a/gdbserver/linux-or1k-low.cc +++ b/gdbserver/linux-or1k-low.cc @@ -33,13 +33,11 @@ class or1k_target : public linux_process_target { public: - const regs_info *get_regs_info () override; const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override; protected: - void low_arch_setup () override; bool low_cannot_fetch_register (int regno) override; @@ -101,11 +99,8 @@ union or1k_register /* Return the ptrace ``address'' of register REGNO. */ static int or1k_regmap[] = { - -1, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - -1, /* PC */ + -1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, -1, /* PC */ -1, /* ORIGINAL R11 */ -1 /* SYSCALL NO */ }; @@ -164,8 +159,8 @@ or1k_target::low_breakpoint_at (CORE_ADDR where) /* Fetch the thread-local storage pointer for libthread_db. */ ps_err_e -ps_get_thread_area (struct ps_prochandle *ph, - lwpid_t lwpid, int idx, void **base) +ps_get_thread_area (struct ps_prochandle *ph, lwpid_t lwpid, int idx, + void **base) { if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0) return PS_ERR; @@ -182,7 +177,7 @@ ps_get_thread_area (struct ps_prochandle *ph, static void or1k_collect_register (struct regcache *regcache, int regno, - union or1k_register *reg) + union or1k_register *reg) { union or1k_register tmp_reg; @@ -192,7 +187,7 @@ or1k_collect_register (struct regcache *regcache, int regno, static void or1k_supply_register (struct regcache *regcache, int regno, - const union or1k_register *reg) + const union or1k_register *reg) { supply_register (regcache, regno, reg->buf); } @@ -219,33 +214,24 @@ or1k_store_gregset (struct regcache *regcache, const void *buf) or1k_supply_register (regcache, i, regset + i); } -static struct regset_info or1k_regsets[] = -{ - { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_PRSTATUS, - or1k_num_regs * 4, GENERAL_REGS, - or1k_fill_gregset, or1k_store_gregset }, - NULL_REGSET +static struct regset_info or1k_regsets[] + = { { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_PRSTATUS, or1k_num_regs * 4, + GENERAL_REGS, or1k_fill_gregset, or1k_store_gregset }, + NULL_REGSET }; + +static struct regsets_info or1k_regsets_info = { + or1k_regsets, /* regsets */ + 0, /* num_regsets */ + NULL, /* disabled_regsets */ +}; + +static struct usrregs_info or1k_usrregs_info = { + or1k_num_regs, + or1k_regmap, }; -static struct regsets_info or1k_regsets_info = - { - or1k_regsets, /* regsets */ - 0, /* num_regsets */ - NULL, /* disabled_regsets */ - }; - -static struct usrregs_info or1k_usrregs_info = - { - or1k_num_regs, - or1k_regmap, - }; - -static struct regs_info or1k_regs = - { - NULL, /* regset_bitmap */ - &or1k_usrregs_info, - &or1k_regsets_info - }; +static struct regs_info or1k_regs = { NULL, /* regset_bitmap */ + &or1k_usrregs_info, &or1k_regsets_info }; const regs_info * or1k_target::get_regs_info () |