Commit Graph

332 Commits

Author SHA1 Message Date
Andrew Cagney 50fd128082 2005-05-24 Andrew Cagney <cagney@gnu.org>
* rs6000-tdep.c (ppc_supply_reg, ppc_collect_reg): Use gdb_byte
	for byte buffers.
	(rs6000_fetch_pointer_argument): Use get_frame_register_unsigned.
	(rs6000_software_single_step, sstep_breaks, skip_prologue)
	(rs6000_push_dummy_call, rs6000_push_dummy_call)
	(rs6000_push_dummy_call, rs6000_push_dummy_call)
	(rs6000_register_to_value, e500_pseudo_register_read)
	(rs6000_store_return_value, e500_pseudo_register_write)
	(rs6000_frame_prev_register, rs6000_extract_return_value): Ditto.
	* ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call)
	(ppc_sysv_abi_push_dummy_call, do_ppc_sysv_return_value)
	(do_ppc_sysv_return_value, ppc_sysv_abi_return_value)
	(ppc_sysv_abi_broken_return_value)
	(ppc64_sysv_abi_push_dummy_call, ppc64_sysv_abi_push_dummy_call)
	(ppc64_sysv_abi_push_dummy_call, ppc64_sysv_abi_return_value)
	(ppc64_sysv_abi_return_value, ppc64_sysv_abi_return_value): Ditto.
	* ppc-linux-tdep.c (ppc_linux_in_sigtramp)
	(ppc_linux_at_sigtramp_return_path)
	(ppc_linux_skip_trampoline_code)
	(ppc_linux_memory_remove_breakpoint, ppc_linux_return_value):
	* rs6000-tdep.c (rs6000_value_to_register)
	(rs6000_register_to_value): Ditto.
	* ppc-tdep.h (ppc_sysv_abi_return_value)
	(ppc64_sysv_abi_return_value, ppc_sysv_abi_broken_return_value)
	(ppc_linux_memory_remove_breakpoint): Ditto.
2005-05-25 03:12:13 +00:00
Andrew Cagney 5a168c78ef 2005-05-01 Andrew Cagney <cagney@gnu.org>
* gdbarch.sh (deprecated_extract_return_value)
	(breakpoint_from_pc, deprecated_store_return_value)
	(memory_insert_breakpoint, memory_remove_breakpoint): Change type
	of buffer to a bfd_byte pointer.
	* gdbarch.h, gdbarch.c: Re-generate.
	* mem-break.c (memory_insert_breakpoint)
	(memory_remove_breakpoint, default_memory_insert_breakpoint)
	(default_memory_remove_breakpoint): Update.
	* target.h (memory_insert_breakpoint)
	(memory_remove_breakpoint, default_memory_insert_breakpoint)
	(default_memory_remove_breakpoint): Update declarations.
	(struct target_ops): Update to_insert_breakpoint and
	to_remove_breakpoint.
	* target.c (debug_to_remove_breakpoint)
	(debug_to_insert_breakpoint): Update.
	* remote-m32r-sdi.c (m32r_remove_breakpoint)
	(m32r_insert_breakpoint): Update.
	* m32r-tdep.c (m32r_memory_insert_breakpoint)
	(m32r_memory_remove_breakpoint): Update.
	* remote-e7000.c (e7000_insert_breakpoint)
	(e7000_remove_breakpoint): Update.
	* remote-rdi.c (arm_rdi_insert_breakpoint)
	(arm_rdi_remove_breakpoint): Update.
	* remote-sim.c (gdbsim_insert_breakpoint)
	(gdbsim_remove_breakpoint): Update.
	* exec.c (ignore): Update.
	* rs6000-tdep.c (rs6000_extract_return_value): Update.
	* ia64-tdep.c (ia64_memory_insert_breakpoint)
	(ia64_memory_remove_breakpoint): Update.
	* remote-rdp.c (remote_rdp_insert_breakpoint)
	(remote_rdp_remove_breakpoint): Update.
2005-05-01 19:58:55 +00:00
Mark Kettenis bdbcb8b4b7 * rs6000-tdep.c (ppc_supply_fpregset): Increment offset by 8 for
floating-point registers.
(ppc_collect_fpregset): Likewise.  Fix collection of registers.
2005-04-10 21:14:37 +00:00
Andrew Cagney 1bedd21517 2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
	* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
	* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
	* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
	* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
	* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
	* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
	* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
	* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
	* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
	* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
	* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
	* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
	* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
	* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
	* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 15:49:28 +00:00
Andrew Cagney e2e0b3e57f 2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up error_no_arg, query, perror_with_name, complaint, and
	internal_error.
	* breakpoint.c, cp-abi.c, cp-namespace.c, cp-support.c: Update.
	* cris-tdep.c, dbxread.c, dictionary.c, dsrec.c: Update.
	* dummy-frame.c, dve3900-rom.c, dwarf2-frame.c, dwarf2expr.c: Update.
	* dwarf2read.c, dwarfread.c, elfread.c, event-loop.c: Update.
	* exceptions.c, exec.c, f-lang.c, findvar.c, fork-child.c: Update.
	* frame-unwind.c, frame.c, frv-linux-tdep.c, frv-tdep.c: Update.
	* gdb_assert.h, gdbarch.c, gdbtypes.c, gnu-nat.c: Update.
	* go32-nat.c, hppa-tdep.c, hppabsd-nat.c, hpread.c: Update.
	* i386-linux-nat.c, i386-nat.c, i386-tdep.c, i386bsd-nat.c: Update.
	* i386fbsd-nat.c, inf-ptrace.c, inf-ttrace.c, infcall.c: Update.
	* infcmd.c, inflow.c, infptrace.c, infrun.c, inftarg.c: Update.
	* interps.c, language.c, linespec.c, linux-nat.c: Update.
	* m32r-linux-nat.c, m68k-tdep.c, m68kbsd-nat.c: Update.
	* m68klinux-nat.c, m88kbsd-nat.c, macroexp.c, macroscope.c: Update.
	* macrotab.c, maint.c, mdebugread.c, memattr.c: Update.
	* mips-linux-tdep.c, mips-tdep.c, mips64obsd-nat.c: Update.
	* mipsnbsd-nat.c, mn10300-tdep.c, monitor.c, nto-procfs.c: Update.
	* objc-lang.c, objfiles.c, objfiles.h, ocd.c, osabi.c: Update.
	* parse.c, ppc-bdm.c, ppc-linux-nat.c, ppc-sysv-tdep.c: Update.
	* ppcnbsd-nat.c, ppcobsd-nat.c, printcmd.c, procfs.c: Update.
	* regcache.c, reggroups.c, remote-e7000.c, remote-mips.c: Update.
	* remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c: Update.
	* remote-utils.c, remote.c, rs6000-nat.c, rs6000-tdep.c: Update.
	* s390-nat.c, s390-tdep.c, sentinel-frame.c, serial.c: Update.
	* sh-tdep.c, sh3-rom.c, sh64-tdep.c, shnbsd-nat.c: Update.
	* solib-aix5.c, solib-svr4.c, solib.c, source.c: Update.
	* sparc-nat.c, stabsread.c, stack.c, symfile.c, symtab.c: Update.
	* symtab.h, target.c, tracepoint.c, ui-file.c, ui-out.c: Update.
	* utils.c, valops.c, valprint.c, vax-nat.c, vaxbsd-nat.c: Update.
	* win32-nat.c, xcoffread.c, xstormy16-tdep.c: Update.
	* cli/cli-cmds.c, cli/cli-logging.c, cli/cli-script.c: Update.
	* cli/cli-setshow.c, mi/mi-cmd-break.c, mi/mi-cmds.c: Update.
	* mi/mi-console.c, mi/mi-getopt.c, mi/mi-out.c: Update.
	* tui/tui-file.c, tui/tui-interp.c: Update.
2005-02-11 18:13:55 +00:00
Andrew Cagney 0fd88904d9 2005-02-06 Andrew Cagney <cagney@gnu.org>
* value.c (value_contents, value_contents_writeable): New
	functions.
	* value.h (VALUE_CONTENTS): Delete macro.
	(value_contents, value_contents_writeable): Declare.
	* xstormy16-tdep.c, value.c, valops.c, valarith.c: Update.
	* stack.c, sparc-tdep.c, sparc64-tdep.c, sh-tdep.c: Update.
	* sh64-tdep.c, scm-valprint.c, scm-exp.c, s390-tdep.c: Update.
	* rs6000-tdep.c, p-valprint.c, printcmd.c: Update.
	* ppc-sysv-tdep.c, mips-tdep.c, mi/mi-main.c: Update.
	* m88k-tdep.c, m68hc11-tdep.c, m32r-tdep.c: Update.
	* jv-valprint.c, ia64-tdep.c, hppa-tdep.c: Update.
	* hpacc-abi.c, f-valprint.c, frv-tdep.c, eval.c: Update.
	* c-valprint.c, cris-tdep.c, cp-valprint.c: Update.
	* cli/cli-dump.c, breakpoint.c, avr-tdep.c, arm-tdep.c: Update.
	* arm-linux-tdep.c, amd64-tdep.c, alpha-tdep.c: Update.
	* ada-valprint.c, ada-lang.c: Update.
2005-02-07 00:09:56 +00:00
Andrew Cagney c44ca51c0b 2005-01-26 Andrew Cagney <cagney@gnu.org>
* rs6000-tdep.c: Include "reggroups.h".
	(rs6000_gdbarch_init): Set register_reggroup_p.
	(rs6000_register_reggroup_p): New function.
2005-01-26 21:53:06 +00:00
Michael Snyder 2ec664f5c4 2005-01-13 Michael Snyder <msnyder@redhat.com>
* rs6000-nat.c: Whitespace tweaks.
2005-01-14 01:54:49 +00:00
Fred Fish ebd98106b2 Approved by Kevin Buettner <kevinb@redhat.com>
2004-11-24  Fred Fish  <fnf@specifixinc.com>
	* rs6000-tdep.c (skip_prologue): Use line table info to skip over
	compiler generated function calls made as part of a prologue.
2004-11-25 02:48:27 +00:00
Andrew Cagney df407dfe2e 2004-11-12 Andrew Cagney <cagney@gnu.org>
* value.h (VALUE_TYPE, VALUE_NEXT, VALUE_OFFSET, VALUE_BITSIZE)
	(VALUE_BITPOS): Delete.
	(value_type, value_offset, value_bitsize, value_bitpos): Declare.
	* value.c (value_type, value_offset, value_bitpos)
	(value_bitsize): New functions.  Update references.
	* arm-tdep.c, gnu-v3-abi.c, hpacc-abi.c, gnu-v2-abi.c: Update.
	* f-valprint.c, cp-valprint.c, c-valprint.c: Update.
	* ada-valprint.c, typeprint.c, scm-valprint.c, scm-exp.c: Update.
	* p-valprint.c, jv-valprint.c, jv-lang.c, varobj.c: Update.
	* objc-lang.c, ada-lang.c, std-regs.c, stack.c: Update.
	* infcall.c, linespec.c, printcmd.c, valarith.c: Update.
	* valops.c, eval.c, findvar.c, breakpoint.c: Update.
	* tracepoint.c, ax-gdb.c, mi/mi-main.c, cli/cli-dump.c:
	* rs6000-tdep.c, ppc-sysv-tdep.c: Update.
2004-11-12 21:45:08 +00:00
Michael Snyder be723e2244 2004-11-10 msnyder <msnyder@redhat.com>
* rs6000-tdep.c (skip_prologue): After saving lr_offset,
	must invalidate lr_reg (so we don't try to save it again).
	Ditto for cr_offset and cr_reg.
2004-11-11 19:21:01 +00:00
Kevin Buettner 9f33594568 * rs6000-tdep.c (rs6000_push_dummy_call): Replace references to
``deprecated_registers'' with equivalent code.  Use gdb_assert()
	instead of explicit test and print statement.
2004-10-13 16:38:22 +00:00
Jim Blandy 09991fa0ee * rs6000-tdep.c (set_sim_regno, init_sim_regno_table,
rs6000_register_sim_regno): Doc fixes.
2004-08-09 18:43:21 +00:00
Jim Blandy a44bddec71 * ppc-linux-nat.c (fetch_register): Replace 'gdb_assert (0)' with
a call to 'internal_error', with a more helpful error message.
* rs6000-tdep.c (e500_pseudo_register_read,
e500_pseudo_register_write): Same.
2004-08-04 17:45:30 +00:00
Jim Blandy 6ced10dd55 Change the layout of the PowerPC E500 raw register cache to allow
the lower 32-bit halves of the GPRS to be their own raw registers,
not pseudoregisters.
* ppc-tdep.h (struct gdbarch_tdep): Remove ppc_gprs_pseudo_p flag;
add ppc_ev0_upper_regnum flag.
* rs6000-tdep.c: #include "reggroups.h".
(spe_register_p): Recognize the ev upper half registers as SPE
registers.
(init_sim_regno_table): Build gdb->sim mappings for the upper-half
registers.
(e500_move_ev_register): New function.
(e500_pseudo_register_read, e500_pseudo_register_write): The 'ev'
vector registers are the pseudo-registers now, formed by splicing
together the gprs and the upper-half registers.
(e500_register_reggroup_p): New function.
(P): Macro deleted.
(P8, A4): New macro.
(PPC_EV_REGS, PPC_GPRS_PSEUDO_REGS): Macros deleted.
(PPC_SPE_GP_REGS, PPC_SPE_UPPER_GP_REGS, PPC_EV_PSEUDO_REGS): New
macros.
(registers_e500): Rearrange register set so that the raw register
set contains 32-bit GPRs and upper-half registers, and the SPE
vector registers become pseudo-registers.
(rs6000_gdbarch_init): Don't initialize tdep->ppc_gprs_pseudo_p;
it has been deleted.  Initialize ppc_ev0_upper_regnum.  Many other
register numbers are now the same for the E500 as they are for
other PowerPC variants.  Register e500_register_reggroup_p as the
register group function for the E500.
* Makefile.in (rs6000-tdep.o): Update dependencies.

Adapt PPC E500 native support to the new raw regcache layout.
* ppc-linux-nat.c (struct gdb_evrregset_t): Doc fixes.
(read_spliced_spe_reg, write_spliced_spe_reg): Deleted.
(fetch_spe_register, store_spe_register): Handle fetching/storing
all the SPE registers at once, if regno == -1.  These now take
over the job of fetch_spe_registers and store_spe_registers.
(fetch_spe_registers, store_spe_registers): Deleted.
(fetch_ppc_registers, store_ppc_registers): Fetch/store gprs
unconditionally; they're always raw.  Fetch/store SPE upper half
registers, if present, instead of ev registers.
(fetch_register, store_register): Remove sanity checks: gprs are
never pseudo-registers now, so we never need to even mention any
registers that are ever pseudoregisters.
2004-08-04 17:17:55 +00:00
Jim Blandy 9f64376872 gdb/ChangeLog:
2004-07-20  Jim Blandy  <jimb@redhat.com>

	Use a fixed register numbering when communicating with the PowerPC
	simulator.
	* ppc-tdep.h (struct gdbarch_tdep): New member: 'sim_regno'.
	* rs6000-tdep.c: #include "sim-regno.h" and "gdb/sim-ppc.h".
	(set_sim_regno, init_sim_regno_table, rs6000_register_sim_regno):
	New functions.
	(rs6000_gdbarch_init): Register rs6000_register_sim_regno.  Call
	init_sim_regno_table.
	* Makefile.in (gdb_sim_ppc_h): New variable.
	(rs6000-tdep.o): Update dependencies.

include/gdb/ChangeLog:
2004-07-20  Jim Blandy  <jimb@redhat.com>

	* sim-ppc.h: New file.

sim/ppc/ChangeLog:
2004-07-20  Jim Blandy  <jimb@redhat.com>

	Use a fixed register numbering when communicating with the PowerPC
	simulator.
	* sim_calls.c: #include "registers.h" and "gdb/sim-ppc.h"; do not
	include GDB's "defs.h".
	(gdb_register_name_table): New variable.
	(gdb_register_name_table_size): New enum constant.
	(gdb_register_name): New function.
	(sim_fetch_register, sim_store_register): Use gdb_register_name,
	instead of calling gdbarch_register_name.
	* Makefile.in (GDB_SIM_PPC_H): New variable.
	(DEFS_H): Delete variable.
	(sim_calls.o): Update dependencies.
2004-08-04 17:04:36 +00:00
Andrew Cagney 3acba33923 2004-08-02 Andrew Cagney <cagney@gnu.org>
Replace DEPRECATED_REGISTER_RAW_SIZE with register_size.
	* rs6000-tdep.c (rs6000_push_dummy_call)
	(rs6000_extract_return_value): Use register_size.
	* xstormy16-tdep.c (xstormy16_get_saved_register)
	(xstormy16_extract_return_value): Ditto.
	* valops.c (value_assign): Ditto.
	* v850ice.c (v850ice_fetch_registers, v850ice_store_registers):
	* v850-tdep.c (v850_extract_return_value): Ditto.
	* tracepoint.c (collect_symbol): Ditto.
	* target.c (debug_print_register): Ditto.
	* stack.c (frame_info): Ditto.
	* rs6000-nat.c (ARCH64, fetch_register, store_register): Ditto.
	* rom68k-rom.c (rom68k_supply_one_register): Ditto.
	* remote.c (struct packet_reg, remote_wait, remote_async_wait)
	(store_register_using_P): Ditto.
	* remote-vxmips.c (vx_read_register, vx_write_register): Ditto.
	* remote-sim.c (gdbsim_fetch_register, gdbsim_store_register): Ditto.
	* remote-mips.c (mips_wait, mips_fetch_registers): Ditto.
	* remote-e7000.c (fetch_regs_from_dump, sub2_from_pc): Ditto.
	* regcache.c (deprecated_read_register_bytes)
	(deprecated_write_register_bytes, read_register)
	(write_register): Ditto.
	* ppc-linux-nat.c (fetch_altivec_register, fetch_register)
	(supply_vrregset, store_altivec_register, fill_vrregset): Ditto.
	* monitor.c (monitor_supply_register, monitor_fetch_register)
	(monitor_store_register): Ditto.
	* mn10300-tdep.c (mn10300_pop_frame_regular)
	(mn10300_print_register): Ditto.
	* mipsv4-nat.c (fill_fpregset): Ditto.
	* mips-linux-tdep.c (supply_32bit_reg, fill_fpregset)
	(mips64_fill_fpregset): Ditto.
	* mi/mi-main.c (register_changed_p, get_register)
	(mi_cmd_data_write_register_values): Ditto.
	* lynx-nat.c (fetch_inferior_registers, store_inferior_registers):
	* irix5-nat.c (fill_gregset, fetch_core_registers):
	* infrun.c (write_inferior_status_register): Ditto.
	* infptrace.c (fetch_register, store_register): Ditto.
	* infcmd.c (default_print_registers_info): Ditto.
	* ia64-linux-nat.c (COPY_REG, fill_fpregset): Ditto.
	* ia64-aix-nat.c (COPY_REG, fill_gregset): Ditto.
	* i386gnu-nat.c (gnu_store_registers, fill): Ditto.
	* hpux-thread.c (hpux_thread_fetch_registers)
	(hpux_thread_store_registers): Ditto.
	* hppah-nat.c (store_inferior_registers, fetch_register):
	* findvar.c (value_from_register): Ditto.
	* dve3900-rom.c (fetch_bitmapped_register):
	* cris-tdep.c (cris_gdbarch_init): Ditto.
	* alpha-tdep.h: Ditto.
	* aix-thread.c (pd_enable, fill_sprs64, fill_sprs32): Ditto.
2004-08-03 00:57:27 +00:00
Andrew Cagney 1f67027d6b 2004-07-31 Andrew Cagney <cagney@gnu.org>
* trad-frame.c (trad_frame_get_prev_register): Rename
	trad_frame_get_prev_register.
	* vax-tdep.c (vax_frame_prev_register): Update.
	* trad-frame.h: Update.
	* trad-frame.c (trad_frame_get_register): Update.
	* sparcobsd-tdep.c (sparc32obsd_frame_prev_register): Update.
	* sparcnbsd-tdep.c (sparc32nbsd_sigcontext_frame_prev_register):
	Update.
	* sparc64obsd-tdep.c (sparc64obsd_frame_prev_register): Update.
	* sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_frame_prev_register):
	Update.
	* sparc64fbsd-tdep.c (sparc64fbsd_sigtramp_frame_prev_register):
	Update.
	* sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_prev_register):
	Update.
	* sparc-sol2-tdep.c (sparc32_sol2_sigtramp_frame_prev_register):
	Update.
	* sparc-linux-tdep.c (sparc32_linux_sigtramp_frame_prev_register):
	Update.
	* s390-tdep.c (s390_frame_prev_register)
	(s390_stub_frame_prev_register)
	(s390_sigtramp_frame_prev_register): Update.
	* rs6000-tdep.c (rs6000_frame_prev_register): Update.
	* ppc-linux-tdep.c (ppc_linux_sigtramp_prev_register): Update.
	* mips-tdep.c (mips_mdebug_frame_prev_register): Update.
	* m88k-tdep.c (m88k_frame_prev_register)
	* m68hc11-tdep.c (m68hc11_frame_prev_register)
	* m32r-tdep.c (m32r_frame_prev_register): Update.
	* hppa-tdep.c (hppa_frame_prev_register_helper)
	* frv-tdep.c (frv_frame_prev_register): Update.
	* d10v-tdep.c (d10v_frame_prev_register): Update.
	* cris-tdep.c (cris_frame_prev_register): Update.
	* avr-tdep.c (avr_frame_prev_register): Update.
	* arm-tdep.c (arm_prologue_prev_register)
	(arm_sigtramp_prev_register): Update.
2004-07-31 21:53:17 +00:00
Jim Blandy 412b306056 * rs6000-tdep.c (rs6000_gdbarch_init): The register set used for
bfd_mach_ppc has no segment registers.
2004-07-20 22:09:53 +00:00
Jim Blandy 13ac140c31 Include PowerPC SPR numbers for special-purpose registers.
* rs6000-tdep.c (struct reg): Add new member, 'spr_num'.
(R, R4, R8, R16, F, P, R32, R64, R0): Include value for
new member in initializer.
(S, S4, SN4, S64): New macros for defining special-purpose
registers.
(PPC_UISA_SPRS, PPC_UISA_NOFP_SPRS, PPC_OEA_SPRS, registers_power,
registers_403, registers_403GC, registers_505, registers_860,
registers_601, registers_602, registers_603, registers_604,
registers_750, registers_e500): Use them.
2004-07-20 22:08:37 +00:00
Jim Blandy 708ff41185 * rs6000-tdep.c (rs6000_gdbarch_init): Delete variable 'power';
replace references with expression used to initialize variable.
2004-07-20 22:06:05 +00:00
Jim Blandy c101bc14b1 * rs6000-tdep.c (registers_602): Correct register name: "esassr"
should be "esasrr" ("ESA Save and Restore Register").
2004-07-16 20:53:06 +00:00
Jim Blandy f86a7158a9 * ppc-tdep.h (struct gdbarch_tdep): New member: ppc_sr0_regnum.
* rs6000-tdep.c (rs6000_gdbarch_init): Initialize it.
2004-07-15 08:02:36 +00:00
Jim Blandy 29bb1356b5 * rs6000-tdep.c (COMMON_UISA_NOFP_REGS): Delete; unused. 2004-07-14 23:58:04 +00:00
Jim Blandy c24791eca1 * rs6000-tdep.c (registers_860): Correct register name. (No PPC
manual mentions 'md_twb', but many mention 'm_twb', and at that
point in the register list.)
2004-07-14 23:00:59 +00:00
Jim Blandy 61ce229a50 * rs6000-tdep.c (registers_powerpc_nofp): Unused; deleted. 2004-07-08 23:43:47 +00:00
Andrew Cagney b5622e8d3c 2004-06-20 Andrew Cagney <cagney@gnu.org>
* gdbarch.sh (DEPRECATED_USE_STRUCT_CONVENTION): Deprecated.
	* gdbarch.h, gdbarch.c: Re-generate.
	* values.c (using_struct_return): Update call.
	* mcore-tdep.c: Update comment.
	* infcall.c (call_function_by_hand): Update comment.
	* xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
	* arch-utils.h (always_use_struct_convention): Update.
	* v850-tdep.c (v850_gdbarch_init): Update.
	* sh64-tdep.c (sh64_gdbarch_init): Update.
	* sh-tdep.c (sh_gdbarch_init): Update.
	* rs6000-tdep.c (rs6000_gdbarch_init): Update.
	* mips-tdep.c (mips_gdbarch_init): Update.
	* mcore-tdep.c (mcore_gdbarch_init): Update.
	* m32r-tdep.c (m32r_gdbarch_init): Update.
	* ia64-tdep.c (ia64_gdbarch_init): Update.
	* h8300-tdep.c (h8300_gdbarch_init): Update.
	* frv-tdep.c (frv_gdbarch_init): Update.
	* cris-tdep.c (cris_gdbarch_init): Update.
	* arm-tdep.c (arm_gdbarch_init): Update.
	* alpha-tdep.c (alpha_gdbarch_init): Update.

Index: doc/ChangeLog
2004-06-20  Andrew Cagney  <cagney@gnu.org>

	* gdbint.texinfo (Target Architecture Definition): Deprecate
	USE_STRUCT_CONVENTION.
2004-06-20 17:18:07 +00:00
Jim Blandy 019048261d Add native Linux support for the PowerPC E500.
* ppc-tdep.h (struct gdbarch_tdep): New member: 'ppc_gprs_pseudo_p'.
* rs6000-tdep.c (rs6000_gdbarch_init): Initialize it to false on
all architectures except the E500.
* ppc-linux-nat.c: (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): New
#definitions.
(struct gdb_evrregset_t): New type.
(have_ptrace_getsetevrregs): New variable.
(get_spe_registers, read_spliced_spe_reg, fetch_spe_register,
fetch_spe_registers): New functions.
(fetch_register): Call fetch_spe_register as appropriate.
Assert that we're only passed raw register numbers.
(fetch_ppc_registers): Call fetch_spe_registers as appropriate.
Don't fetch gprs if they're pseudoregisters.
(set_spe_registers, write_spliced_spe_reg, store_spe_register,
store_spe_registers): New functions.
(store_register): Call store_spe_register as appropriate.
Assert that we're only passed raw register numbers.
(store_ppc_registers): Call store_spe_registers as appropriate.
Don't store gprs if they're pseudoregisters.
2004-06-07 23:37:20 +00:00
Randolph Chung 7d9b040b53 2004-06-06 Randolph Chung <tausq@debian.org>
* gdbarch.sh (PUSH_DUMMY_CALL): Change CORE_ADDR func_addr argument
	to struct value *function.
	* gdbarch.c: Regenerate.
	* gdbarch.h: Likewise.
	* infcall.c (call_function_by_hand): Pass entire function value
	to push_dummy_call.

	* Makefile.in (alpha-tdep.o, frv-tdep.o, ia64-tdep.o, mips-tdep.o)
	(ppc-sysv-tdep.o, rs6000-tdep.o): Update dependencies.
	* alpha-tdep.c (alpha_push_dummy_call): Update call signature.
	* amd64-tdep.c (amd64_push_dummy_call): Likewise.
	* arm-tdep.c (arm_push_dummy_call): Likewise.
	* avr-tdep.c (avr_push_dummy_call): Likewise.
	* cris-tdep.c (cris_push_dummy_call): Likewise.
	* d10v-tdep.c (d10v_push_dummy_call): Likewise.
	* frv-tdep.c (frv_push_dummy_call): Likewise.
	* h8300-tdep.c (h8300_push_dummy_call): Likewise.
	* hppa-tdep.c (hppa32_push_dummy_call)
	(hppa64_push_dummy_call): Likewise.
	* i386-tdep.c (i386_push_dummy_call): Likewise.
	* ia64-tdep.c (ia64_push_dummy_call): Likewise.
	* m32r-tdep.c (m32r_push_dummy_call): Likewise.
	* m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
	* m68k-tdep.c (m68k_push_dummy_call): Likewise.
	* m88k-tdep.c (m88k_push_dummy_call): Likewise.
	* mips-tdep.c (mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call)
	(mips_o32_push_dummy_call, mips_o64_push_dummy_call): Likewise.
	* ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call)
	(ppc64_sysv_abi_push_dummy_call): Likewise.
	* ppc-tdep.h (ppc_sysv_abi_push_dummy_call)
	(ppc64_sysv_abi_push_dummy_call): Likewise.
	* rs6000-tdep.c (rs6000_push_dummy_call): Likewise.
	* s390-tdep.c (s390_push_dummy_call): Likewise.
	* sh-tdep.c (sh_push_dummy_call_fpu)
	(sh_push_dummy_call_nofpu): Likewise.
	* sparc-tdep.c (sparc32_push_dummy_call): Likewise.
	* sparc64-tdep.c (sparc64_push_dummy_call): Likewise.
	* vax-tdep.c (vax_push_dummy_call): Likewise.
2004-06-07 02:02:55 +00:00
Jim Blandy a3c001cee0 * rs6000-tdep.c (rs6000_store_return_value): Use
regcache_cooked_write_part instead of
deprecated_write_register_bytes.
(rs6000_gdbarch_init): Register it for gdbarch_store_return_value,
not gdbarch_deprecated_store_return_value.
2004-06-05 00:11:49 +00:00
Jim Blandy f65f91b509 * ppc-tdep.h: Delete unused 'regoff' member.
* rs6000-tdep.c (rs6000_gdbarch_init): Don't initialize it.
2004-06-02 03:06:23 +00:00
Jim Blandy 691d145a72 * rs6000-tdep.c: Use the modern gdbarch methods for handling the
register set, so our regcache isn't declared "legacy" and our E500
pseudoregister read and write functions aren't ignored.
(rs6000_register_byte, rs6000_register_raw_size,
rs6000_register_virtual_type, rs6000_register_convertible,
rs6000_register_convert_to_virtual,
rs6000_register_convert_to_raw): Deleted.
(rs6000_register_type, rs6000_convert_register_p,
rs6000_register_to_value, rs6000_value_to_register): New
functions.
(rs6000_gdbarch_init): Don't register
gdbarch_deprecated_register_size,
gdbarch_deprecated_register_bytes,
gdbarch_deprecated_register_byte,
gdbarch_deprecated_register_raw_size,
gdbarch_deprecated_register_virtual_type,
gdbarch_deprecated_register_convertible,
gdbarch_deprecated_register_convert_to_virtual, or
gdbarch_deprecated_register_convert_to_raw methods.  Instead,
register gdbarch_register_type, gdbarch_convert_register_p,
gdbarch_register_to_value, and gdbarch_value_to_register methods.
2004-05-28 21:59:37 +00:00
Jim Blandy 18ed0c4eb8 * rs6000-tdep.c (rs6000_dwarf2_stab_reg_to_regnum): Deleted.
(rs6000_stab_reg_to_regnum, rs6000_dwarf2_reg_to_regnum): New
functions, updated to match the register numberings used in GCC.
(rs6000_gdbarch_init): Register rs6000_stab_reg_to_regnum and
rs6000_dwarf2_reg_to_regnum as register number conversions
functions for STABS and Dwarf2.
2004-05-28 18:56:37 +00:00
Jim Blandy 867e2dc5ac * ppc-tdep.h (spe_register_p): New declaration.
(struct gdbarch_tdep): New members: ppc_acc_regnum and
ppc_spefscr_regnum.
* rs6000-tdep.c (spe_register_p): New function.
(rs6000_dwarf2_stab_reg_to_regnum): Recognize numbers for acc and
spefscr.
(rs6000_gdbarch_init): Initialize the new members of the tdep
structure.
2004-05-22 06:03:26 +00:00
Jim Blandy c2b6b4aad9 * rs6000-tdep.c (rs6000_push_dummy_call): Formatting fixes. 2004-05-20 18:49:37 +00:00
Jim Blandy baffbae05e * rs6000-tdep.c (rs6000_gdbarch_init): Initialize tdep fields
before the mach-specific switch, and then let the individual cases
override the defaults, rather than leaving them uninitialized
until the switch and then setting them in each case.
2004-05-19 04:18:42 +00:00
Joel Brobecker 773df3e50e * rs6000-tdep.c (store_param_on_stack_p): New function,
an improved version of some code extracted from skip_prologue().
        (skip_prologue): Use store_param_on_stack_p() to detect
        instructions saving a parameter on the stack. Detect when r0
        is used to save a parameter.
        Do not mark "li rx, SIMM" instructions as part of the prologue,
        unless the following instruction is also part of the prologue.
2004-05-15 05:57:16 +00:00
Jim Blandy 063715bf63 * aix-thread.c (pdc_read_regs, supply_gprs64, supply_fprs)
(fetch_regs_user_thread, fetch_regs_kernel_thread)
(store_regs_user_thread, store_regs_kernel_thread): Use
ppc_num_gprs and ppc_num_fprs instead of '32' and '31'.
* ppc-linux-nat.c (fill_gregset): Same.
* ppc-linux-tdep.c (ppc_linux_supply_gregset)
(ppc_linux_sigtramp_cache): Same.
* ppcnbsd-tdep.c (ppcnbsd_supply_reg, ppcnbsd_fill_reg)
(ppcnbsd_sigtramp_cache_init): Same.
* rs6000-nat.c (fetch_core_registers): Same.
* rs6000-tdep.c (ppc_supply_gregset, ppc_collect_gregset)
(rs6000_frame_cache): Same.
2004-05-13 19:36:05 +00:00
Jim Blandy cdf2c5f516 * aix-thread.c (supply_gprs64, fetch_regs_user_thread)
(store_regs_user_thread): Use tdep->ppc_gp0_regnum, instead
of assuming that the gprs are numbered starting with zero.
* ppc-linux-nat.c (fill_gregset): Same.
* ppc-linux-tdep.c (ppc_linux_supply_gregset): Same.
* ppcnbsd-nat.c (getregs_supplies): Same.
* ppcnbsd-tdep.c (ppcnbsd_supply_reg, ppcnbsd_fill_reg): Same.
* rs6000-nat.c (fetch_core_registers): Same.
* rs6000-tdep.c (ppc_supply_gregset, ppc_collect_gregset): Same.
2004-05-13 19:27:07 +00:00
Jim Blandy 383f0f5b9a * ppc-tdep.h (struct gdbarch_tdep): Change definition of
ppc_fp0_regnum and ppc_fpscr_regnum: if they are -1, then this
processor variant lacks those registers.
(ppc_floating_point_unit_p): Change description to make it clear
that this returns info about the ISA, not the ABI.
* rs6000-tdep.c (ppc_floating_point_unit_p): Decide whether to
return true or false by checking tdep->ppc_fp0_regnum and
tdep->ppc_fpscr_regnum.  The original code replicated the BFD
arch/mach switching done in rs6000_gdbarch_init; it's better to
keep that logic there, and just check the results here.
(rs6000_gdbarch_init): On the E500, set tdep->ppc_fp0_regnum and
tdep->ppc_fpscr_regnum to -1 to indicate that we have no
floating-point registers.
(ppc_supply_fpregset, ppc_collect_fpregset)
(rs6000_push_dummy_call, rs6000_extract_return_value)
(rs6000_store_return_value): Assert that we have floating-point
registers.
(rs6000_dwarf2_stab_reg_to_regnum): Add FIXME.
(rs6000_frame_cache): Don't note the locations at which
floating-point registers were saved if we have no fprs.
* aix-thread.c (supply_fprs, fill_fprs): Assert that we have FP
registers.
(fetch_regs_user_thread, fetch_regs_kernel_thread)
(store_regs_user_thread, store_regs_kernel_thread): Only call
supply_fprs / fill_fprs if we actually have floating-point
registers.
(special_register_p): Check ppc_fpscr_regnum before matching
against it.
(supply_sprs64, supply_sprs32, fill_sprs64, fill_sprs32): Don't
supply / collect fpscr if we don't have it.
* ppc-bdm.c: #include "gdb_assert.h".
(bdm_ppc_fetch_registers, bdm_ppc_store_registers): Assert that we
have floating-point registers, since I can't test this code on
FP-free systems to adapt it.
* ppc-linux-nat.c (ppc_register_u_addr): Don't match against the
fpscr and floating point register numbers if they don't exist.
(fetch_register): Assert that we have floating-point registers
before we reach the code that handles them.
(store_register): Same.  And use tdep instead of calling
gdbarch_tdep again.
(fill_fpregset): Don't try to collect FP registers and fpscr if we
don't have them.
(ppc_linux_sigtramp_cache): Don't record the saved locations of
fprs and fpscr if we don't have them.
(ppc_linux_supply_fpregset): Don't supply fp regs and fpscr if we
don't have them.
* ppcnbsd-nat.c: #include "gdb_assert.h".
(getfpregs_supplies): Assert that we have floating-point registers.
* ppcnbsd-tdep.c (ppcnbsd_supply_fpreg, ppcnbsd_fill_fpreg): Same.
* ppcobsd-tdep.c: #include "gdb_assert.h".
(ppcobsd_supply_gregset, ppcobsd_collect_gregset): Assert that we
have floating-point registers.
* rs6000-nat.c (regmap): Don't match against the fpscr and
floating point register numbers if they don't exist.
(fetch_inferior_registers, store_inferior_registers,
fetch_core_registers): Only fetch / store / supply the
floating-point registers and the fpscr if we have them.
* Makefile.in (ppc-bdm.o, ppc-linux-nat.o, ppcnbsd-nat.o)
(ppcobsd-tdep.o): Update dependencies.
2004-05-11 04:55:32 +00:00
Jim Blandy 7bcda025ec Back out change. The NetBSD changes need Jason Thorpe's approval, but
he hasn't reviewed it yet.
2004-05-10 18:58:44 +00:00
Jim Blandy c4143af614 * ppc-tdep.h (struct gdbarch_tdep): Change definition of
ppc_fp0_regnum and ppc_fpscr_regnum: if they are -1, then this
processor variant lacks those registers.
(ppc_floating_point_unit_p): Change description to make it clear
that this returns info about the ISA, not the ABI.
* rs6000-tdep.c (ppc_floating_point_unit_p): Decide whether to
return true or false by checking tdep->ppc_fp0_regnum and
tdep->ppc_fpscr_regnum.  The original code replicated the BFD
arch/mach switching done in rs6000_gdbarch_init; it's better to
keep that logic there, and just check the results here.
(rs6000_gdbarch_init): On the E500, set tdep->ppc_fp0_regnum and
tdep->ppc_fpscr_regnum to -1 to indicate that we have no
floating-point registers.
(ppc_supply_fpregset, ppc_collect_fpregset)
(rs6000_push_dummy_call, rs6000_extract_return_value)
(rs6000_store_return_value): Assert that we have floating-point
registers.
(rs6000_dwarf2_stab_reg_to_regnum): Add FIXME.
(rs6000_frame_cache): Don't note the locations at which
floating-point registers were saved if we have no fprs.
* aix-thread.c (supply_fprs, fill_fprs): Assert that we have FP
registers.
(fetch_regs_user_thread, fetch_regs_kernel_thread)
(store_regs_user_thread, store_regs_kernel_thread): Only call
supply_fprs / fill_fprs if we actually have floating-point
registers.
(special_register_p): Check ppc_fpscr_regnum before matching
against it.
(supply_sprs64, supply_sprs32, fill_sprs64, fill_sprs32): Don't
supply / collect fpscr if we don't have it.
* ppc-bdm.c: #include "gdb_assert.h".
(bdm_ppc_fetch_registers, bdm_ppc_store_registers): Assert that we
have floating-point registers, since I can't test this code on
FP-free systems to adapt it.
* ppc-linux-nat.c (ppc_register_u_addr): Don't match against the
fpscr and floating point register numbers if they don't exist.
(fetch_register): Assert that we have floating-point registers
before we reach the code that handles them.
(store_register): Same.  And use tdep instead of calling
gdbarch_tdep again.
(fill_fpregset): Don't try to collect FP registers and fpscr if we
don't have them.
(ppc_linux_sigtramp_cache): Don't record the saved locations of
fprs and fpscr if we don't have them.
(ppc_linux_supply_fpregset): Don't supply fp regs and fpscr if we
don't have them.
* ppcnbsd-nat.c: #include "gdb_assert.h".
(getfpregs_supplies): Assert that we have floating-point registers.
* ppcnbsd-tdep.c (ppcnbsd_supply_fpreg, ppcnbsd_fill_fpreg): Same.
* ppcobsd-tdep.c: #include "gdb_assert.h".
(ppcobsd_supply_gregset, ppcobsd_collect_gregset): Assert that we
have floating-point registers.
* rs6000-nat.c (regmap): Don't match against the fpscr and
floating point register numbers if they don't exist.
(fetch_inferior_registers, store_inferior_registers,
fetch_core_registers): Only fetch / store / supply the
floating-point registers and the fpscr if we have them.
* Makefile.in (ppc-bdm.o, ppc-linux-nat.o, ppcnbsd-nat.o)
(ppcobsd-tdep.o): Update dependencies.
2004-05-10 17:07:02 +00:00
Jim Blandy 2e56e9c16f * rs6000-tdep.c (ppc_collect_gregset): When regnum == -1, do
collect all the gprs.
2004-05-10 16:53:56 +00:00
Jim Blandy 26c0b94256 * rs6000-tdep.c (ppc_collect_gregset): Correct off-by-one error in
loop collecting gprs.
2004-05-10 16:52:39 +00:00
Andrew Cagney 1ac839b8cc 2004-05-08 Andrew Cagney <cagney@redhat.com>
* infcall.c (call_function_by_hand): When no
	DEPRECATED_SAVE_DUMMY_FRAME_TOS call generic_save_dummy_frame_tos.
	* rs6000-tdep.c (rs6000_gdbarch_init): Do not set
	DEPRECATED_SAVE_DUMMY_FRAME_TOS.
	* mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
	* mcore-tdep.c (mcore_gdbarch_init): Ditto.
2004-05-08 22:19:30 +00:00
Jim Blandy 366f009f23 * config/rs6000/tm-rs6000.h (FP0_REGNUM): Document that this
should no longer be used in code specific to the RS6000 and its
derivatives.
* ppc-tdep.h (struct gdbarch_tdep): Add 'ppc_fp0_regnum' member.
* rs6000-tdep.c (rs6000_gdbarch_init): Initialize
tdep->ppc_fp0_regnum.
(ppc_supply_fpregset, ppc_collect_fpregset)
(rs6000_push_dummy_call, rs6000_extract_return_value)
(rs6000_dwarf2_stab_reg_to_regnum, rs6000_store_return_value)
(rs6000_frame_cache): Use tdep->ppc_fp0_regnum instead of
FP0_REGNUM.
* aix-thread.c (supply_fprs, fetch_regs_kernel_thread)
(fill_gprs64, fill_gprs32, fill_fprs, store_regs_kernel_thread):
Same.
* ppc-bdm.c (bdm_ppc_fetch_registers, bdm_ppc_fetch_registers,
bdm_ppc_store_registers): Same.
* ppc-linux-nat.c (ppc_register_u_addr, fetch_register)
(store_register, fill_fpregset): Same.
* ppc-linux-tdep.c (ppc_linux_sigtramp_cache)
(ppc_linux_supply_fpregset): Same.
* ppcnbsd-nat.c (getfpregs_supplies): Same.
* ppcnbsd-tdep.c (ppcnbsd_supply_fpreg, ppcnbsd_fill_fpreg):
Same.
* ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call,
do_ppc_sysv_return_value, ppc64_sysv_abi_push_dummy_call,
ppc64_sysv_abi_return_value): Same.
* rs6000-nat.c (regmap, fetch_inferior_registers)
(store_inferior_registers, fetch_core_registers): Same.
2004-05-05 01:46:55 +00:00
Jim Blandy 8bf659e8f6 * config/ppc-tdep.h (struct gdbarch_tdep): Delete
'ppc_gplast_regnum' member.
(ppc_num_gprs): New enum constant.
* ppc-linux-nat.c (ppc_register_u_addr): Use tdep->ppc_gp0_regnum
and ppc_num_gprs instead of tdep->ppc_gplast_regnum.
* rs6000-nat.c (regmap, fetch_inferior_registers,
store_inferior_registers): Same.
* rs6000-tdep.c (e500_pseudo_register_read)
(e500_pseudo_register_write): Same.
(rs6000_gdbarch_init): Don't initialize tdep->ppc_gplast_regnum.
2004-05-04 17:58:31 +00:00
Jerome Guitton 65951cd9b4 * rs6000-tdep.c (rs6000_extract_return_value): When extracting a float,
use convert_typed_floating to get the appropriate format.
2004-04-23 16:21:34 +00:00
Mark Kettenis d195bc9fb0 Add OpenBSD/powerpc support.
* NEWS (New native configurations): Mention OpenBSD/powerpc.
* ppc-tdep.h (struct ppc_reg_offsets): New structure.
(ppc_supply_gregset, ppc_supply_fpregset, ppc_collect_gregset)
(ppc_collect_fpregset): New prototypes.
* ppcobsd-nat.c: New file.
* ppcobsd-tdep.c: New file.
* ppcobsd-tdep.h: New file.
* rs6000-tdep.c: Include "regset.h".
(ppc_supply_reg, ppc_collect_reg, ppc_supply_gregset)
(ppc_supply_fpregset, ppc_collect_gregset, ppc_collect_fpregset):
New functions.
* Makefile.in (ALLDEPFILES): Add pccobsd-nat.c and ppcobsd-tdep.c.
(ppcobsd-nat.o, ppcobsd-tdep.o): New dependencies.
(rs6000-tdep.o): Update dependencies.
* configure.host: Add powerpc-*-openbsd.
* configure.tgt: Add powerpc-*-openbsd.
* config/powerpc/obsd.mh: New file.
* config/powerpc/nm-obsd.h: New file.
* config/powerpc/obsd.mt: New file.
2004-04-22 21:13:06 +00:00
Jim Blandy 13c7b1ca39 * rs6000-tdep.c (registers_e500, registers_7400): Doc fixes. 2004-04-21 16:38:07 +00:00