aboutsummaryrefslogtreecommitdiff
path: root/gdb/valarith.c
AgeCommit message (Expand)AuthorFilesLines
2006-01-242006-01-24 Jim Blandy <jimb@redhat.com>Jim Blandy1-8/+11
2005-12-17 * breakpoint.c:Eli Zaretskii1-3/+3
2005-08-21* valarith.c (value_equal, value_less): Avoid compiler bug onMark Kettenis1-4/+14
2005-08-11 PR exp/1978Andreas Schwab1-1/+8
2005-07-06 * f-exp.y (yyparse): Add code to support exponentiation expression.Wu Zhou1-14/+17
2005-05-092005-05-09 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-6/+6
2005-03-08 * ax-gdb.c (gen_expr): Add UNOP_PLUS case.Nathan Sidwell1-1/+31
2005-02-112005-02-10 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-40/+40
2005-02-082005-02-07 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-2/+2
2005-02-082005-02-07 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-2/+2
2005-02-072005-02-07 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-1/+1
2005-02-072005-02-06 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-17/+19
2005-02-022005-02-02 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-1/+1
2005-02-022005-02-01 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-6/+6
2005-01-282005-01-28 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-1/+1
2004-11-21 * valarith.c (value_subscript): Copy VALUE_FRAME_ID.Daniel Jacobowitz1-0/+2
2004-11-132004-11-12 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-1/+1
2004-11-122004-11-12 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-38/+38
2004-11-102004-11-10 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-20/+20
2004-11-092004-11-09 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-1/+0
2004-11-022004-11-02 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-4/+0
2004-09-202004-09-20 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston1-1/+4
2004-06-272004-06-27 <david@streamline-computing.com>David Lecomber1-2/+8
2004-04-01* valarith.c: Update copyright notice.Paul N. Hilfinger1-42/+31
2003-09-142003-09-14 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-10/+10
2003-04-212003-04-21 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-0/+1
2003-03-082003-03-08 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-0/+1
2003-01-142003-01-13 Andrew Cagney <ac131313@redhat.com>Andrew Cagney1-2/+3
2003-01-022003-01-02 Andrew Cagney <ac131313@redhat.com>Andrew Cagney1-14/+2
2002-08-012002-08-01 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-15/+15
2002-04-102002-04-04 Jim Ingham <jingham@apple.com>Jim Ingham1-6/+45
2002-03-27s/strerror/safe_strerror/Andrew Cagney1-3/+3
2002-02-162002-02-16 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz1-5/+14
2002-01-04s/value_ptr/struct value */Andrew Cagney1-42/+45
2001-10-16* value.h (value_as_address): Rename value_as_pointer.Andrew Cagney1-7/+7
2001-10-16202001-10-15 Jim Ingham <jingham@inghji.apple.com>Andrew Cagney1-1/+1
2001-09-24* doublest.h (store_floating, extract_floating): Add commentAndrew Cagney1-2/+1
2001-08-01* defs.h (HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)Andrew Cagney1-0/+1
2001-03-072001-03-06 J.T. Conklin <jtc@redback.com>J.T. Conklin1-1/+0
2001-03-06Update/correct copyright notices.Kevin Buettner1-1/+2
2000-07-30Protoization.Kevin Buettner1-48/+20
2000-07-212000-07-20 Michael Snyder <msnyder@cleaver.cygnus.com>Michael Snyder1-2/+2
2000-05-28PARAMS removal.Kevin Buettner1-2/+2
2000-04-14* gdbarch.sh (POINTER_TO_ADDRESS, ADDRESS_TO_POINTER): Two newJim Blandy1-5/+5
1999-12-14import gdb-1999-12-13 snapshotJason Molenda1-6/+73
1999-07-07import gdb-1999-07-07 post reformatJason Molenda1-177/+256
1999-04-16Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1-0/+1259
1999-04-16Initial creation of sourceware repositoryStan Shebs1-1213/+0
1996-03-30 * core-aout.c (fetch_core_registers): Cast core_reg_size to intFred Fish1-10/+10
1996-03-06 * ch-exp.c (parse_primval): Handle CARD, MAX, MIN.Wilfried Moser1-1/+3
>gdbarch)->lcount_regnum, &regs->lcount); if (regnum == gdbarch_tdep (gdbarch)->sar_regnum || regnum == -1) regcache_raw_collect (regcache, gdbarch_tdep (gdbarch)->sar_regnum, &regs->sar); if (regnum >=gdbarch_tdep (gdbarch)->ar_base && regnum < gdbarch_tdep (gdbarch)->ar_base + gdbarch_tdep (gdbarch)->num_aregs) regcache_raw_collect (regcache,regnum, &regs->ar[regnum - gdbarch_tdep (gdbarch)->ar_base]); else if (regnum == -1) { for (i = 0; i < gdbarch_tdep (gdbarch)->num_aregs; ++i) regcache_raw_collect (regcache, gdbarch_tdep (gdbarch)->ar_base + i, &regs->ar[i]); } } void supply_gregset_reg (struct regcache *regcache, const gdb_gregset_t *gregsetp, int regnum) { int i; xtensa_elf_gregset_t *regs = (xtensa_elf_gregset_t *) gregsetp; struct gdbarch *gdbarch = get_regcache_arch (regcache); if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1) regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch), &regs->pc); if (regnum == gdbarch_ps_regnum (gdbarch) || regnum == -1) regcache_raw_supply (regcache, gdbarch_ps_regnum (gdbarch), &regs->ps); if (regnum == gdbarch_tdep (gdbarch)->wb_regnum || regnum == -1) regcache_raw_supply (regcache, gdbarch_tdep (gdbarch)->wb_regnum, &regs->windowbase); if (regnum == gdbarch_tdep (gdbarch)->ws_regnum || regnum == -1) regcache_raw_supply (regcache, gdbarch_tdep (gdbarch)->ws_regnum, &regs->windowstart); if (regnum == gdbarch_tdep (gdbarch)->lbeg_regnum || regnum == -1) regcache_raw_supply (regcache, gdbarch_tdep (gdbarch)->lbeg_regnum, &regs->lbeg); if (regnum == gdbarch_tdep (gdbarch)->lend_regnum || regnum == -1) regcache_raw_supply (regcache, gdbarch_tdep (gdbarch)->lend_regnum, &regs->lend); if (regnum == gdbarch_tdep (gdbarch)->lcount_regnum || regnum == -1) regcache_raw_supply (regcache, gdbarch_tdep (gdbarch)->lcount_regnum, &regs->lcount); if (regnum == gdbarch_tdep (gdbarch)->sar_regnum || regnum == -1) regcache_raw_supply (regcache, gdbarch_tdep (gdbarch)->sar_regnum, &regs->sar); if (regnum >=gdbarch_tdep (gdbarch)->ar_base && regnum < gdbarch_tdep (gdbarch)->ar_base + gdbarch_tdep (gdbarch)->num_aregs) regcache_raw_supply (regcache,regnum, &regs->ar[regnum - gdbarch_tdep (gdbarch)->ar_base]); else if (regnum == -1) { for (i = 0; i < gdbarch_tdep (gdbarch)->num_aregs; ++i) regcache_raw_supply (regcache, gdbarch_tdep (gdbarch)->ar_base + i, &regs->ar[i]); } } void supply_gregset (struct regcache *regcache, const gdb_gregset_t *gregsetp) { supply_gregset_reg (regcache, gregsetp, -1); } void fill_fpregset (const struct regcache *regcache, gdb_fpregset_t *fpregsetp, int regnum) { return; } void supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp) { return; } /* Fetch greg-register(s) from process/thread TID and store value(s) in GDB's register array. */ static void fetch_gregs (struct regcache *regcache, int regnum) { int tid = GET_THREAD_ID (inferior_ptid); const gdb_gregset_t regs; int areg; if (ptrace (PTRACE_GETREGS, tid, 0, (long) &regs) < 0) { perror_with_name (_("Couldn't get registers")); return; } supply_gregset_reg (regcache, &regs, regnum); } /* Store greg-register(s) in GDB's register array into the process/thread specified by TID. */ static void store_gregs (struct regcache *regcache, int regnum) { int tid = GET_THREAD_ID (inferior_ptid); gdb_gregset_t regs; int areg; if (ptrace (PTRACE_GETREGS, tid, 0, (long) &regs) < 0) { perror_with_name (_("Couldn't get registers")); return; } fill_gregset (regcache, &regs, regnum); if (ptrace (PTRACE_SETREGS, tid, 0, (long) &regs) < 0) { perror_with_name (_("Couldn't write registers")); return; } } static int xtreg_lo; static int xtreg_high; /* Fetch/Store Xtensa TIE registers. Xtensa GNU/Linux PTRACE interface provides special requests for this. */ static void fetch_xtregs (struct regcache *regcache, int regnum) { int tid = GET_THREAD_ID (inferior_ptid); const xtensa_regtable_t *ptr; char xtregs [XTENSA_ELF_XTREG_SIZE]; if (ptrace (PTRACE_GETXTREGS, tid, 0, (long)&xtregs) < 0) perror_with_name (_("Couldn't get extended registers")); for (ptr = xtensa_regmap_table; ptr->name; ptr++) if (regnum == ptr->gdb_regnum || regnum == -1) regcache_raw_supply (regcache, ptr->gdb_regnum, xtregs + ptr->ptrace_offset); } static void store_xtregs (struct regcache *regcache, int regnum) { int tid = GET_THREAD_ID (inferior_ptid); const xtensa_regtable_t *ptr; char xtregs [XTENSA_ELF_XTREG_SIZE]; if (ptrace (PTRACE_GETXTREGS, tid, 0, (long)&xtregs) < 0) perror_with_name (_("Couldn't get extended registers")); for (ptr = xtensa_regmap_table; ptr->name; ptr++) if (regnum == ptr->gdb_regnum || regnum == -1) regcache_raw_collect (regcache, ptr->gdb_regnum, xtregs + ptr->ptrace_offset); if (ptrace (PTRACE_SETXTREGS, tid, 0, (long)&xtregs) < 0) perror_with_name (_("Couldn't write extended registers")); } void xtensa_linux_fetch_inferior_registers (struct target_ops *ops, struct regcache *regcache, int regnum) { if (regnum == -1) { fetch_gregs (regcache, regnum); fetch_xtregs (regcache, regnum); } else if ((regnum < xtreg_lo) || (regnum > xtreg_high)) fetch_gregs (regcache, regnum); else fetch_xtregs (regcache, regnum); } void xtensa_linux_store_inferior_registers (struct target_ops *ops, struct regcache *regcache, int regnum) { if (regnum == -1) { store_gregs (regcache, regnum); store_xtregs (regcache, regnum); } else if ((regnum < xtreg_lo) || (regnum > xtreg_high)) store_gregs (regcache, regnum); else store_xtregs (regcache, regnum); } void _initialize_xtensa_linux_nat (void); void _initialize_xtensa_linux_nat (void) { struct target_ops *t; const xtensa_regtable_t *ptr; /* Calculate the number range for extended registers. */ xtreg_lo = 1000000000; xtreg_high = -1; for (ptr = xtensa_regmap_table; ptr->name; ptr++) { if (ptr->gdb_regnum < xtreg_lo) xtreg_lo = ptr->gdb_regnum; if (ptr->gdb_regnum > xtreg_high) xtreg_high = ptr->gdb_regnum; } /* Fill in the generic GNU/Linux methods. */ t = linux_target (); /* Add our register access methods. */ t->to_fetch_registers = xtensa_linux_fetch_inferior_registers; t->to_store_registers = xtensa_linux_store_inferior_registers; linux_nat_add_target (t); }