Commit Graph

293 Commits

Author SHA1 Message Date
Daniel Jacobowitz 4be87837a2 * arch-utils.c (gdbarch_info_init): Set osabi to
GDB_OSABI_UNINITIALIZED.
	* gdbarch.sh: Add osabi to struct gdbarch and to struct
	gdbarch_info.  Include "osabi.h" in gdbarch.c.  Check osabi
	in gdbarch_list_lookup_by_info and in gdbarch_update_p.
	* gdbarch.c: Regenerated.
	* gdbarch.h: Regenerated.
	* osabi.c (gdbarch_lookup_osabi): Return GDB_OSABI_UNINITIALIZED if
	there's no BFD.
	(gdbarch_init_osabi): Remove osabi argument; use info.osabi.
	* osabi.h (enum gdb_osabi): Move to defs.h.
	(gdbarch_init_osabi): Update prototype.
	* defs.h (enum gdb_osabi): Moved here.
	* Makefile.in: Update dependencies.

Plus updates to alpha, arm, hppa, i386, mips, ns32k, ppc, sh, sparc, and vax
ports to match.
2003-01-04 23:38:46 +00:00
Daniel Jacobowitz 1e69823536 gdb/
* buildsym.h (processing_hp_compilation): Remove obsolete variable.
	* gdbarch.sh Remove include of "value.h" in gdbarch.h.
	(COERCE_FLOAT_TO_DOUBLE): Remove.
	* gdbarch.c: Regenerate.
	* gdbarch.h: Regenerate.
	* Makefile.in: Remove value_h from gdbarch_h.
	* valops.c (coerce_float_to_double): New variable.
	(default_coerce_float_to_double): Remove.
	(standard_coerce_float_to_double): Remove.
	(value_arg_coerce): Use coerce_float_to_double.
	(_initialize_valops): Add "set coerce-float-to-double".
	* value.h (default_coerce_float_to_double): Remove prototype.
	(standard_coerce_float_to_double): Remove prototype.

	* hpread.c (hpread_process_one_debug_symbol): Mark C++ functions as
	prototyped.
	* mdebugread.c (parse_symbol): Likewise.
	* stabsread.c (define_symbol): Mark all functions as prototyped.

	* hppa-tdep.c (hppa_coerce_float_to_double): Remove.
	* alpha-tdep.c (alpha_gdbarch_init): Remove call to
	set_gdbarch_coerce_float_to_double.
	* arm-tdep.c (arm_gdbarch_init): Likewise.
	* frv-tdep.c (frv_gdbarch_init): Likewise.
	* h8300-tdep.c (h8300_gdbarch_init): Likewise (commented out).
	* i386-sol2-tdep.c (i386_sol2_init_abi): Likewise.
	* mips-tdep.c (mips_gdbarch_init): Likewise.
	(mips_coerce_float_to_double): Remove.
	* rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
	(rs6000_coerce_float_to_double): Remove.
	* s390-tdep.c (s390_gdbarch_init): Likewise.
	* sh-tdep.c (sh_gdbarch_init): Likewise.
	(sh_coerce_float_to_double): Remove.
	* sparc-tdep.c (sparc_gdbarch_init): Likewise.
	(sparc_coerce_float_to_double): Remove.
	* v850-tdep.c (v850_gdbarch_init): Likewise.
	* xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
	* config/m32r/tm-m32r.h (COERCE_FLOAT_TO_DOUBLE): Remove.
	* config/pa/tm-hppa.h: (COERCE_FLOAT_TO_DOUBLE): Remove.
	(hppa_coerce_float_to_double): Remove prototype.
	* config/sparc/tm-sparc.h (COERCE_FLOAT_TO_DOUBLE): Remove.
doc/
	* gdb.texinfo (Controlling GDB): Add ABI section.  Document
	"set coerce-float-to-double".
	* gdbint.texinfo (COERCE_FLOAT_TO_DOUBLE): Remove documentation.
testsuite/
	* gdb.base/callfuncs.exp: Don't XFAIL unprototyped functions for
	stabs.
	* gdb.base/completion.exp: Allow marker1(void) as well as marker1().
	* gdb.base/whatis.exp: Always allow (void) after function names.
2003-01-04 22:37:49 +00:00
Andrew Cagney c9012c7106 2002-12-18 Andrew Cagney <ac131313@redhat.com>
* rs6000-tdep.c (rs6000_init_extra_frame_info): Use
	frame_extra_info_zalloc.
	(rs6000_frame_args_address): Use get_frame_extra_info.
	(frame_get_saved_regs): Use get_frame_saved_regs.
	(frame_initial_stack_address): Use get_frame_saved_regs and
	get_frame_extra_info.
	(frame_initial_stack_address): Use get_frame_extra_info.
2002-12-18 15:23:22 +00:00
Andrew Cagney bdd78e628a 2002-12-07 Andrew Cagney <ac131313@redhat.com>
* f-valprint.c (info_common_command): Use get_frame_pc.
	* std-regs.c (value_of_builtin_frame_pc_reg): Ditto.
	* ax-gdb.c (agent_command): Ditto.
	* rs6000-tdep.c (rs6000_init_extra_frame_info): Ditto.
	(rs6000_pop_frame): Ditto.
	(rs6000_frameless_function_invocation): Ditto.
	(rs6000_frame_saved_pc, frame_get_saved_regs): Ditto.
	(frame_initial_stack_address, rs6000_frame_chain): Ditto.
	* macroscope.c (default_macro_scope): Ditto.
	* stack.c (print_frame_info_base): Ditto.
	(print_frame, frame_info, print_frame_label_vars): Ditto.
	(return_command, func_command, get_frame_language): Ditto.
	* infcmd.c (finish_command): Ditto.
	* dummy-frame.c (cached_find_dummy_frame): Ditto.
	* breakpoint.c (deprecated_frame_in_dummy): Ditto.
	(break_at_finish_at_depth_command_1): Ditto.
	(break_at_finish_command_1): Ditto.
	(until_break_command, get_catch_sals): Ditto.
	* blockframe.c (func_frame_chain_valid): Ditto.
	(frameless_look_for_prologue): Ditto.
	(frame_address_in_block, generic_func_frame_chain_valid): Ditto.
2002-12-09 03:30:44 +00:00
Andrew Cagney 8b36eed86d 2002-12-08 Andrew Cagney <ac131313@redhat.com>
* blockframe.c: Use get_frame_base instead of directly accessing
	the `struct frame_info' member frame.
	* f-valprint.c, std-regs.c, rs6000-tdep.c: Ditto.
	* stack.c, dummy-frame.c, breakpoint.c: Ditto.
2002-12-09 01:40:25 +00:00
Andrew Cagney 75e3c1f98d 2002-12-08 Andrew Cagney <ac131313@redhat.com>
* stack.c (frame_info): Use get_prev_frame.
	* blockframe.c (frame_address_in_block): Ditto.
	* rs6000-tdep.c (rs6000_init_extra_frame_info): Ditto.
	(rs6000_frameless_function_invocation): Ditto.
	(rs6000_frame_saved_pc): Ditto.
	(rs6000_frame_chain): Ditto.
	* arch-utils.c (init_frame_pc_default): Ditto.
2002-12-09 00:32:08 +00:00
Andrew Cagney ae45cd1682 2002-12-01 Andrew Cagney <ac131313@redhat.com>
* gdbarch.sh (DEPRECATED_PC_IN_CALL_DUMMY): Rename
	PC_IN_CALL_DUMMY.  Change to predicate.  Always allow call.
	* gdbarch.h, gdbarch.c: Re-generate.
	* config/sparc/tm-sparc.h, config/sparc/tm-sp64.h: Update.
	* config/mn10200/tm-mn10200.h, config/h8500/tm-h8500.h: Update.
	* config/pa/tm-hppa.h, frame.h: Update.
	* x86-64-tdep.c, vax-tdep.c, sparc-tdep.c: Update.
	* s390-tdep.c, ns32k-tdep.c, mn10300-tdep.c: Update.
	* m68k-tdep.c, i386-tdep.c, frv-tdep.c: Update.
	* cris-tdep.c, alpha-tdep.c: Update.
	* frame.c (set_unwind_by_pc, create_new_frame): Use either
	DEPRECATED_PC_IN_CALL_DUMMY or pc_in_dummy_frame.
	(get_prev_frame): Ditto.

Index: doc/ChangeLog
2002-12-01  Andrew Cagney  <ac131313@redhat.com>

	* gdbint.texinfo (Target Architecture Definition): Delete
	PC_IN_CALL_DUMMY.
2002-12-01 19:07:16 +00:00
Andrew Cagney b99fa2d295 2002-11-27 Andrew Cagney <ac131313@redhat.com>
* gdbarch.sh (CALL_DUMMY_LOCATION): Default to AT_ENTRY_POINT.
	(USE_GENERIC_DUMMY_FRAMES): Default to true.
	(PC_IN_CALL_DUMMY): Default to generic_pc_in_call_dummy.
	* gdbarch.c, gdbarch.h: Re-generate.
	* inferior.h (USE_GENERIC_DUMMY_FRAMES): Delete macro definition.
	(CALL_DUMMY_LOCATION): Delete macro definition.
	(PC_IN_CALL_DUMMY): Delete macro definitions.

	* arm-tdep.c (arm_gdbarch_init): Do not set pc_in_call_dummy,
	default is already generic_pc_in_call_dummy.
	* xstormy16-tdep.c (xstormy16_gdbarch_init): Ditto.
	* v850-tdep.c (v850_gdbarch_init): Ditto.
	* sh-tdep.c (sh_gdbarch_init): Ditto.
	* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
	* mips-tdep.c (mips_gdbarch_init): Ditto.
	* mcore-tdep.c (mcore_gdbarch_init): Ditto.
	* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
	* ia64-tdep.c (ia64_gdbarch_init): Ditto.
	* h8300-tdep.c (h8300_gdbarch_init): Ditto.
	* d10v-tdep.c (d10v_gdbarch_init): Ditto.
	* avr-tdep.c (avr_gdbarch_init): Ditto.

	* arm-tdep.c (arm_gdbarch_init): Do not set
	use_generic_dummy_frames, default is already 1.
	* xstormy16-tdep.c (xstormy16_gdbarch_init): Ditto.
	* x86-64-tdep.c (x86_64_gdbarch_init): Ditto.
	* v850-tdep.c (v850_gdbarch_init): Ditto.
	* sh-tdep.c (sh_gdbarch_init): Ditto.
	* s390-tdep.c (s390_gdbarch_init): Ditto.
	* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
	* mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
	* mips-tdep.c (mips_gdbarch_init): Ditto.
	* mcore-tdep.c (mcore_gdbarch_init): Ditto.
	* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
	* ia64-tdep.c (ia64_gdbarch_init): Ditto.
	* i386-tdep.c (i386_gdbarch_init): Ditto.
	* h8300-tdep.c (h8300_gdbarch_init): Ditto.
	* frv-tdep.c (frv_gdbarch_init): Ditto.
	* d10v-tdep.c (d10v_gdbarch_init): Ditto.
	* cris-tdep.c (cris_gdbarch_init): Ditto.
	* avr-tdep.c (avr_gdbarch_init): Ditto.

	* xstormy16-tdep.c (xstormy16_gdbarch_init): Do not set
	call_dummy_location, default is already AT_ENTRY_POINT.
	* x86-64-tdep.c (x86_64_gdbarch_init): Ditto.
	* v850-tdep.c (v850_gdbarch_init): Ditto.
	* sparc-tdep.c (sparc_gdbarch_init): Ditto.
	* sh-tdep.c (sh_gdbarch_init): Ditto.
	* s390-tdep.c (s390_gdbarch_init): Ditto.
	* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
	* mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
	* mips-tdep.c (mips_gdbarch_init): Ditto.
	* mcore-tdep.c (mcore_gdbarch_init): Ditto.
	* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
	* ia64-tdep.c (ia64_gdbarch_init): Ditto.
	* i386-tdep.c (i386_gdbarch_init): Ditto.
	* h8300-tdep.c (h8300_gdbarch_init): Ditto.
	* frv-tdep.c (frv_gdbarch_init): Ditto.
	* d10v-tdep.c (d10v_gdbarch_init): Ditto.
	* cris-tdep.c (cris_gdbarch_init): Ditto.
	* avr-tdep.c (avr_gdbarch_init): Ditto.
	* arm-tdep.c (arm_gdbarch_init): Ditto.
	* alpha-tdep.c (alpha_gdbarch_init): Ditto.
2002-11-28 18:15:59 +00:00
Andrew Cagney c193f6ac9c 2002-11-19 Andrew Cagney <ac131313@redhat.com>
* frame.h (FRAME_FP): Delete macro.
	(get_frame_base): New function declaration.
	* frame.c (get_frame_base): New function.
	(get_frame_id): Use ->frame.
	(frame_find_by_id): Rewrite to use get_frame_id.
	* blockframe.c: Use get_frame_base instead of FRAME_FP.
	* cris-tdep.c, d10v-tdep.c, findvar.c, h8500-tdep.c: Ditto.
	* hppa-tdep.c, i386-tdep.c, infcmd.c, infrun.c: Ditto.
	* m68hc11-tdep.c, m68k-tdep.c, mcore-tdep.c, mips-tdep.c: Ditto.
	* mn10200-tdep.c, mn10300-tdep.c, rs6000-tdep.c: Ditto.
	* sh-tdep.c, sparc-tdep.c, stack.c, tracepoint.c: Ditto.
	* v850-tdep.c, valops.c, z8k-tdep.c: Ditto.
2002-11-24 19:48:13 +00:00
Andrew Cagney 5a203e4405 2002-11-18 Andrew Cagney <ac131313@redhat.com>
* frame.h (enum frame_type): Define.
	(get_frame_type): Declare.
	(struct frame_info): Add field `type'.  Delete field
	signal_handler_caller.
	(deprecated_set_frame_signal_handler_caller): Declare.
	* frame.c (get_frame_type): New function.
	(deprecated_set_frame_type): New function.
	(create_new_frame): Set the frame's type.
	(get_prev_frame): Similar.
	* sparc-tdep.c: Use get_frame_type instead of signal_handler_caller.
	* s390-tdep.c: Ditto.
	* m68klinux-nat.c: Ditto.
	* ns32k-tdep.c: Ditto.
	* x86-64-linux-tdep.c: Ditto.
	* vax-tdep.c: Ditto.
	* rs6000-tdep.c: Ditto.
	* ppc-linux-tdep.c: Ditto.
	* i386-interix-tdep.c: Ditto.
	* mips-tdep.c: Ditto.
	* m68k-tdep.c: Ditto.
	* hppa-tdep.c: Ditto.
	* ia64-tdep.c: Ditto.
	* cris-tdep.c: Ditto.
	* arm-tdep.c: Ditto.
	* alpha-tdep.c: Ditto.
	* i386-tdep.c: Ditto.
	* stack.c: Ditto.
	* ada-lang.c: Ditto.
	* blockframe.c: Update.
	* i386-interix-tdep.c (i386_interix_back_one_frame): Use
	deprecated_set_frame_type instead of signal_handler_caller.
	* ppc-linux-tdep.c (ppc_linux_init_extra_frame_info): Ditto.
	* rs6000-tdep.c (rs6000_init_extra_frame_info): Ditto.
	* breakpoint.h: Delete FIXME suggesting get_frame_type.

Index: tui/ChangeLog
2002-11-18  Andrew Cagney  <ac131313@redhat.com>

	* tuiStack.c (tuiShowFrameInfo): Use get_frame_type instead of
	signal_handler_caller.
2002-11-18 22:19:33 +00:00
Andrew Cagney 18cde8d5ad 2002-11-15 Andrew Cagney <cagney@redhat.com>
* frame.c (generic_unwind_get_saved_register): Make static.
	* frame.h (generic_unwind_get_saved_register): Delete declaration.
	* avr-tdep.c (avr_gdbarch_init): Do not set get_saved_register,
	defaults to generic_unwind_get_saved_register.
	* mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
	* h8300-tdep.c (h8300_gdbarch_init): Ditto.
	* frv-tdep.c (frv_gdbarch_init): Ditto.
	* i386-tdep.c (i386_gdbarch_init): Ditto.
	* s390-tdep.c (s390_gdbarch_init): Ditto.
	* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
	* v850-tdep.c (v850_gdbarch_init): Ditto.
	* mcore-tdep.c (mcore_gdbarch_init): Ditto.
	* d10v-tdep.c (d10v_gdbarch_init): Ditto.
	* config/mn10200/tm-mn10200.h (GET_SAVED_REGISTER): Delete macro.
2002-11-16 01:00:07 +00:00
Andrew Cagney 524d7c188c 2002-11-14 Andrew Cagney <ac131313@redhat.com>
* regcache.h (deprecated_registers): Rename registers.
	* a68v-nat.c, alpha-nat.c, arch-utils.c, core-sol2.c: Update.
	* hp300ux-nat.c, hppab-nat.c, hppah-nat.c: Update.
	* hppam3-nat.c, hpux-thread.c, i386gnu-nat.c: Update.
	* ia64-aix-nat.c, ia64-linux-nat.c, ia64-tdep.c: Update.
	* irix4-nat.c, irix5-nat.c, lynx-nat.c, m68k-tdep.c: Update.
	* m68knbsd-nat.c, mips-linux-tdep.c, mipsm3-nat.c: Update.
	* mipsv4-nat.c, ns32knbsd-nat.c, ppc-bdm.c: Update.
	* ppc-sysv-tdep.c, ptx4-nat.c, regcache.c, remote-es.c: Update.
	* remote-sds.c, remote-vx68.c, remote-vxmips.c: Update.
	* remote-vxsparc.c, rs6000-tdep.c, sol-thread.c: Update.
	* sparc-nat.c, sparc-tdep.c, sun3-nat.c, symm-nat.c: Update.
	* v850ice.c: Update.
2002-11-14 20:37:29 +00:00
Andrew Cagney 73937e031a 2002-11-13 Andrew Cagney <cagney@redhat.com>
* regcache.h (deprecated_read_register_bytes): Rename
	read_register_bytes.
	(deprecated_write_register_bytes): Rename write_register_bytes.
	* alpha-tdep.c, arm-tdep.c, cris-tdep.c, d10v-tdep.c: Update.
	* dwarf2cfi.c, frv-tdep.c, hppa-tdep.c, ia64-tdep.c: Update.
	* m68k-tdep.c, mcore-tdep.c, mips-tdep.c, mn10300-tdep.c: Update.
	* ns32k-tdep.c, regcache.c, remote-sds.c, remote-vx.c: Update.
	* remote.c, rs6000-tdep.c, s390-tdep.c, sh-tdep.c: Update.
	* sparc-tdep.c, v850-tdep.c, vax-tdep.c, x86-64-tdep.c: Update.
	* xstormy16-tdep.c, z8k-tdep.c, config/nm-gnu.h: Update.
	* config/nm-m3.h, config/h8500/tm-h8500.h: Update.
	* config/i386/nm-ptx4.h, config/i386/nm-symmetry.h: Update.
	* config/m32r/tm-m32r.h, config/m68k/nm-sun3.h: Update.
	* config/m68k/tm-delta68.h, config/m68k/tm-linux.h: Update.
	* config/mn10200/tm-mn10200.h, config/pa/tm-hppa64.h: Update.
	* config/sparc/nm-nbsd.h, config/sparc/nm-sun4os4.h: Update.
	* config/sparc/nm-sun4sol2.h, config/sparc/tm-sparclet.h: Update.

2002-11-13  Andrew Cagney  <ac131313@redhat.com>

	* mi-main.c (mi_cmd_data_write_register_values): Use
	deprecated_write_register_bytes instead of write_register_bytes.
2002-11-14 00:25:05 +00:00
Andrew Cagney 4caf0990c1 2002-11-02 Andrew Cagney <cagney@redhat.com>
* regcache.h (deprecated_read_register_gen): Rename
	read_register_gen.
	(deprecated_write_register_gen): Rename write_register_gen.
	* i387-tdep.c: Update.
	* x86-64-linux-nat.c: Update
	* wince.c: Update.
	* thread-db.c: Update.
	* win32-nat.c: Update.
	* mips-tdep.c: Update.
	* d10v-tdep.c: Update.
	* cris-tdep.c: Update.
	* remote-sim.c: Update.
	* remote-rdi.c: Update.
	* remote-rdp.c: Update.
	* frame.c: Update.
	* target.c: Update.
	* blockframe.c: Update.
	* x86-64-tdep.c: Update.
	* xstormy16-tdep.c: Update.
	* sh-tdep.c: Update.
	* s390-tdep.c: Update.
	* rs6000-tdep.c: Update.
	* sparc-tdep.c: Update.
	* i386-tdep.c: Update.
	* dwarf2cfi.c: Update.
	* regcache.c: Update.
2002-11-02 14:59:10 +00:00
Andrew Cagney da3eff4919 2002-10-02 Andrew Cagney <ac131313@redhat.com>
* rs6000-tdep.c (rs6000_store_struct_return): Store struct_return
	value in register 3 adjusted by ppc_gp0_regnum.
2002-10-02 21:21:47 +00:00
Andrew Cagney 6f99cb26f2 2002-10-02 Andrew Cagney <ac131313@redhat.com>
* rs6000-tdep.c (skip_prologue): Bias alloca_reg by ppc_gp0_regnum.
2002-10-02 21:18:57 +00:00
Andrew Cagney 54c2a1e693 2002-10-01 Andrew Cagney <ac131313@redhat.com>
* rs6000-tdep.c (rs6000_gdbarch_init): For powerpc:7400, fix
	"vrsave"'s register number.
2002-10-01 14:57:55 +00:00
Andrew Cagney 9f3b7f0716 2002-09-26 Andrew Cagney <ac131313@redhat.com>
* rs6000-tdep.c (rs6000_frame_chain): Don't chain past the dummy
	frame.
2002-09-26 22:34:07 +00:00
Andrew Cagney 11269d7ebb 2002-09-26 Andrew Cagney <ac131313@redhat.com>
* rs6000-tdep.c (rs6000_extract_struct_value_address): Return 0.
	(rs6000_struct_return_address): Delete variable.
	(rs6000_store_struct_return): Update.
	(rs6000_gdbarch_init): Set extract_struct_value_address instead of
	deprecated_extract_struct_value_address.
	(rs6000_frame_align): New function.
	(rs6000_gdbarch_init): Set frame_align.
2002-09-26 22:29:09 +00:00
Andrew Cagney 8b69000d63 2002-09-25 Andrew Cagney <ac131313@redhat.com>
* rs6000-tdep.c (rs6000_frame_saved_pc): If the link register
	wasn't saved, and the next innermost frame is a dummy, return the
	dummy frame's link register.
2002-09-25 13:34:53 +00:00
Andrew Cagney 135c175f57 2002-09-17 Andrew Cagney <cagney@redhat.com>
* h8300-tdep.c (h8300_frame_chain):
	(h8300_frame_saved_pc):

	* blockframe.c (deprecated_read_register_dummy): Rename
	generic_read_register_dummy.
	* frame.c (frame_unwind_signed_register): New function.
	(frame_unwind_unsigned_register): New function.
	* frame.h (frame_unwind_signed_register): Declare.
	(frame_unwind_unsigned_register): Declare.
	(deprecated_read_register_dummy): Rename
	generic_read_register_dummy.

	* xstormy16-tdep.c (xstormy16_frame_saved_pc): Update.
	* rs6000-tdep.c (rs6000_frame_saved_pc): Update.
	* s390-tdep.c (s390_frame_saved_pc_nofix): Update.
	(s390_frame_chain): Update.
	* v850-tdep.c (v850_find_callers_reg): Update.
	(v850_frame_saved_pc): Update.
	* m32r-tdep.c (m32r_init_extra_frame_info): Update.
	(m32r_find_callers_reg): Update.
	(m32r_frame_saved_pc): Update.
	* sh-tdep.c (sh_find_callers_reg): Update.
	(sh64_get_saved_pr): Update.
	(sh_init_extra_frame_info): Update.
	(sh_init_extra_frame_info): Update.
	(sh64_init_extra_frame_info): Update.
	(sh64_init_extra_frame_info): Update.
	* mcore-tdep.c (mcore_find_callers_reg): Update.
	(mcore_frame_saved_pc): Update.
	(mcore_init_extra_frame_info): Update.
	* i386-tdep.c (i386_frame_saved_pc): Update.
	* ia64-tdep.c (ia64_frame_saved_pc): Update.
	(ia64_init_extra_frame_info): Update.
	(ia64_init_extra_frame_info): Update.
	* d10v-tdep.c (d10v_frame_saved_pc): Update.
	* cris-tdep.c (cris_init_extra_frame_info): Update.
	* avr-tdep.c (avr_frame_chain): Update.
	(avr_init_extra_frame_info): Update.
	(avr_frame_saved_pc): Update.
	* arm-tdep.c (arm_find_callers_reg): Update.
	(arm_init_extra_frame_info): Update.
	(arm_frame_saved_pc): Update.
2002-09-17 20:42:01 +00:00
Kevin Buettner 64b841757f * rs6000-tdep.c (altivec_register_p): Restore function inadvertently
deleted in 2002-08-20 commit.  This function is still used by
	ppc-linux-nat.c.
2002-08-26 23:20:53 +00:00
Andrew Cagney d0403e0050 2002-08-25 Andrew Cagney <ac131313@redhat.com>
* rs6000-tdep.c (rs6000_gdbarch_init): Set store_struct_return
	instead of deprecated_store_return_value.  Fix fallout from
	2002-08-23 Andrew Cagney <cagney@redhat.com>.
2002-08-25 15:18:41 +00:00
Andrew Cagney 46d79c043b 2002-08-24 Andrew Cagney <ac131313@redhat.com>
* rs6000-tdep.c (rs6000_gdbarch_init): Use deprecated version of
	store_return_value.
	(e500_extract_return_value): Change type of valbuf pointer to
	void.
2002-08-25 13:15:50 +00:00
Andrew Cagney ebba838619 Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.3144
diff -u -r1.3144 ChangeLog
--- ChangeLog	23 Aug 2002 23:05:38 -0000	1.3144
+++ ChangeLog	23 Aug 2002 23:14:45 -0000
@@ -1,3 +1,53 @@
2002-08-23  Andrew Cagney  <cagney@redhat.com>

	* gdbarch.sh (STORE_RETURN_VALUE): Add regcache parameter.
	(DEPRECATED_STORE_RETURN_VALUE): New method.
	(EXTRACT_RETURN_VALUE): Make buffer parameter a void pointer.
	* gdbarch.h, gdbarch.c: Re-generate.

	* values.c (set_return_value): Pass current_regcache to
	STORE_RETURN_VALUE.
	* arch-utils.h (legacy_store_return_value): Declare.
	* arch-utils.c (legacy_store_return_value): New function.
	(legacy_extract_return_value): Update parameters.

	* config/pa/tm-hppa.h (DEPRECATED_STORE_RETURN_VALUE): Rename
	STORE_RETURN_VALUE.
	* config/pa/tm-hppa64.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
	* config/sparc/tm-sparc.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
	* config/z8k/tm-z8k.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
	* config/sparc/tm-sparclet.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
	* config/mn10200/tm-mn10200.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
	* config/m68k/tm-linux.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
	* config/m68k/tm-delta68.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
	* config/m32r/tm-m32r.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
	* config/h8500/tm-h8500.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
	* config/h8300/tm-h8300.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.

	* m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
	* i386-tdep.c (i386_extract_return_value): Update.
	* arch-utils.c (legacy_extract_return_value): Update.
	* frv-tdep.c (frv_gdbarch_init): Update.
	* cris-tdep.c (cris_gdbarch_init): Update.
	* d10v-tdep.c (d10v_gdbarch_init): Update.
	* rs6000-tdep.c (rs6000_gdbarch_init): Update.
	* m68k-tdep.c (m68k_gdbarch_init): Update.
	* mcore-tdep.c (mcore_gdbarch_init): Update.
	* mn10300-tdep.c (mn10300_gdbarch_init): Update.
	* s390-tdep.c (s390_gdbarch_init): Update.
	* sparc-tdep.c (sparc_gdbarch_init): Update.
	* sh-tdep.c (sh_gdbarch_init): Update.
	* x86-64-tdep.c (x86_64_gdbarch_init): Update.
	* v850-tdep.c (v850_gdbarch_init): Update.
	* avr-tdep.c (avr_gdbarch_init): Update.
	* ia64-tdep.c (ia64_gdbarch_init): Update.
	* ns32k-tdep.c (ns32k_gdbarch_init): Update.
	* vax-tdep.c (vax_gdbarch_init): Update.
	* alpha-tdep.c (alpha_gdbarch_init): Update.
	* arm-tdep.c (arm_gdbarch_init): Update.
	* mips-tdep.c (mips_gdbarch_init): Update.
	* i386-tdep.c (i386_gdbarch_init): Update.

Index: doc/ChangeLog
2002-08-21  Andrew Cagney  <cagney@redhat.com>

	* gdbint.texinfo (Target Architecture Definition): Update
	STORE_RETURN_VALUE, mention regcache.
2002-08-24 00:21:37 +00:00
Elena Zannoni 96ff0de4ab 2002-08-22 Elena Zannoni <ezannoni@redhat.com>
* rs6000-tdep.c (struct rs6000_framedata): Add saved_ev and
	ev_offset fields.
	(skip_prologue): Add support for BookE/e500 instructions.
	(e500_extract_return_value): New function.
	(frame_get_saved_regs): Add support for saving ev registers and
	pseudo gpr's.
	(e500_store_return_value): New function.
	(rs6000_gdbarch_init): Move up default intializations of
	deprecated_extract_return_value and store_return_value.  Overwrite
	init of store_return_value with e500 specific version.
	Set extract_return_value for e500.
2002-08-22 22:26:41 +00:00
Elena Zannoni 5bf1c6772c 2002-08-21 Elena Zannoni <ezannoni@redhat.com>
* rs6000-tdep.c (rs6000_gdbarch_init): Figure out whether we have
        an e500 executable.
2002-08-21 22:56:02 +00:00
Elena Zannoni c8001721f3 2002-08-20 Elena Zannoni <ezannoni@redhat.com>
* ppc-tdep.h (struct gdbarch_tdep): Add ev registers.

	* rs6000-tdep.c (rs6000_register_virtual_type): Return 64 bit
	vector type for ev registers.
	(e500_pseudo_register_read): New function.
	(e500_pseudo_register_write): New function.
	(e500_dwarf2_reg_to_regnum): New function.
	(PPC_UISA_NOFP_SPRS): New macro.
	(PPC_EV_REGS): New macro.
	(PPC_GPRS_PSEUDO_REGS): New macro.
	(registers_e500): New register set for e500.
	(variants): Add e500 variant.
	(rs6000_gdbarch_init): Move setting of pc, sp, fp regnums to
	before setting architectural dependent variations.  Initialize ev
	registers numbers.  Add case for e500 architecture.  Set the
	number of pseudo registers.
2002-08-20 22:24:29 +00:00
Elena Zannoni 64366f1caf 2002-08-20 Elena Zannoni <ezannoni@redhat.com>
* rs6000-tdep.c: Clean up comments.
2002-08-20 22:11:48 +00:00
Elena Zannoni 4a6daafa0b 2002-08-20 Elena Zannoni <ezannoni@redhat.com>
* rs6000-tdep.c (altivec_register_p): Delete.
	(rs6000_do_altivec_registers): Delete.
	(rs6000_altivec_registers_info): Delete.
	(rs6000_do_registers_info): Delete.
	(_initialize_rs6000_tdep): Remove command 'info powerpc altivec'.
	(rs6000_gdbarch_init): Remove setting of do_registers_info.
2002-08-20 17:33:51 +00:00
Elena Zannoni 489461e2aa 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
* rs6000-tdep.c (struct reg): Add field to indicate a pseudo
	register.
	(P): New macro to define a register as a pseudo register.
	(R, R4, R8, R16, FR32, R64, R0): Updated.
	(struct variant): Add new fields for number of pseudo registers
	and number of total registers.
	(tot_num_registers): New macro replacing....
	(num_registers): ...deleted macro.
	(num_registers): New function.
	(num_pseudo_registers): New function.
	(variants): Update all variants to intialize new fields correctly.
	Postpone initialization of number of pseudo regs and real regs.
	(init_variants): New function.
	(rs6000_gdbarch_init): Initialize variants.  Update calculation of
	registers offsets.
2002-08-19 23:21:16 +00:00
Elena Zannoni 21283bebca 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
* rs6000-tdep.c (TDEP): Delete macro.
        (branch_dest): Replace use of TDEP macro with its body.
        (rs6000_pop_frame): Ditto.
        (rs6000_push_arguments): Ditto.
        (rs6000_skip_trampoline_code): Ditto.
        (rs6000_frame_saved_pc): Ditto.
        (rs6000_frame_chain): Ditto.
        (rs6000_register_name): Ditto.
        (rs6000_register_byte): Ditto.
        (rs6000_register_raw_size): Ditto.
        (rs6000_register_virtual_type): Ditto.
        (rs6000_register_convertible): Ditto.
        (rs6000_convert_from_func_ptr_addr): Ditto.
2002-08-19 17:57:59 +00:00
Elena Zannoni 9364a0ef8a 2002-07-15 Elena Zannoni <ezannoni@redhat.com>
* rs6000-tdep.c (rs6000_gdbarch_init): Remove variable print_insn
        and its setting.  Set gdbarch instruction printing functions
        directly.  For non-rs6000 case use new function
        gdb_print_insn_powerpc.
        (gdb_print_insn_powerpc): New function.
2002-07-15 15:09:55 +00:00
Andrew Cagney dd4866343a * rs6000-tdep.c (rs6000_gdbarch_init): Use
generic_unwind_get_saved_register.
2002-06-28 16:15:07 +00:00
Andrew Cagney fa88f6772d * gdbarch.sh (REGISTER_NAME): Change return type a constant string
pointer.
* gdbarch.h, gdbarch.c: Regenerate.
* config/mips/tm-mips.h (mips_register_name): Update.
* i386-tdep.h (i386_register_name): Update.
* mips-tdep.c (mips_register_name): Update
* alpha-tdep.c (alpha_register_name): Update.
* arch-utils.c (legacy_register_name): Update.
* arch-utils.h (legacy_register_name): Update.
* avr-tdep.c (avr_register_name): Update.
* ia64-tdep.c (ia64_register_name): Update.
* i386-tdep.c (i386_register_name): Update.
* sparc-tdep.c (sparc32_register_name): Update.
(sparc64_register_name): Update.
(sparclite_register_name): Update.
(sparclet_register_name):
* sh-tdep.c (sh_generic_register_name): Update.
(sh_sh_register_name): Update.
(sh_sh3_register_name): Update.
(sh_sh3e_register_name): Update.
(sh_sh_dsp_register_name): Update.
(sh_sh3_dsp_register_name): Update.
(sh_sh4_register_name): Update.
(sh_sh64_register_name): Update.
* s390-tdep.c (s390_register_name): Update.
* rs6000-tdep.c (rs6000_register_name): Update.
* ns32k-tdep.c (ns32k_register_name_32082): Update.
(ns32k_register_name_32382): Update.
* d10v-tdep.c (d10v_ts2_register_name): Update.
(d10v_ts3_register_name): Update.
* xstormy16-tdep.c (xstormy16_register_name): Update.
* vax-tdep.c (vax_register_name): Update.
* v850-tdep.c (v850_register_name): Update.
* m68hc11-tdep.c (m68hc11_register_name): Update.
* mn10300-tdep.c (mn10300_generic_register_name): Update.
(am33_register_name): Update.
2002-06-17 23:32:36 +00:00
Andrew Cagney 26e9b323da + * gdbarch.sh (DEPRECATED_EXTRACT_RETURN_VALUE): Rename
+	EXTRACT_RETURN_VALUE.
+	(DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS): Rename
+	EXTRACT_STRUCT_VALUE_ADDRESS.
+	* gdbarch.h, gdbarch.c: Regenerate.
+
+	* values.c (value_being_returned): Handle
+	DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS.
+	(EXTRACT_RETURN_VALUE): Define as DEPRECATED_EXTRACT_RETURN_VALUE.
+
+	* arm-linux-tdep.c (arm_linux_init_abi): Update.
+	* arm-tdep.c (arm_gdbarch_init): Update.
+	* avr-tdep.c (avr_gdbarch_init): Update.
+	* cris-tdep.c (cris_gdbarch_init): Update.
+	* d10v-tdep.c (d10v_gdbarch_init): Update.
+	* ia64-tdep.c (ia64_gdbarch_init): Update.
+	* m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+	* rs6000-tdep.c (rs6000_gdbarch_init): Update.
+	* s390-tdep.c (s390_gdbarch_init): Update.
+	* sh-tdep.c (sh_gdbarch_init): Update.
+	* s390-tdep.c (s390_gdbarch_init): Update.
+	* sparc-tdep.c (sparc_gdbarch_init): Update.
+	* ns32k-tdep.c (ns32k_gdbarch_init): Update.
+	* v850-tdep.c (v850_gdbarch_init): Update.
+	* vax-tdep.c (vax_gdbarch_init): Update.
+	* x86-64-tdep.c (x86_64_gdbarch_init): Update.
+	* xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+
+	* config/arc/tm-arc.h: Update.
+	* config/d30v/tm-d30v.h: Update.
+	* config/fr30/tm-fr30.h: Update.
+	* config/h8300/tm-h8300.h: Update.
* config/h8500/tm-h8500.h: Update.
* config/i386/tm-i386.h: Update.
* config/i386/tm-ptx.h: Update.
* config/i386/tm-symmetry.h: Update.
* config/i960/tm-i960.h: Update.
* config/m32r/tm-m32r.h: Update.
* config/m68k/tm-delta68.h: Update.
* config/m68k/tm-linux.h: Update.
* config/m68k/tm-m68k.h: Update.
* config/m88k/tm-m88k.h: Update.
* config/mcore/tm-mcore.h: Update.
* config/mips/tm-mips.h: Update.
* config/mn10200/tm-mn10200.h: Update.
* config/pa/tm-hppa.h: Update.
* config/pa/tm-hppa64.h: Update.
* config/sparc/tm-sp64.h: Update.
* config/sparc/tm-sparc.h: Update.
* config/sparc/tm-sparclet.h: Update.
* config/z8k/tm-z8k.h: Update.
2002-06-14 22:55:51 +00:00
Jason Thorpe 7b112f9c0c * Makefile.in (ppc_tdep_h): Define.
(ppc-linux-nat.o)
(ppc-linux-tdep.o)
(rs6000-tdep.o): Use $(ppc_tdep_h).
(ppc-sysv-tdep.o)
(ppcnbsd-nat.o)
(ppcnbsd-tdep.o): New dependency lists.
* ppc-tdep.h: Use generic OS ABI framework.
* ppc-linux-tdep.c (_initialize_ppc_linux_tdep,
ppc_linux_init_abi): New functions.
(ppc_sysv_abi_broken_use_struct_convention)
(ppc_sysv_abi_use_struct_convention)
(ppc_sysv_abi_push_arguments): Move to...
* ppc-sysv-tdep.c: ...here.
* ppcnbsd-nat.c: Don't include gdbcore.h and regcache.h.
* rs6000-tdep.c (process_note_abi_tag_sections)
(get_elfosabi): Remove.
(rs6000_gdbarch_init): Use generic OS ABI framework.
(rs6000_dump_tdep): New function.
(_initialize_rs6000_tdep): Use gdbarch_register.
* config/powerpc/linux.mt (TDEPFILES): Add ppc-sysv-tdep.o.
* config/powerpc/nbsd.mh (NATDEPFILES): Remove solib-legacy.o.
* config/powerpc/aix.mt (TDEPFILES): Use ppc-sysv-tdep.o instead
of ppc-linux-tdep.o.
* config/powerpc/nbsd.mt (TDEPFILES): Likewise.
* config/powerpc/ppc-eabi.mt (TDEPFILES): Likewise.
* config/powerpc/ppc-sim.mt (TDEPFILES): Likewise.
* config/powerpc/ppcle-eabi.mt (TDEPFILES): Likewise.
* config/powerpc/ppcle-sim.mt (TDEPFILES): Likewise.
* config/powerpc/vxworks.mt (TDEPFILES): Likewise.
2002-05-30 01:21:53 +00:00
Elena Zannoni 70c6b0d18f 2002-05-20 Elena Zannoni <ezannoni@redhat.com>
* rs6000-tdep.c (rs6000_do_registers_info): Simplify code for
	printing vector registers.
2002-05-20 17:45:43 +00:00
Andrew Cagney b2e75d7899 * arch-utils.h (generic_register_size): Declare.
(generic_register_raw_size, generic_register_virtual_size): Delete
declarations.
* arch-utils.c (generic_register_raw_size): Delete.
(generic_register_size): New function.
(generic_register_virtual_size): Delete.

* gdbarch.sh (REGISTER_RAW_SIZE, REGISTER_VIRTUAL_SIZE): Make
default generic_register_size.
* gdbarch.h, gdbarch.c: Re-generate.

* d10v-tdep.c (d10v_gdbarch_init): Use generic_register_size for
register_virtual_size.
* x86-64-tdep.c (x86_64_gdbarch_init): Ditto.
* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.

* gdbint.texinfo (Target Architecture Definition): Mention
defaults for REGISTER_VIRTUAL_SIZE and REGISTER_RAW_SIZE.
(Target Architecture Definition): Mention same.  Add references to
web pages.
2002-05-12 02:16:05 +00:00
Kevin Buettner 6f5987a63d * rs6000-tdep.c: Added comment describing how fpscr register
numbers were chosen.
2002-04-30 23:36:11 +00:00
Kevin Buettner 11ed25acd7 Don't use BFD-private data to determine that an object file is 64-bit xcoff. 2002-04-30 00:26:44 +00:00
Elena Zannoni ace1378a15 2002-04-29 Elena Zannoni <ezannoni@redhat.com>
* rs6000-tdep.c (rs6000_extract_return_value,
	rs6000_store_return_value): Handle returning vectors.
	(rs6000_gdbarch_init): Use
	ppc_sysv_abi_broken_use_struct_convention for native sysv cases.
	* ppc-linux-tdep.c (ppc_sysv_abi_broken_use_struct_convention):
	New function.
	(ppc_sysv_abi_use_struct_convention): Deal with functions returning
	vectors.
	(ppc_sysv_abi_push_arguments): Handle vector parameters.
	* ppc-tdep.h (ppc_sysv_abi_broken_use_struct_convention): Export.
2002-04-29 15:10:06 +00:00
Andrew Cagney 15813d3f2c * rs6000-tdep.c (rs6000_gdbarch_init): Only set
convert_from_func_ptr-addr when AIX / PowerOpen.
2002-04-26 04:31:47 +00:00
Andrew Cagney bf75c8c166 * sparc-tdep.c (sparc_get_saved_register): Use get_prev_frame
instead of ->prev.
* z8k-tdep.c (z8k_frame_chain): Do not use ->prev.
* s390-tdep.c (s390_frame_chain): Do not use ->prev.
* rs6000-tdep.c (frame_get_saved_regs): Use rs6000_frame_chain()
instead of ->prev.
2002-04-20 03:09:28 +00:00
Andrew Cagney f4f9705a2d * gdbarch.sh (BREAKPOINT_FROM_PC): Return a const buffer.
* gdbarch.h, gdbarch.c: Regenerate.

* defs.h (breakpoint_from_pc_fn): Delete type definition.
* target.h (memory_breakpoint_from_pc): Update declaration.
* config/mcore/tm-mcore.h (mcore_breakpoint_from_p): Ditto.

* arch-utils.c (legacy_breakpoint_from_pc): Update return type.
* mcore-tdep.c (mcore_breakpoint_from_pc): Ditto.
* mem-break.c (memory_breakpoint_from_pc): Ditto.
* rs6000-tdep.c (rs6000_breakpoint_from_pc): Ditto.
* s390-tdep.c (s390_breakpoint_from_pc): Ditto
* xstormy16-tdep.c (xstormy16_breakpoint_from_pc): Ditto.
* mn10300-tdep.c (mn10300_breakpoint_from_pc): Ditto.
* mips-tdep.c (mips_breakpoint_from_pc): Ditto.
* m68hc11-tdep.c (m68hc11_breakpoint_from_pc): Ditto.
* ia64-tdep.c (ia64_breakpoint_from_pc): Ditto.
* d10v-tdep.c (d10v_breakpoint_from_pc): Ditto.
* arch-utils.c (legacy_breakpoint_from_pc): Ditto..

* mem-break.c (default_memory_insert_breakpoint): Make `bp' a
const pointer.
* monitor.c (monitor_insert_breakpoint): Ditto.
* rs6000-tdep.c (rs6000_software_single_step): Ditto for `breakp'.

* config/mcore/tm-mcore.h: Update copyright.
* mem-break.c: Ditto.
* xstormy16-tdep.c: Ditto.
2002-04-18 18:09:09 +00:00
Elena Zannoni ebeac11a97 2002-04-17 Elena Zannoni <ezannoni@redhat.com>
* rs6000-tdep.c (COMMON_UISA_NOFP_REGS): New macro.
	(registers_powerpc_nofp): New register set for processors
	without floating point unit.
2002-04-18 15:10:15 +00:00
Andrew Cagney 953836b25a * rs6000-tdep.c (frame_initial_stack_address): Use
frame_register_read to read the alloca_reg.
2002-04-17 23:28:38 +00:00
Kevin Buettner a88376a3e1 Delete DEFAULT_LR_SAVE. 2002-04-12 19:48:37 +00:00
Andrew Cagney cda5a58a3e * defs.h (read_relative_register_raw_bytes): Delete declaration.
* frame.c (frame_register_read): New function.  Return non-zero on
success.
(read_relative_register_raw_bytes_for_frame): Delete.
(read_relative_register_raw_bytes): Delete.
* frame.h (frame_register_read): Declare.
* d30v-tdep.c: Update Copyright.  Use frame_register_read.
* sh-tdep.c: Ditto.
* infcmd.c (do_registers_info): Ditto.
* hppa-tdep.c: Ditto.
* rs6000-tdep.c: Ditto.
* h8500-tdep.c: Ditto.
* mips-tdep.c: Ditto.
* h8300-tdep.c: Ditto.
* z8k-tdep.c: Ditto.
2002-04-12 18:18:59 +00:00
Kevin Buettner 2ea5f656d7 From Jimi X <jimix@watson.ibm.com>:
* rs6000-tdep.c (rs6000_gdbarch_init): Use rs6000_* methods for
	64-bit SysV ABI.
2002-04-12 17:12:24 +00:00
Kevin Buettner 27b1578512 From Jimi X <jimix@watson.ibm.com>:
* rs6000-tdep.c (rs6000_gdbarch_init): Compute ``wordsize'' from
	bfd info.
2002-04-12 07:37:18 +00:00
Kevin Buettner 5d57ee30b3 From Jimi X <jimix@watson.ibm.com>:
* rs6000-tdep.c (powerpc64, 630, rs64ii, rs64iii): Define
	register sets for these processor variants.
2002-04-12 07:20:32 +00:00
Kevin Buettner e3f36dbd47 Add support for the fpscr register for Power / PowerPC targets. 2002-04-11 19:08:56 +00:00
Kevin Buettner 56a6dfb9de * rs6000-tdep.c (rs6000_gdbarch_init): Don't set tm_print_insn;
it's no longer required.
2002-04-09 02:26:10 +00:00
Kevin Buettner 7c40d5414c * rs6000-tdep.c (rs6000_software_single_step): Use
rs6000_breakpoint_from_pc() to fetch breakpoint instruction
	and size.  Use target_insert_breakpoint() and
	target_remove_breakpoint() to insert and remove breakpoints
	instead of explicit memory reads and writes.
2002-04-09 01:41:46 +00:00
Kevin Buettner cc9836a8aa * config/powerpc/tm-ppc-eabi.h (ELF_OBJECT_FORMAT): Delete.
* rs6000-tdep.c (rs6000_push_arguments): Eliminate
	ELF_OBJECT_FORMAT ifdef.
2002-04-09 00:53:28 +00:00
Kevin Buettner 7495d1dc3f From Jimi X <jimix@watson.ibm.com>:
* rs6000-tdep.c (rs6000_gdbarch_init): Use set_gdbarch_print_insn().
2002-04-09 00:10:09 +00:00
Kevin Buettner 4288e83618 From Jimi X <jimix@watson.ibm.com>:
* rs6000-tdep.c (rs6000_fix_call_dummy): Delete unused macro
	definitions for TOC_ADDR_OFFSET and TARGET_ADDR_OFFSET.
2002-04-08 22:56:46 +00:00
Andrew Cagney 8227c0ffb1 * h8500-tdep.c (h8500_write_fp): Delete function.
* dwarf2cfi.c (cfi_write_fp): Document as not used.
* mips-tdep.c (mips_gdbarch_init): Do not set write_fp.
* ia64-tdep.c (ia64_gdbarch_init): Do not set write_fp.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Do not set write_fp.
* rs6000-tdep.c (rs6000_gdbarch_init): Do not set write_fp.
* s390-tdep.c (s390_gdbarch_init): Do not set write_fp.
(s390_write_fp):
* sh-tdep.c (sh_gdbarch_init): Do not set write_fp.
* x86-64-tdep.c (i386_gdbarch_init): Do not set write_fp.
* d10v-tdep.c (d10v_gdbarch_init): Do not set write_fp.
(d10v_write_fp): Delete function.
* inferior.h (write_fp, generic_target_write_fp): Delete
declarations.
* regcache.c (generic_target_write_fp): Delete function.
(write_fp): Delete function.
* gdbarch.sh (TARGET_WRITE_FP): Delete.
* gdbarch.h, gdbarch.c: Regenerate.
* config/v850/tm-v850.h (TARGET_WRITE_FP): Delete macro.
* config/sparc/tm-sp64.h (TARGET_WRITE_FP): Delete macro.
(sparc64_write_fp): Delete declaration.
* config/h8500/tm-h8500.h (TARGET_WRITE_FP): Delete macro.
(h8500_write_fp): Delete declaration.
2002-04-06 00:02:52 +00:00
Kevin Buettner c69255e19c * rs6000-tdep.c (skip_prologue): Eliminate unused/unreachable
clause.
2002-04-05 22:36:32 +00:00
Daniel Jacobowitz 2fccf04a44 2002-04-01 Daniel Jacobowitz <drow@mvista.com>
* rs6000-tdep.c: Change #include of "bfd/libcoff.h"
        and "bfd/libbfd.h" to "libcoff.h" and "libbfd.h".
2002-04-01 05:58:45 +00:00
Elena Zannoni 6be8bc0c92 2002-03-27 Elena Zannoni <ezannoni@redhat.com>
* rs6000-tdep.c (struct rs6000_framedata): Add fields for AltiVec
	vector registers handling.
	(skip_prologue): Handle new AltiVec instructions.  Fill in new
	fields of frame data.
	(frame_get_saved_regs): Fill in information for AltiVec registers.
2002-03-28 00:48:41 +00:00
Elena Zannoni 8e0662df17 2002-03-22 Elena Zannoni <ezannoni@redhat.com>
* ppc-linux-tdep.c (ppc_sysv_abi_use_struct_convention): New
        function.
	* ppc-tdep.h (ppc_sysv_abi_use_struct_convention): Export.
        * rs6000-tdep.c (rs6000_gdbarch_init): Use different
        structure returning convention for SYSV ABI case, but not
        for GNU/Linux, FreeBSD, or NetBSD.
2002-03-22 21:58:16 +00:00
Elena Zannoni 2a873819ae 2002-03-21 Elena Zannoni <ezannoni@redhat.com>
* rs6000-tdep.c (rs6000_gdbarch_init): Use correct max size value
	for gdbarch_max_register_raw_size and max_register_virtual_size.
	Adjust copyright year.
2002-03-22 00:19:02 +00:00
Elena Zannoni dd47e6fdd9 2002-02-14 Elena Zannoni <ezannoni@redhat.com>
* rs6000-tdep.c (rs6000_gdbarch_init): Don't call
	find_variant_by_name, because it confuses the multiarch
	framework. Return NULL if there isn't an architecture with the
	user supplied name, instead of forcing a different one without
	recording the change with the multiarch machinery.
	(find_variant_by_name): Delete.
2002-02-14 15:13:53 +00:00
Andrew Cagney 75bc7ddf1b * config/vax/tm-vax.h (INVALID_FLOAT): Move macro from here...
* vax-tdep.c (INVALID_FLOAT): To here.  Document why it is broken.

* rs6000-tdep.c (rs6000_do_registers_info): Delete code wrapped in
#ifdef INVALID_FLOAT.
* infcmd.c (do_registers_info): Ditto.
* values.c (unpack_double): Ditto.  Add comment.

* config/ns32k/tm-umax.h (INVALID_FLOAT): Delete macro that was
already commented out.
2002-01-29 03:08:28 +00:00
Elena Zannoni 08cf96df0e 2002-01-15 Elena Zannoni <ezannoni@redhat.com>
[Based on work by Jim Blandy]

	* gdbtypes.h (builtin_type_v16qi, builtin_type_v8hi): Export.
	(builtin_type_vec128): Export.

	* gdbtypes.c (builtin_type_v16qi, builtin_type_v8hi): New SIMD
	types.
	(builtin_type_vec128): New builtin type for 128 bit vector
	registers.
	(build_gdbtypes): Initialize builtin_type_v16qi and
	builtin_type_v8hi. Create the vec128 register builtin type
	structure.
	(build_builtin_type_vec128): New function.
 	(_initialize_gdbtypes): Register builtin_type_v16qi and
	builtin_type_v8hi with gdbarch. Same for builtin_type_vec128.

	* rs6000-tdep.c (rs6000_register_virtual_type): Change type of
	AltiVec register to new builtin type.
2002-01-15 19:38:19 +00:00
Andrew Cagney a9011d31b6 last? remaining BIG_ENDIAN switch 2002-01-06 04:50:56 +00:00
Andrew Cagney d7449b42d3 s/BIG_ENDIAN/BFD_ENDIAN_BIG/ 2002-01-05 04:30:46 +00:00
Elena Zannoni 1fcc0bb8b2 2001-12-29 Elena Zannoni <ezannoni@redhat.com>
* Makefile.in (rs6000-tdep.o): Add dependency on parser-defs.h.

	* rs6000-tdep.c: Include parser-defs.h.
	(rs6000_register_virtual_type): Rewrite, including handling of
	AltiVec regs type.
	(altivec_register_p): New function.
	(rs6000_do_altivec_registers): New function.
	(rs6000_altivec_registers_info): New function.
	(rs6000_do_registers_info): New function.
	(R16): Define.
	(PPC_ALTIVEC_REGS): Define.
	(registers_powerpc): Add AltiVec registers.
	(registers_7400): Define.
	(variants): Add 7400 machine.
	(rs6000_gdbarch_init): Set the numbers of AltiVec registers.
	Initialize gdbarch_do)_registers_info.
	(rs6000_info_power_command): New function.
	(info_power_cmdlist): New static variable.
	(_initialize_rs6000_tdep): Add new 'info powerpc altivec' command.

	* ppc-tdep.h (struct gdbarch_tdep): Add altivec regnum fields.
	(altivec_register_p): Export.
2001-12-30 00:14:50 +00:00
Jim Blandy 4e40929968 * gdbarch.sh (TARGET_CHAR_SIGNED): New macro.
* gdbarch.c, gdbarch.h: Regenerated.
* gdbtypes.c (build_gdbtypes): If TARGET_CHAR_SIGNED is zero,
set the TYPE_FLAG_UNSIGNED bit on the type.
* s390-tdep.c (s390_gdbarch_init): On the S/390, characters
are unsigned by default.
* rs6000-tdep.c (rs6000_gdbarch_init): Same for PowerPC and
RS6000.
2001-12-20 03:26:08 +00:00
Michael Snyder 0e7c5946f3 2001-12-11 Michael Snyder <msnyder@redhat.com>
* d10v-tdep.c (d10v_register_virtual_size): Delete.
	(d10v_gdbarch_init): Use generic_register_virtual_size.
	* rs6000-tdep.c (rs6000_register_virtual_size): Delete.
	(rs6000_gdbarch_init): Use generic_register_virtual_size.
	* x86-64-tdep.c (x86_64_register_virtual_size): Delete.
	(i386_gdbarch_init): Use generic_register_virtual_size.
2001-12-11 22:16:48 +00:00
Elena Zannoni 2188cbdd51 2001-12-09 Elena Zannoni <ezannoni@redhat.com>
* config/rs6000/tm-rs6000.h (STAB_REG_TO_REGNUM): Remove
	definition, it is now multiarched.
	* ppc-tdep.h (struct gdbarch_tdep): Move from rs6000-tdep.c.  Add
	fields for special register numbers.
	* rs6000-tdep.c (rs6000_gdbarch_init): Initialize new tdep special
	regnum fields.
	(rs6000_saved_pc_after_call): Use gdbarch_tdep registers fields
	instead of hardcoded macros.
	(branch_dest, rs6000_pop_frame, rs6000_fix_call_dummy,
	ppc_push_return_address, rs6000_frame_saved_pc,
	frame_get_saved_regs, rs6000_frame_chain,
	rs6000_store_return_value): Ditto.
	(rs6000_stab_reg_to_regnum): New function.
	* ppcnbsd-nat.c (fetch_inferior_registers,
	store_inferior_registers, fetch_core_registers): Ditto.
	* ppc-linux-tdep.c (ppc_linux_in_sigtramp,
	ppc_linux_frame_init_saved_regs): Ditto.
	* ppc-linux-nat.c (ppc_register_u_addr, supply_gregset,
	fill_gregset): Ditto.
	* ppc-bdm.c (bdm_ppc_fetch_registers, bdm_ppc_store_registers):
	Ditto.
2001-12-09 21:39:53 +00:00
Kevin Buettner 6ded7999cd Add cross platform SVR4 shared library support for PowerPC. 2001-12-01 00:25:08 +00:00
Andrew Cagney fd0407d670 Add explicit #include of "value.h". 2001-10-21 17:19:38 +00:00
Andrew Cagney e712c1cf79 * rs6000-tdep.c (rs6000_gdbarch_init): Don't use the previous
architecture to infer the wordsize.  Previous architecture may not
be a PowerPC.
2001-09-29 21:32:01 +00:00
Andrew Cagney d16aafd8c8 * defs.h (HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)
(HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)
(HOST_LONG_DOUBLE_FORMAT, DOUBLEST)
(floatformat_to_doublest, floatformat_from_doublest)
(floatformat_is_negative, floatformat_is_nan)
(floatformat_mantissa, store_floating)
(extract_floating): Move declaration from here.
* doublest.h: To here.  New file.
* utils.c (get_field, floatformat_to_doublest, put_field)
(ldfrexp, floatformat_from_doublest, floatformat_is_negative)
(floatformat_is_nan, floatformat_mantissa)
(FLOATFORMAT_CHAR_BIT): Move from here.
* doublest.c: To here.  New file.
* findvar.c (store_floating, extract_floating): Move from here.
* doublest.c: To here.
* Makefile.in (SFILES): Add doublest.c.
(COMMON_OBS): Add doublest.o.
(doublest.o): Specify dependencies.
(doublest_h): Define.

* config/m88k/tm-m88k.h: Include "doublest.h".
* config/i960/tm-i960.h: Ditto.
* config/i386/tm-symmetry.h: Ditto.
* rs6000-tdep.c, valarith.c: Ditto.
* valprint.c, stabsread.c, sh-tdep.c: Ditto.
* ia64-tdep.c, i387-tdep.c, i386-tdep.c: Ditto.
* values.c, arm-tdep.c, arm-linux-tdep.c: Ditto.
* alpha-tdep.c, ax.h, expression.h: Ditto.
* sh-tdep.c, parse.c, top.c, value.h: Ditto.

* Makefile.in (arm-tdep.o): Add $(doublest_h).
(i386-tdep.o, i387-tdep.o, ia64-tdep.o): Ditto.
(rs6000-tdep.o, stabsread.o, valarith.o): Ditto.
(values.o, valprint.o, arm-linux-tdep.o): Ditto.
(alpha-tdep.o, ax_h, parse.o, top.o, value_h): Ditto.
(parser_defs_h): Ditto.
(expression_h): Add $(doublest_h) and $(symtab_h).
2001-08-01 18:39:27 +00:00
Andrew Cagney ea7c478fe2 s/value_ptr/struct value */ 2001-07-15 20:10:02 +00:00
Andrew Cagney 51cc5b0737 * symtab.c (main_name): New function.
(set_main_name): New function.
* symtab.h: Declare.
* TODO: Update

From 2000-03-05 Anthony Green <green@redhat.com>:
* dbxread.c (process_one_symbol): Handle the N_MAIN stab by
setting main_name.
* blockframe.c (inside_main_func): Use main_name instead of
"main".
* symtab.c (find_main_psymtab): Ditto.
* source.c (select_source_symtab): Ditto.
* nlmread.c (nlm_symfile_read): Ditto.
* rs6000-tdep.c (skip_prologue): Ditto.
2001-07-07 17:19:50 +00:00
Andrew Cagney b732d07d86 Fix logic selecting a new architecture. Use the sequence:
o	provided by INFO
	o	hard-wired by (gdb) set ...
	o	reversed engineered from INFO.abfd
	o	default to previous architecture
2001-05-14 16:43:35 +00:00
Nicholas Duffek 977adac5db * config/rs6000/tm-rs6000.h (IN_SOLIB_RETURN_TRAMPOLINE): Define.
(rs6000_in_solib_return_trampoline): Declare.
	* rs6000-tdep.c (rs6000_in_solib_return_trampoline): New
	function.
	(rs6000_skip_trampoline_code): Skip bigtoc fixup code.
	* xcoffread.c (read_xcoff_symtab): Perform the ISFCN function
	check after the CSECT check rather than before it.  Allocate
	separate symtabs for CSECTs whose names begin with '@'.
	(scan_xcoff_symtab): Don't ignore symbols beginning with '@'.
	Activate the misc_func_recorded mechanism for whose names begin
	with '@'.
2001-05-01 19:36:11 +00:00
Andrew Cagney 379d08a1d4 * target.h (enum target_signal): Move definition from here.
* defs.h (enum target_signal): To here.

* config/arc/tm-arc.h (arc_software_single_step): Change type of
first parameter to enum target_signal.
* config/rs6000/tm-rs6000.h (rs6000_software_single_step): Ditto.
* config/sparc/tm-sparc.h (sparc_software_single_step): Ditto.
* rs6000-tdep.c (rs6000_software_single_step): Update.
2001-03-21 18:31:48 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Andrew Cagney 4e052eda91 Create new file regcache.h. Update all uses. 2001-03-01 01:39:22 +00:00
Andrew Cagney 8e65ff28b0 Add __FILE__ and __LINE__ parameter to internal_error() /
internal_verror().
2001-02-08 06:03:54 +00:00
Kevin Buettner 55d05f3b1d Handle optimizer code motions into the prologue. 2000-11-18 05:50:11 +00:00
Peter Schauer 63f58cc529 Add auto-solib-add support for AIX, remove obsolete and unused
SOLIB_SYMBOLS_MANUAL code, cleanup of AIX shared library handling code.
	* rs6000-nat.c (vmap_symtab):  Do not try to modify offsets
	if symbols are not yet loaded.
	(vmap_add_symbols):  New function to add symbols for a vmap entry.
	(add_vmap):  Turn errors into warnings, return NULL vmap upon
	failure. Add symbols via vmap_add_symbols only if requested.
	(xcoff_relocate_core):  Allow debugging of core files without an
	executable file. Handle NULL returns from add_vmap gracefully.
	* xcoffsolib.c (solib_add):  Remove, no longer needed.
	(solib_info):  Do not check for new shared libraries if there is no
	inferior process.
	(sharedlibrary_command):  Made static.
	Do not check for new shared libraries if there is no inferior process.
	Add symbols for requested shared libraries via vmap_add_symbols.
	(_initialize_solib):  Add `set auto-solib-add' command.
	* xcoffsolib.h (vmap_add_symbols):  Add prototype declaration.

	* config/rs6000/tm-rs6000.h (PC_LOAD_SEGMENT):  Move from here ...
	* config/rs6000/nm-rs6000.h:  ... to here, this is an AIX native
	feature.
	* config/powerpc/tm-macos.h, config/powerpc/tm-ppc-eabi.h,
	config/powerpc/tm-ppc-nw.h, config/rs6000/tm-rs6000ly.h:
	Remove #undef PC_LOAD_SEGMENT.
	* config/powerpc/aix.mt, config/rs6000/aix4.mt, config/rs6000/rs6000.mt
	(TDEPFILES):  Move xcoffsolib.o from here ...
	* config/powerpc/aix.mh, config/rs6000/aix4.mh, config/rs6000/rs6000.mh
	(NATDEPFILES):  ... to here, xcoffsolib.o contains AIX native code
	only.
	* rs6000-tdep.c:  Remove #include xcoffsolib.h, no longer needed.
	* xcoffsolib.h (xcoff_relocate_symtab_hook):  Remove declaration.
	* rs6000-nat.c (_initialize_core_rs6000):  Remove setting of
	xcoff_relocate_symtab_hook, no longer needed.
	* xcoffsolib.c (solib_info, sharedlibrary_command):  Remove
	xcoff_relocate_symtab_hook indirection, call xcoff_relocate_symtab
	directly, as xcoffsolib.c is now compiled in native AIX configurations
	only.
	* Makefile.in:  Update dependencies for rs6000-tdep.o, rs6000-nat.o
	and xcoffsolib.o.
2000-11-09 09:49:00 +00:00
Peter Schauer f517ea4ebb * arch-utils.c, arch-utils.h (default_convert_from_func_ptr_addr):
New function.
	* gdbarch.sh (CONVERT_FROM_FUNC_PTR_ADDR):  Add.
	* gdbarch.c, gdbarch.h:  Regenerate.
	* valops.c (find_function_addr):  Use CONVERT_FROM_FUNC_PTR_ADDR
	unconditionally.

	* config/rs6000/tm-rs6000.h (CONVERT_FROM_FUNC_PTR_ADDR):  Delete
	definition.
	* config/powerpc/tm-linux.h (CONVERT_FROM_FUNC_PTR_ADDR):  Remove
	undef.
	* rs6000-tdep.c (rs6000_convert_from_func_ptr_addr):  Fix comment.
	(rs6000_gdbarch_init):  Register rs6000_convert_from_func_ptr_addr
	if not ELFOSABI_LINUX.
2000-10-26 07:41:25 +00:00
Kevin Buettner 077276e87b Add a limit parameter for scanning the prologue. 2000-10-05 01:13:53 +00:00
Peter Schauer 582236304c * rs6000-tdep.c (rs6000_pop_frame): Use PC_IN_CALL_DUMMY to test
for call dummy instead of accessing stop_stack_dummy, which does
	not work if we `return' from a stop in a call dummy.
	(rs6000_gdbarch_init):  Use generic_save_dummy_frame_tos for
	dummy_frame_tos function to make PC_IN_CALL_DUMMY work.
2000-09-24 09:58:16 +00:00
Kevin Buettner 9aa1e687a2 Make GNU/Linux/PPC work again. 2000-07-31 20:56:44 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Nicholas Duffek fe794dc69d * ppcbug-rom.c (ppcbug_regnames[]): Make array size implicit.
* rs6000-tdep.c (DEFAULT_LR_SAVE): Move to config/*/tm-*.h.
	(rs6000_gdbarch_init): Use generic_pc_in_call_dummy instead of
	rs6000_pc_in_call_dummy.
	* config/rs6000/tm-rs6000.h (DEFAULT_LR_SAVE): Move here from
	rs6000-tdep.c.
	* config/powerpc/tm-ppc-eabi.h: Remove various definitions
	handled by multi-arched rs6000-tdep.c.
2000-07-14 22:17:33 +00:00
Nicholas Duffek 470d566602 * xcoffread.c (read_symbol_nvalue): Return CORE_ADDR.
* rs6000-tdep.c (rs6000_pop_frame): Make addr CORE_ADDR type.
2000-07-07 22:00:09 +00:00
Nicholas Duffek 7a78ae4e6b * rs6000-tdep.c: Changes throughout for multi-arch 64-bit
support.  Incorporate most of tm-rs6000.h.
	(find_toc_address_hook): Rename to rs6000_find_toc_address_hook.
	(rs6000_set_host_arch_hook): Declare.
	(read_memory_addr): Define.
	(pop_frame): Rename to rs6000_pop_frame.
	(rs6000_pop_frame, rs6000_fix_call_dummy, rs6000_push_arguments,
	rs6000_frame_saved_pc, rs6000_frame_chain): Remove non-generic
	dummy frame handling.
	(branch_dest, rs6000_pop_frame, rs6000_skip_trampoline_code,
	rs6000_frame_saved_pc, frame_get_saved_regs,
	frame_initial_stack_address, rs6000_frame_chain,
	rs6000_convert_from_func_ptr_addr): Call read_memory_addr instead
	of read_memory_integer.
	(branch_dest, rs6000_pop_frame, rs6000_push_arguments,
	rs6000_skip_trampoline_code, rs6000_frame_saved_pc,
	frame_get_saved_regs, frame_initial_stack_address,
	rs6000_frame_chain): Replace 4 with TDEP->wordsize.
	(skip_prologue): Recognize some 64-bit stack adjustments.
	(push_dummy_frame, pop_dummy_frame, set_processor,
	show_processor): Delete.
	(frame_get_saved_regs): Manipulate saved register addresses using
	CORE_ADDR instead of int.
	(rs6000_create_inferior): New function.
	(register_names_*[]): Change to struct reg registers_*[].
	(variants[]): Assimilate into multi-arch approach.
	(register_names_*[], variants[]): Refer to pre-PowerPC
	architectures as POWER instead of RS6000.
	* rs6000-nat.c: Ubiquitous changes for 64-bit support.
	(vmap_secs, xcoff_relocate_symtab): Cast addresses
	to unsigned long to avoid sign-extension errors.
	(set_host_arch): New function.
	(xcoff_relocate_symtab): Try disabling usleep(36000) workaround.
	(rs6000_core_fns): Use new bfd_target_xcoff_flavour.
	(_initialize_core_rs6000): Initialize rs6000_set_host_arch_hook.
	* symfile.c (find_sym_fns): Remove special xcoff kludge.
	* xcoffread.c (secnum_to_bfd_section): Initialize args.objfile.
	(process_linenos): Query line struct size from coff
	backend instead of using compile-time constant.
	(enter_line_range): Likewise.
	(read_xcoff_symtab): Pass "XCOFF64" instead of "XCOFF" to
	record_debugformat() if appropriate.
	(process_xcoff_symbol): Access symbol addresses using
	SYMBOL_VALUE_ADDRESS instead of SYMBOL_VALUE.
	(read_symbol_lineno): Retrieve XCOFF64 symbol names from strtbl.
	(scan_xcoff_symtab): Likewise.  Query syment struct size from
	coff backend instead of using compile-time constant.
	(xcoff_sym_fns): Set flavour to bfd_target_xcoff_flavour.
	* Makefile.in (INTERNAL_LDFLAGS): Add $(MH_LDFLAGS) to list of flags
	that this Makefile variable get set to.  (From Kevin Buettner.)
	* config/powerpc/aix.mh (MH_LDFLAGS): Add linker flags so that
	the TOC doesn't overflow.  (From Kevin Buettner.)
	* config/powerpc/tm-ppc-aix.h: Move config decisions to
	multi-arched rs6000-tdep.c.
	* config/rs6000/tm-rs6000.h: Likewise.
	(GDB_MULTI_ARCH): Define.
	(skip_trampoline_code): Rename to rs6000_skip_trampoline_code.
	(is_magic_function_pointer): Replace with
	rs6000_convert_from_func_ptr_addr.
	(TARGET_CREATE_INFERIOR_HOOK): Define.
	(find_toc_address_hook): Rename to rs6000_find_toc_address_hook.
	(rs6000_set_host_arch_hook): Declare.
	* config/rs6000/nm-rs6000.h (CHILD_XFER_MEMORY): Define.
2000-06-16 21:02:22 +00:00
Kevin Buettner 507f3c78fb Eliminate PARAMS from function pointer declarations. 2000-06-04 00:41:10 +00:00
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
Kevin Buettner ddb20c56a3 Changes to skip_prologue for PPC architecture. 2000-02-26 09:30:30 +00:00
Kevin Buettner 482ca3f5dc Shared library, function calling fixes for GNU/Linux PPC port. 2000-02-24 23:06:48 +00:00
Kevin Buettner c877c8e605 Changes for GNU/Linux PPC native port of gdb. 2000-02-22 01:20:32 +00:00
Kevin Buettner f6077098c9 AIX 4.3 changes. 2000-02-15 21:17:04 +00:00
Jason Molenda 2acceee218 import gdb-1999-10-04 snapshot 1999-10-05 23:13:56 +00:00
Stan Shebs d4f3574e77 import gdb-1999-09-08 snapshot 1999-09-09 00:02:17 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda 0f71a2f66f import gdb-1999-06-14 snapshot 1999-06-14 18:08:47 +00:00
Jason Molenda cce74817d9 import gdb-1999-06-07 snapshot 1999-06-07 19:19:32 +00:00
Jason Molenda 392a587b05 import gdb-1999-05-25 snapshot 1999-05-25 18:09:09 +00:00
Stan Shebs b83266a0e1 import gdb-19990504 snapshot 1999-05-05 14:45:51 +00:00
Stan Shebs 7a292a7adf import gdb-19990422 snapshot 1999-04-26 18:34:20 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
Jim Blandy 2ac058fda9 Allow PPC users to select which PPC/RS6000 variant they're debugging
at run-time.  At the moment, the only thing this affects is the
set of registers visible.
* config/rs6000/tm-rs6000.h (REGISTER_NAME): Define this as a call
to the function rs6000_register_name.
(rs6000_register_name): Include extern decl.
(NUM_REGS): Bump to 183.  What's the right way to do this?
(FIRST_UISA_SP_REGNUM, LAST_UISA_SP_REGNUM): Renamed from
FIRST_SP_REGNUM, LAST_SP_REGNUM.
(REGISTER_BYTES): Recompute this.
* rs6000-tdep.c: Renamed all uses of FIRST_SP_REGNUM and
LAST_SP_REGNUM to FIRST_UISA_SP_REGNUM and LAST_UISA_SP_REGNUM, with
some concomitant formatting changes.
#include "gdbcmd.h", so we can define commands here.
(struct variant): New structure.
(COMMON_UISA_REG_NAMES, PPC_UISA_SPR_NAMES, PPC_SEGMENT_REG_NAMES,
PPC_32_OEA_SPR_NAMES, num_registers): New macros.
(register_names_rs6000, register_names_uisa, register_names_403,
register_names_403GC, register_names_505, register_names_860,
register_names_601, register_names_602, register_names_603,
register_names_604, register_names_750, variants): New variables.
(rs6000_register_name, install_variant, find_variant_by_name,
install_variant_by_name, list_variants, show_current_variant,
set_processor, show_processor): New functions.
(_initialize_rs6000_tdep): Define new commands `set processor' and
`show processor', and call install_variant_by_name to set the
default variant.
* rs6000-nat.c: Renamed all uses of FIRST_SP_REGNUM and
LAST_SP_REGNUM to FIRST_UISA_SP_REGNUM and LAST_UISA_SP_REGNUM, with
some concomitant formatting changes.
* configure.in: Accept the `--with-cpu' flag, to specify a default
processor variant.
* acconfig.h: Provide a blurb for TARGET_CPU_DEFAULT, which is set
by configure's `--with-cpu' flag.
* config.in, configure: Regenerated.
1999-02-01 21:17:19 +00:00
Andrew Cagney 86a51f415d CARP: Mechanism to replace EXTRA_FRAME_INFO.
Add two pointers (saved_regs, extra_info) to struct frame_info.
Introduce new macro FRAME_INIT_SAVED_REGS which replaces
FRAME_FIND_SAVED_REGS.

Document.

Use in mn10300 and rs6000 targets. Fix side effects on ALPHA, MIPS,
Z8K and SPARC targets.
1998-12-12 02:50:39 +00:00
Jim Blandy 63d7a4f12e * rs6000-tdep.c (pop_frame): Correctly find the registers saved in
the stack frame.  Their offset from the previous stack frame is in
fdata.gpr_offset and fdata.fpr_offset, not fdata.offset.
(gdb.base/return.exp)
* config/rs6000/tm-rs6000.h: Doc fixes.
1998-12-07 20:28:54 +00:00
Andrew Cagney 0233186932 CARP:
STEP_SKIPS_DELAY - add STEP_SKIPS_DELAY_P and rewrite use removing
  #ifdef's.
NO_SINGLE_STEP - replace with SOFTWARE_SINGLE_STEP_P +
  SOFTWARE_SINGLE_STEP.  Replace global variable one_stepped with static
  singlestep_breakpoints_inserted_p.  Cleanup infrun.c (scary!).
1998-11-27 23:35:08 +00:00
Andrew Cagney 07137a112d * rs6000-tdep.c (rs6000_breakpoint_from_pc): Change big_breakpoint
and little_breakpoint to char[] from char*.
* remote-array.c (array_insert_breakpoint): Change bp_addr to
CORE_ADDR type.
1998-11-26 10:36:45 +00:00
Andrew Cagney afcad54a90 CARP: *BREAKPOINT*
Convert mn10300, MIPS and powerpc/rs6000 targets to use
BREAKPOINT_FROM_PC
Delete global variable memory_breakpoint_size.  Use BREAKPOINT_FROM_PC
instead.
1998-11-24 13:49:00 +00:00
Mark Alexander c6d28b22da * rs6000-tdep.c: Don't include tm.h twice. 1998-10-10 01:17:07 +00:00
Mark Alexander 70423641d9 * rs6000-tdep.c (get_saved_register): Define only if
USE_GENERIC_DUMMY_FRAMES is defined.
1998-10-08 15:59:23 +00:00
Mark Alexander 0ec1e44d3d Patch from Dawn Perchik <dawn@cygnus.com>:
* rs6000-tdep.c (pop_frame): Handle generic dummy frames.
	(push_arguments): Likewise.
	(frame_saved_pc): Likewise.
	(rs6000_frame_chain): Likewise.
	(ppc_push_return_address): New function.
	(get_saved_register): New function.
	* config/powerpc/tm-ppc-eabi.h: Add generic dummy frame macros.
1998-09-23 05:41:38 +00:00
Michael Snyder 75621b2b2c Tue Jun 23 17:32:26 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
* rs6000-tdep.c (pop_dummy_frame): use memcpy.
        (push_arguments): use memset.
        (various other places): fix up indentation and long lines.
1998-06-24 00:37:49 +00:00
Peter Schauer 0c6c5eebf4 * mips-tdep.c (mips_push_arguments): Tweak alignment of register
value if the remaining length of a non-integral argument is smaller
	than the register size for big-endian non-EABI mode.

	* rs6000-tdep.c (branch_dest):  Handle return from signal
	handler function via sigreturn kernel call.
1997-09-23 07:10:51 +00:00
Peter Schauer 05d52ace86 * infrun.c (wait_for_inferior): Add the symbols for any
newly loaded objects upon a TARGET_WAITKIND_LOADED event.

	Rewrite code which determines the TOC address for calling functions
	in the inferior under AIX.
	* rs6000-nat.c (find_toc_address):  New function to determine
	the required TOC address from a function address.
	(_initialize_core_rs6000):  Set up find_toc_address_hook to point
	to find_toc_address.
	(xcoff_relocate_symtab, xcoff_relocate_core):  Remove
	add_text_to_loadinfo calls.
	(exec_one_dummy_insn):  Change pid and status to int to get rid of
	compiler warnings.
	(xcoff_relocate_symtab):  Cast ldi to `int *' when passing it to
	ptrace to get rid of compiler warnings.
	* rs6000-tdep.c:  Add definition for find_toc_address_hook.
	(rs6000_fix_call_dummy):  If find_toc_address_hook is non zero,
	patch TOC address load code in the call dummy with the value
	returned from find_toc_address_hook.
	(struct loadinfo, loadinfo, loadinfolen,
	loadinfotextindex, xcoff_init_loadinfo, free_loadinfo,
	xcoff_add_toc_to_loadinfo, add_text_to_loadinfo, find_toc_address):
	Remove.
	(_initialize_rs6000_tdep):  Remove initialization of
	coff_add_toc_to_loadinfo_hook and xcoff_init_loadinfo_hook.
	* xcoffread.c (coff_add_toc_to_loadinfo_hook,
	xcoff_init_loadinfo_hook):  Remove.
	(struct coff_symfile_info):  Add toc_offset field.
	(scan_xcoff_symtab):  Record toc_offset value in toc_offset field
	instead of calling xcoff_add_toc_to_loadinfo_hook.
	(get_toc_offset):  New function to return the value of the
	toc_offset field for an object file.
	(xcoff_initial_scan):  Remove call of xcoff_init_loadinfo_hook.
	* xcoffsolib.h (add_text_to_loadinfo):  Remove declaration.
	* config/rs6000/tm-rs6000.h:  Add declarations for
	find_toc_address_hook and get_toc_offset.
1997-08-15 21:10:32 +00:00
Peter Schauer 4cc5671656 * config/rs6000/tm-rs6000.h (SIG_FRAME_LR_OFFSET): Define.
* rs6000-tdep.c (frameless_function_invocation):  Mark frames
	with a zero PC as frameless to improve backtraces from core dumps
	caused by dereferencing a NULL function pointer.
	(frameless_function_invocation, frame_saved_pc, rs6000_frame_chain):
	Handle frameless functions interrupted by a signal.

	* sparc-tdep.c (sparc_init_extra_frame_info, sparc_frame_saved_pc):
	Handle frameless functions interrupted by a signal.
1997-05-15 15:01:54 +00:00
Peter Schauer 211b564e41 * config/powerpc/tm-ppc-aix4.h, config/rs6000/tm-rs6000-aix4.h
(DONT_RELOCATE_SYMFILE_OBJFILE):  Removed.
	* xcoffsolib.h (struct vmap):  Add new members tvma, toffs and dvma,
	remove tadj.
	* exec.c (bfdsec_to_vmap):  Initialize new vmap members, initialize
	tstart and dstart with section VMA.
	* rs6000-nat.c (vmap_symtab):  Relocate relative to the VMA in the
	object file.
	(vmap_ldinfo, xcoff_relocate_core):  Adjust tstart by section offset
	of the text section, remove DONT_RELOCATE_SYMFILE_OBJFILE hack.
	(vmap_exec):  Relocate relative to the VMA in the object file,
	relocate .bss section as well.
	(xcoff_relocate_core):  No longer adjust section addresses by VMA.
	* rs6000-tdep.c (find_toc_address):  Change type of tocbase
	to CORE_ADDR.
	* xcoffread.c (secnum_to_bfd_section):  New routine to get
	BFD section from CS section number.
	(scan_xcoff_symtab):  Make toc_offset section relative.

	* symtab.c (total_number_of_methods):  Avoid core dump if
	baseclass type is still undefined.
1997-04-19 08:52:17 +00:00
Fred Fish 94b4f75666 * rs6000-tdep.c: Fix typo in comment.
* valops.c (call_function_by_hand): Set using_gcc to 2
	for code compiled without -g, per comment in code.
	* config/a29k/tm-a29k.h (STACK_ALIGN): Add comment.
	* config/sparc/tm-sparc.h (STACK_ALIGN): Add comment.
	* config/sparc/tm-sp64.h (STACK_ALIGN): Add comment.
	* config/pyr/tm-pyr.h (STACK_ALIGN): Add comment.
	* config/m88k/tm-m88k.h (STACK_ALIGN): Add comment.
	* config/pa/tm-hppa.h (PUSH_ARGUMENTS): Enclose args in ()'s.
	(STACK_ALIGN): Add comment, move to be with other associated
 	macros, and document.
	* config/mips/tm-mips.h (PUSH_ARGUMENTS): Enclose args in ()'s.
	(STACK_ALIGN): Remove completely, handled by PUSH_ARGUMENTS.
	* config/alpha/tm-alpha.h (PUSH_ARGUMENTS): Enclose args in ()'s.
	* config/rs6000/tm-rs6000.h (STACK_ALIGN): Remove completely,
	handled by PUSH_ARGUMENTS.
	(PUSH_ARGUMENTS): Enclose args in ()'s.
1996-08-25 07:17:22 +00:00
Stan Shebs 2f163bc3c8 * rs6000-tdep.c (rs6000_fix_call_dummy): Add full set of arguments.
* config/rs6000/tm-rs6000.h (FIX_CALL_DUMMY): Pass all arguments
	to function, declare function correctly.
1996-08-17 00:57:52 +00:00
Fred Fish 368f1e773b * rs6000-tdep.c (push_arguments): Remove unused variable "pc".
(branch_dest): Remove unused variable "offset".
	(pop_dummy_frame): Add prototype and make static.
	(push_arguments): Guard against using len uninitialized.
	(push_arguments): Guard against using arg uninitialized.
	(frame_saved_pc): Remove unused variable "frameless".
	(free_loadinfo): Ifdef out unused function.
1996-07-30 07:24:22 +00:00
Fred Fish 58b4fad226 * rs6000-tdep.c (skip_prologue): Add missing parens around
operands of logical-or so that first operand does not bind
	to previous logical-and.
1996-07-30 05:12:07 +00:00
Fred Fish b607efe714 See gdb ChangeLog entry with header:
Thu Jul 25 19:41:31 1996  Fred Fish  <fnf@cygnus.com>

for a rather huge set of changes.  I was going to put them here, but it
made cvs dump core.  :-(
1996-07-26 03:01:51 +00:00
Michael Meissner 8678180e14 Do not do XCOFF hoooks for ELF systems 1996-05-06 11:56:56 +00:00
Fred Fish 062cb0d30d * Makefile.in (rs6000-nat.o): Dependant on xcoffsolib.h.
* config/rs6000/rs6000.mh (NATDEPFILES): Move xcoffread.o ...
	* config/rs6000/rs6000.mt (TDEPFILES): ... to here
	* xcoffsolib.c (xcoff_relocate_symtab_hook): Define and initialize.
	(solib_info): Call xcoff_relocate_symtab via the hook.
	(sharedlibrary_command): Ditto.
	* xcoffread.c: Remove all FAKING_RS6000 comments and defines.
	(xcoff_add_toc_to_loadinfo_hook): Define and initialize here.
	(xcoff_init_loadinfo_hook): Define and initialize here.
	(scan_xcoff_symtab): Call xcoff_add_toc_to_loadinfo via the hook.
	(xcoff_initial_scan): Call xcoff_init_loadinfo via the hook.
	* xcoffsolib.h (xcoff_relocate_symtab_hook): Declare extern func.
	* rs6000-tdep.c (_initialize_rs6000_tdep): Add initializations
	of xcoff_add_toc_to_loadinfo_hook and xcoff_init_loadinfo_hook.
	* rs6000-nat.c (_initialize_core_rs6000): Add initialization
	of xcoff_relocate_symtab_hook.
1996-05-02 01:32:41 +00:00
Michael Meissner 59c8431852 fix typo 1995-12-01 12:21:03 +00:00
Per Bothner 940d596798 * alpha-tdep.c, c-exp.y, h8500-tdep.c, f-exp.y, f-valprint.c,
findvar.c, hppa-tdep.c, infcmd.c, language.c, printcmd.c,
 	rs6000-tdep.c, symmisc.c, symtab.c:
	Add check_typedef/CHECK_TYPEDEF as needed.
1995-11-30 01:43:37 +00:00
Stan Shebs cd8a3d845b * rs6000-tdep.c: Don't include a.out.h, improve some formatting. 1995-10-15 23:23:01 +00:00
Peter Schauer 4f8710e6ff * rs6000-tdep.c (push_dummy_frame): Handle lr_offset of zero
correctly.
1995-09-23 13:30:04 +00:00
Michael Tiemann 3a4f97862f Sun Sep 10 10:24:48 1995 Michael Tiemann <tiemann@axon.cygnus.com>
* tm-ppc-eabi.h (PC_IN_CALL_DUMMY): Redefine this to work with the
	simulator.  FIXME.

	* rs6000-tdep.c (push_dummy_frame): Calculate the correct link
	register offset from the current frame (don't assume it is always 8).
	(push_dummy_frame): Add comment about having only 4096 bytes of
	stack space in the simulator (by default).

	* remote-sim.c (gdbsim_create_inferior): Call
	`add_text_to_loadinfo' so that gdb can find TOC entries when
	calling functions in the inferior.

With this changes, it is now possible to correctly call inferior
functions in the PPC simulator.
1995-09-10 17:37:22 +00:00
Jeff Law 65eaea2742 * configure.in: Recognize aix4 specially as some aspects
of aix4 need different handling than aix3.
        * configure: Updated.
        * config/powerpc/{aix4.mh,aix4.mt,tm-ppc-aix4.h}: New files
        specific to aix4 support on the power pc.
        * config/powerpc/tm-ppc-aix.h (DONT_RELOCATE_SYMFILE_OBJFILE): Do
        not defined.  The aix4 specific target files will do that.
        * config/rs6000/{aix4,mh,aix4,mt,tm-rs6000-aix4.h}: New files
        specific to aix4 support on the rs6000.

        * config/rs6000/tm-rs6000.h (CONVERT_FROM_FUNC_PTR_ADDR): Don't
        do the conversion if the pointer is not a magic aix function
        pointer.
        * rs6000-tdep.c: Include objfiles.h and symtab.h.
        (is_magic_function_pointer): New function.

        * rs6000-tdep.c (skip_prologue): Refine check for frameless
        functions.  Handle b .+4 emitted by aix4 compilers.  Only
        allow one load of a minimal toc pointer.  Handle aix4 compiler's
        code for alloca.

        * rs6000-tdep.c (find_toc_address): Report an error if no toc was
        found rather than possibly core dumping.

        * partial-stab.h: Handle extra field generated by the aix4 compiler
        for enumerations.
        * stabsread.c (read_enum_type): Likewise.
1995-08-12 22:50:04 +00:00
Peter Schauer 07781ac0c3 * rs6000-tdep.c (extract_return_value): Fix returning of values
whose length is less than the register size for big endian targets.
1995-08-12 10:21:12 +00:00
Fred Fish 6c9638b444 Update FSF address. 1995-08-02 03:41:12 +00:00
Peter Schauer 965dde97f0 * rs6000-tdep.c (frame_saved_pc): Check for signal handler caller
before trying to determine the start of the function.
	(skip_prologue):  Skip subroutine call which might save the
	floating point registers only if it is within the first three
	instructions.
	Reinstate setting of alloca_reg if setup of a gcc frame pointer
	is found.
	(frame_get_cache_fsr):  Use new fields in rs6000_framedata.
1995-07-30 08:45:15 +00:00
Michael Meissner 4b4c6c9616 More V.4/AIX fixes 1995-07-27 14:01:34 +00:00
Michael Meissner 068c9fd63f Better support V.4 calling sequences. 1995-07-27 03:50:05 +00:00
Michael Meissner 636414911e Change aix_framedata -> rs6000_framedata 1995-07-25 14:46:12 +00:00
Michael Meissner 5c172b4bfd Fix some little endian problems 1995-06-06 14:49:32 +00:00
Jim Kingdon a367db8959 * rs6000-tdep.c (find_toc_address): Revise comment.
* symfile.c, symfile.h (init_psymbol_list): New function;
	consolidate duplicated copies from os9kread.c, dbxread.c
	and dwarfread.c.
	* defs.h: Declare info_verbose.
	* xcoffread.c: Extensive changes to support psymtabs.
1995-05-13 20:39:21 +00:00
Michael Meissner 07dc1e42d7 Do not use unprotected ANSI/ISO prototypes. 1995-04-13 16:13:48 +00:00
Peter Schauer e137e850dc * rs6000-tdep.c (skip_prologue): Skip saving of LR and CR in
the stack frame, fix typos in `st rx,NUM(r1)' and `stu r1,NUM(r1)'
	tests.
1995-03-29 08:16:05 +00:00
Jim Kingdon 5816555bca * rs6000-tdep.c (push_dummy_frame): Fix order of arguments to
store_address.
1995-03-03 21:47:14 +00:00
Michael Meissner 629b6214ad Support saving saved regs with multiple stores in addition to store multiple instructions in prologue. 1995-03-03 17:39:37 +00:00