diff options
author | Walter Lee <walt@tilera.com> | 2013-02-19 16:19:33 +0000 |
---|---|---|
committer | Walter Lee <walt@tilera.com> | 2013-02-19 16:19:33 +0000 |
commit | 4aaf25031b9372b24fa813709dd310724696a5bf (patch) | |
tree | 633821bb186aef8a03b51edebbb38f9a353914b4 /gdb/tilegx-linux-tdep.c | |
parent | bc23a95694a60908843d626bb29bdc7e241a9ad3 (diff) | |
download | gdb-4aaf25031b9372b24fa813709dd310724696a5bf.zip gdb-4aaf25031b9372b24fa813709dd310724696a5bf.tar.gz gdb-4aaf25031b9372b24fa813709dd310724696a5bf.tar.bz2 |
* tilegx-tdep.c (INT_SWINT_1_SIGRETURN): New macro.
(tilegx_write_pc): New function.
(tilegx_cannot_reference_register): Return zero if REGNO
is TILEGX_FAULTNUM_REGNUM.
(tilegx_gdbarch_init): Add call to set_gdbarch_write_pc.
(tilegx_register_name): Add handling of "faultnum" register.
* tilegx-tdep.h (enum tilegx_regnum): Add TILEGX_FAULTNUM_REGNUM.
* tilegx-linux-tdep.c (tilegx_linux_supply_regset): Add
handling of TILEGX_FAULTNUM_REGNUM.
* tilegx-linux-nat.c (regmap): Add entry for TILEGX_FAULTNUM_REGNUM.
Diffstat (limited to 'gdb/tilegx-linux-tdep.c')
-rw-r--r-- | gdb/tilegx-linux-tdep.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/tilegx-linux-tdep.c b/gdb/tilegx-linux-tdep.c index 1067d37..abcc943 100644 --- a/gdb/tilegx-linux-tdep.c +++ b/gdb/tilegx-linux-tdep.c @@ -85,9 +85,11 @@ tilegx_linux_supply_regset (const struct regset *regset, int i; /* This logic must match that of struct pt_regs in "ptrace.h". */ - for (i = 0; i < TILEGX_NUM_EASY_REGS + 1; i++, ptr += tilegx_reg_size) + for (i = 0; i < TILEGX_NUM_EASY_REGS + 2; i++, ptr += tilegx_reg_size) { - int gri = (i < TILEGX_NUM_EASY_REGS) ? i : TILEGX_PC_REGNUM; + int gri = (i < TILEGX_NUM_EASY_REGS) + ? i : (i == TILEGX_NUM_EASY_REGS) + ? TILEGX_PC_REGNUM : TILEGX_FAULTNUM_REGNUM; if (regnum == gri || regnum == -1) regcache_raw_supply (regcache, gri, ptr); |