diff options
Diffstat (limited to 'gdb/tilegx-linux-nat.c')
-rw-r--r-- | gdb/tilegx-linux-nat.c | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/gdb/tilegx-linux-nat.c b/gdb/tilegx-linux-nat.c index bcaee36..a5ece58 100644 --- a/gdb/tilegx-linux-nat.c +++ b/gdb/tilegx-linux-nat.c @@ -37,6 +37,7 @@ class tilegx_linux_nat_target final : public linux_nat_target { public: + /* Add our register access methods. */ void fetch_registers (struct regcache *, int) override; void store_registers (struct regcache *, int) override; @@ -60,18 +61,11 @@ static tilegx_linux_nat_target the_tilegx_linux_nat_target; format and GDB's register array layout. Note that we map the first 56 registers (0 thru 55) one-to-one. GDB maps the pc to slot 64, but ptrace returns it in slot 56. */ -static const int regmap[] = -{ - 0, 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, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, - -1, -1, -1, -1, -1, -1, -1, -1, - 56, 58 -}; +static const int regmap[] + = { 0, 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, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, -1, -1, -1, -1, -1, -1, -1, -1, 56, 58 }; /* Transfering the general-purpose registers between GDB, inferiors and core files. */ @@ -80,8 +74,7 @@ static const int regmap[] = in *GREGSETP. */ void -supply_gregset (struct regcache* regcache, - const elf_gregset_t *gregsetp) +supply_gregset (struct regcache *regcache, const elf_gregset_t *gregsetp) { elf_greg_t *regp = (elf_greg_t *) gregsetp; int i; @@ -95,8 +88,8 @@ supply_gregset (struct regcache* regcache, register array. */ void -fill_gregset (const struct regcache* regcache, - elf_gregset_t *gregsetp, int regno) +fill_gregset (const struct regcache *regcache, elf_gregset_t *gregsetp, + int regno) { elf_greg_t *regp = (elf_greg_t *) gregsetp; int i; @@ -112,8 +105,7 @@ fill_gregset (const struct regcache* regcache, *FPREGSETP. */ void -supply_fpregset (struct regcache *regcache, - const elf_fpregset_t *fpregsetp) +supply_fpregset (struct regcache *regcache, const elf_fpregset_t *fpregsetp) { /* NOTE: There are no floating-point registers for TILE-Gx. */ } @@ -123,8 +115,8 @@ supply_fpregset (struct regcache *regcache, do this for all registers. */ void -fill_fpregset (const struct regcache *regcache, - elf_fpregset_t *fpregsetp, int regno) +fill_fpregset (const struct regcache *regcache, elf_fpregset_t *fpregsetp, + int regno) { /* NOTE: There are no floating-point registers for TILE-Gx. */ } @@ -140,9 +132,9 @@ tilegx_linux_nat_target::fetch_registers (struct regcache *regcache, pid_t tid = get_ptrace_pid (regcache->ptid ()); if (ptrace (PTRACE_GETREGS, tid, 0, (PTRACE_TYPE_ARG3) ®s) < 0) - perror_with_name (_("Couldn't get registers")); + perror_with_name (_ ("Couldn't get registers")); - supply_gregset (regcache, (const elf_gregset_t *)®s); + supply_gregset (regcache, (const elf_gregset_t *) ®s); } /* Store register REGNUM back into the inferior. If REGNUM is -1, do @@ -156,15 +148,16 @@ tilegx_linux_nat_target::store_registers (struct regcache *regcache, pid_t tid = get_ptrace_pid (regcache->ptid ()); if (ptrace (PTRACE_GETREGS, tid, 0, (PTRACE_TYPE_ARG3) ®s) < 0) - perror_with_name (_("Couldn't get registers")); + perror_with_name (_ ("Couldn't get registers")); fill_gregset (regcache, ®s, regnum); if (ptrace (PTRACE_SETREGS, tid, 0, (PTRACE_TYPE_ARG3) ®s) < 0) - perror_with_name (_("Couldn't write registers")); + perror_with_name (_ ("Couldn't write registers")); } void _initialize_tile_linux_nat (); + void _initialize_tile_linux_nat () { |