Commit Graph

106 Commits

Author SHA1 Message Date
Andrew Cagney a72293e2a7 When non-multi-arch, use predefault as the value of a pure-multi-arch
method.
2001-11-08 01:33:04 +00:00
Andrew Cagney 56f127518f gdbarch.sh provides default for USE_STRUCT_CONVENTION. 2001-11-07 22:42:29 +00:00
Andrew Cagney a4a7d16f8b gdbarch.sh (PC_IN_CALL_DUMMY): Require a value. 2001-11-07 04:28:38 +00:00
Andrew Cagney a985cd4128 gdbarch.sh (CALL_DUMMY_LOCATION): Require a value. 2001-11-06 21:20:23 +00:00
Andrew Cagney 69a0d5f4fa Add predicate for PUSH_RETURN_ADDRESS. 2001-11-06 18:06:00 +00:00
Corinna Vinschen c12260ac38 * arch-utils.c (generic_in_function_epilogue_p): New function.
* arch-utils.h (generic_in_function_epilogue_p): Declare extern.
	* breakpoint.c (watchpoint_check): Add test whether the pc is
	currently in the epilogue of a function.
	* gdbarch.c: Autogenerated from gdbarch.sh.
	* gdbarch.h: Ditto.
	* gdbarch.sh (function_list): Add `in_function_epilogue_p' definition.
2001-11-06 11:02:12 +00:00
Andrew Cagney 5fdff4261c Change INIT_EXTRA_FRAME_INFO() to a function with predicate. 2001-11-05 23:11:31 +00:00
Andrew Cagney f16a1923df * gdbarch.sh (verify_gdbarch): Use a mem_file to accumulate all
error messages.  Print in a single batch.
* gdbarch.c: Regenerate.
2001-11-05 21:34:33 +00:00
Corinna Vinschen 68e9cc944c * arch-utils.c (generic_in_solib_call_trampoline): New function.
* arch-utils.h (generic_in_solib_call_trampoline): Extern declaration.
	* gdbarch.c: Regenerated from gdbarch.sh.
	* gdbarch.h: Ditto.
	* gdbarch.sh (function_list): Add `IN_SOLIB_CALL_TRAMPOLINE' definition.
	* infrun.c (IN_SOLIB_CALL_TRAMPOLINE): Remove macro.
2001-10-31 23:21:33 +00:00
Andrew Cagney fd0407d670 Add explicit #include of "value.h". 2001-10-21 17:19:38 +00:00
Andrew Cagney fc0c74b114 Add INTEGER_TO_ADDRESS to hadle nasty harvard architectures that do
funnies to integer to address conversions.
2001-10-15 18:18:30 +00:00
Andrew Cagney 83e6b173e7 From 2001-07-09 D.J. Barrow <djbarrow@de.ibm.com>:
* gdbarch.sh: Fixed CALL_DUMMY_BREAKPOINT_OFFSET to check
CALL_DUMMY_BREAKPOINT_OFFSET_P.
* gdbarch.c: Regenerate.
2001-10-13 19:40:31 +00:00
Andrew Cagney 85de96271b * gdbarch.sh (gdbarch_alloc): Name the new architecture
``current_gdbarch'' so that it, and not the identically named
global is refered to by macros.
* gdbarch.c: Regenerate.
2001-09-30 16:54:28 +00:00
Andrew Cagney 08e45a405b * gdbarch.sh (gdbarch_dump): Sort output.
* gdbarch.c: Regenerate.
2001-09-29 22:35:53 +00:00
Elena Zannoni 2bf0cb6592 2001-09-05 Elena Zannoni <ezannoni@redhat.com>
* gdbarch.sh: Move include of dis-asm.h so it is generated earlier
        in gdbarch.h.
        (TARGET_PRINT_INSN): Multiarch.
        * gdbarch.h: Regenerate.
        * gdbarch.c: Regenerate.

        * arch-utils.c (legacy_print_insn): New function.
        * arch-utils.h (legacy_print_insn): Export.

        * cris-tdep.c (cris_delayed_get_disassembler): Use
        TARGET_PRINT_INSN, instead of tm_print_insn.
        * d10v-tdep.c (print_insn): Ditto.
        * d30v-tdep.c (print_insn): Ditto.
        * m32r-tdep.c (dump_insn): Ditto.
        * v850-tdep.c (v850_scan_prologue): Ditto.
        * mcore-tdep.c (mcore_dump_insn): Ditto.
        * sh-tdep.c (sh_gdbarch_init): Set print_insn gdbarch field.
2001-09-05 23:44:44 +00:00
Corinna Vinschen bdcd319a1e * arch-utils.c (generic_skip_trampoline_code): New function.
* arch-utils.h (generic_skip_trampoline_code): Declare external.
        * gdbarch.c: Regeberated from gdbarch.sh.
        * gdbarch.h: Ditto.
        * gdbarch.sh (SKIP_TRAMPOLINE_CODE): Multi-arch.
        * infrun.c: Remove default setting of SKIP_TRAMPOLINE_CODE macro.
2001-08-15 15:29:56 +00:00
Andrew Cagney 39d4ef0921 * target.h (TARGET_VIRTUAL_FRAME_POINTER): Delete, multi-arched.
* gdbarch.sh (TARGET_VIRTUAL_FRAME_POINTER): Add.
* gdbarch.h, gdbarch.c: Regenerate.

* arch-utils.h (legacy_virtual_frame_pointer): Declare.
* arch-utils.c: Include "gdb_assert.h".
(legacy_virtual_frame_pointer): Define.
* Makefile.in (arch-utils.o): Depends on gdb_assert.h.

* tracepoint.c (encode_actions): Make frame_reg an int.  Make
frame_offset a LONGEST.
* ax-gdb.c (gen_frame_args_address): Ditto.
(gen_frame_locals_address): Ditto.
* mn10300-tdep.c (mn10300_gdbarch_init): Initialize
virtual_frame_pointer.
(mn10300_virtual_frame_pointer): Make static.  Update parameter
list to match function signature.
* config/mn10300/tm-mn10300.h (TARGET_VIRTUAL_FRAME_POINTER): Delete.
2001-08-11 00:59:29 +00:00
Keith Seitz 67c2c32c6b * gdb-events.sh: Add architecture_changed event.
* gdbarch.sh: Include gdb-event.h.
	(gdbarch_update_p): Notify UIs when architecture changes.
	* gdb-events.h: Regenerated.
	* gdb-events.c: Regenerated.
	* gdbarch.c: Regenerated.
2001-08-11 00:41:02 +00:00
Jim Blandy 75af7f6801 Clean up the D10V port so that GDB and the target program no
longer disagree on how big pointers are.
* findvar.c (value_from_register): Remove special case code for D10V.
* printcmd.c (print_frame_args): Same.
* valops.c (value_at, value_fetch_lazy): Same.
* values.c (unpack_long): Same.
* gdbarch.sh: Changes to effect the following:
* gdbarch.h (GDB_TARGET_IS_D10V, D10V_MAKE_DADDR,
gdbarch_d10v_make_daddr_ftype, gdbarch_d10v_make_daddr,
set_gdbarch_d10v_make_daddr, D10V_MAKE_IADDR,
gdbarch_d10v_make_iaddr_ftype, gdbarch_d10v_make_iaddr,
set_gdbarch_d10v_make_iaddr, D10V_DADDR_P,
gdbarch_d10v_daddr_p_ftype, gdbarch_d10v_daddr_p,
set_gdbarch_d10v_daddr_p, D10V_IADDR_P,
gdbarch_d10v_iaddr_p_ftype, gdbarch_d10v_iaddr_p,
set_gdbarch_d10v_iaddr_p, D10V_CONVERT_DADDR_TO_RAW,
gdbarch_d10v_convert_daddr_to_raw_ftype,
gdbarch_d10v_convert_daddr_to_raw,
set_gdbarch_d10v_convert_daddr_to_raw, D10V_CONVERT_IADDR_TO_RAW,
gdbarch_d10v_convert_iaddr_to_raw_ftype,
gdbarch_d10v_convert_iaddr_to_raw,
set_gdbarch_d10v_convert_iaddr_to_raw): Delete declarations.
* gdbarch.c: Delete the corresponding definitions.
(struct gdbarch): Delete members d10v_make_daddr,
d10v_make_iaddr, d10v_daddr_p, d10v_iaddr_p,
d10v_convert_daddr_to_raw, and d10v_convert_iaddr_to_raw.
(startup_gdbarch): Remove initializers for the above.
(verify_gdbarch, gdbarch_dump): Don't verify or dump them any
more.
* d10v-tdep.c (d10v_register_virtual_type): Rather that
claiming the stack pointer and PC are 32 bits long (which they
aren't), say that the stack pointer is an int16_t, and the
program counter is a function pointer.  This allows the rest
of GDB to make the appropriate conversions between the code
pointer format and real addresses.
(d10v_register_convertible, d10v_register_convert_to_virtual,
d10v_register_convert_to_raw): Delete function; no registers
are convertible now, so we use
generic_register_convertible_not instead.
(d10v_address_to_pointer, d10v_pointer_to_address): New gdbarch
methods.
(d10v_push_arguments, d10v_extract_return_value): Remove special
cases for code and data pointers.
(d10v_gdbarch_init): Set gdbarch_ptr_bit to 16, so that GDB and
the target agree on how large pointers are.  Say that addresses
are 32 bits long.  Register the address_to_pointer and
pointer_to_address conversion functions.  Since no registers are
convertible now, register generic_register_convertible_not as the
gdbarch_register_convertible method instead of
d10v_register_convertible.  Remove registrations for
d10v_register_convert_to_virtual,
d10v_register_convert_to_raw, gdbarch_d10v_make_daddr,
gdbarch_d10v_make_iaddr, gdbarch_d10v_daddr_p,
gdbarch_d10v_iaddr_p, gdbarch_d10v_convert_daddr_to_raw, and
gdbarch_d10v_convert_iaddr_to_raw.
2001-07-10 21:24:48 +00:00
Andrew Cagney 7824d2f224 * arch-utils.c (init_frame_pc_default): New function
* arch-utils.h (init_frame_pc_default): Declare.
* gdbarch.sh (INIT_FRAME_PC): Default to init_frame_pc_default and
not init_frame_pc_noop.
* gdbarch.h, gdbarch.c: Re-generate.
* blockframe.c (INIT_FRAME_PC): Delete macro definition.
* mips-tdep.c (mips_gdbarch_init): Set init_frame_pc to
init_frame_pc_noop.
2001-06-16 20:00:24 +00:00
Andrew Cagney 1622c8f764 regenerate gdbarch.c. 2001-06-16 19:48:01 +00:00
Andrew Cagney 01fb743397 Multi-arch CANNOT_FETCH_REGISTER() and CANNOT_STORE_REGISTER(). 2001-06-15 23:50:46 +00:00
Andrew Cagney 10312cc4d2 Multi-arch INIT_FRAME_PC() and INIT_FRAME_PC_FIRST(). 2001-06-15 23:10:55 +00:00
Andrew Cagney 875e176797 multi-arch ADDR_BITS_REMOVE. 2001-06-15 22:10:21 +00:00
Andrew Cagney d6dd581ead * gdbarch.sh (EXTRACT_STRUCT_VALUE_ADDRESS_P): Delete definition.
(EXTRACT_STRUCT_VALUE_ADDRESS): Change to a function with
predicate.
* gdbarch.h, gdbarch.c: Regenerate.
* values.c (value_being_returned): Change the reference to
EXTRACT_STRUCT_VALUE_ADDRESS_P to a function call.
2001-06-15 19:19:23 +00:00
Jim Blandy ceaa8edf7e * gdbarch.sh: Changes to effect the following:
* gdbarch.c (initialize_non_multiarch): New function.
* gdbarch.h (initialize_non_multiarch): New declaration.
* arch-utils.c (initialize_current_architecture): For
non-multiarch configurations, call initialize_non_multiarch.
2001-06-06 17:47:28 +00:00
Jim Blandy b3cc30771b * gdbarch.sh, gdbarch.c: Revert change of 2001-06-01; all
per-architecture data should be registered at initialization time,
before any gdbarch objects get used, so the generality is
unnecessary.
2001-06-06 14:46:30 +00:00
Jim Blandy 3c875b6f0d Expand the gdbarch per-architecture data vector as needed, rather
than requiring that all per-architecture data be registered before
the first gdbarch object is allocated.
* gdbarch.sh: Changes to effect the following:
* gdbarch.c (alloc_gdbarch_data, init_gdbarch_data): Delete
declarations and definitions.
(check_gdbarch_data): New function, and declaration.
(gdbarch_alloc): Don't call alloc_gdbarch_data; leaving the fields
zero is good enough.
(free_gdbarch_data): Tolerate a null data pointer.  Free only
those data items gdbarch->data actually has allocated.
(set_gdbarch_data, gdbarch_data): Call check_gdbarch_data.
(gdbarch_update_p): No need to call init_gdbarch_data.
2001-06-02 03:50:56 +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
Kevin Buettner 39f770628a Phase 1 of the ptid_t changes. 2001-05-04 04:15:33 +00:00
David Smith e02bc4cc30 2001-04-06 David Smith <dsmith@redhat.com>
* arch-utils.c (default_prepare_to_proceed)
	(generic_prepare_to_proceed): Added new functions.
	* arch-utils.h: New function declarations for
	default_prepare_to_proceed() and generic_prepare_to_proceed().
	* gdbarch.sh: Added PREPARE_TO_PROCEED.
	* gdbarch.c: Regenerated.
	* gdbarch.h: Regenerated.
	* inferior.h: Added get_last_target_status() declaration.
	* infrun.c (get_last_target_status): Added new function.
	(handle_inferior_event): Saves last pid and waitstatus, which will
	get returned by get_last_target_status().

	* hppa-tdep.c (prepare_to_proceed):  Added comment stating that
	prepare_to_proceed() is potentially redundant since
	default_prepare_to_proceed() has been added.
	* linux-thread.c (prepare_to_proceed): Ditto.
	* lin-lwp.c (prepare_to_proceed): Ditto.
	* m3-nat.c (prepare_to_proceed): Ditto.
2001-04-06 17:53:39 +00:00
Andrew Cagney 64c4637f92 * config/sparc/tm-sp64.h (GDB_MULTI_ARCH): Down grade to
GDB_MULTI_ARCH_PARTIAL from two.  SOFTWARE_SINGLE_STEP is not
multi-arch.
* gdbarch.sh (SOFTWARE_SINGLE_STEP): Add.
* gdbarch.h, gdbarch.c: Re-generate.
* target.h (SOFTWARE_SINGLE_STEP_P)
(SOFTWARE_SINGLE_STEP): Delete macro definitions.
2001-03-24 02:07:49 +00:00
Andrew Cagney 61a0eb5b8e Re-vamp the register code so that a lot more is routed through
{read,write}_register_gen.  Hook that function with multi-arch.
2001-03-24 01:26:09 +00:00
Andrew Cagney 8e65ff28b0 Add __FILE__ and __LINE__ parameter to internal_error() /
internal_verror().
2001-02-08 06:03:54 +00:00
Andrew Cagney 9516075289 Addd set_gdbarch_data() method. Update register_gdbarch_data() interface. 2001-02-07 02:17:48 +00:00
John R. Moore 338d7c5c40 Changed free() to xfree() where appropriate. Also changed Copyright to
include 2001.
2001-02-02 20:01:16 +00:00
Nicholas Duffek 58d5518ebe * gdbarch.sh (PARM_BOUNDARY): Define.
* gdbarch.c: Regenerate.
	* gdbarch.h: Regenerate.
2001-01-22 23:32:49 +00:00
Andrew Cagney 2649061d59 Multi-arch REGISTER_BYTES_OK. 2000-12-15 12:33:08 +00:00
Kevin Buettner b8c9b27d1e Replace free() with xfree(). 2000-12-15 01:01:51 +00:00
Andrew Cagney 88c72b7d71 Multiarch STAB_REG_TO_REGNUM, ECOFF_REG_TO_REGNUM,
DWARF_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM.
2000-12-04 04:01:16 +00:00
Andrew Cagney be5a57e1c9 Regenerate gdbarch.c. 2000-11-30 03:30:52 +00:00
J.T. Conklin 8e1a459b89 * gdbarch.sh, hp-psymtab-read.c, hpread.c, m3-nat.c, mcore-tdep.c,
mips-tdep.c, monitor.c, regcache.c, remote-es.c, ser-unix.c,
somread.c, tracepoint.c: Fix spelling errors in comments.
* gdbarch.c: Regenerate.

* gnu-nat.c (S_exception_raise_request): Fix typos and spelling
errors in strings.
* m3-nat.c (intercept_exec_calls, mach_thread_parse_id): Likewise.
* mcore-tdep.c (mcore_analyze_prologue): Likewise.
* mips-tdep.c (mips16_next_pc, _initialize_mips_tdep): Likewise.
* remote-e7000.c (e7000_start_remote): Likewise.
* remote-rdp.c (handle_swi): Likewise.
* remote-vx.c (vx_load_command): Likewise.
* sh-tdep.c (sh_do_pseudo_register): Likewise.
* sol-thread.c (td_err_string): Likewise.
* symtab.c (decode_line_2): Likewise.
-------------------------------------------------------------------
2000-10-30 21:50:58 +00:00
J.T. Conklin ec3d358c9f * arch-utils.c (set_architecture, set_architecture_from_arch_mach,
set_gdbarch_from_file): Fix spelling error.
* v850-tdep.c (v850_target_architecture_hook): Likewise.
* gdbarch.sh: Fix spelling errors in comment.
* gdbarch.c, gdbarch.h: Regenerate.

* ppcnbsd-nat.c (fetch_core_registers, fetch_inferior_registers,
store_inferior_registers): Support older NetBSD/powerpc systems
from before fp reg support was added.  Adapt to register number
changes caused when powerpc target was multi-arched.
2000-10-27 19:17:57 +00:00
David Anderson 7e73cedf75 Corrected spelling errors in comments.
gdbarch.{c,sh} removed a word from a comment.
2000-10-27 15:02:42 +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
David Anderson 3ee9b6e949 Corrected spelling error in comment: swaped -> swapped. 2000-09-01 23:55:07 +00:00
David Taylor 52204a0b3a Fri Aug 25 12:11:21 2000 David Taylor <taylor@texas.cygnus.com>
* symtab.c (search_symbols): Fix off by one error in index for
 	initializing variables ourtype, ourtype2, ourtype3, and ourtype4.
	(symtab_symbol_info): fix similar off by one error.

Fri Aug 25 12:03:15 2000  David Taylor  <taylor@texas.cygnus.com>

	* gdbarch.sh (TARGET_ADDR_BIT): New macro for the number
	of bits in gdb's representation of a target address.
	* gdbarch.c, gdbarch.h: Regenerated.
	* gdbtypes.c (build_gdbtypes): Use TARGET_ADDR_BIT instead of
 	TARGET_PTR_BIT when initializing builtin_type_CORE_ADDR.
	* printcmd.c (print_address_numeric): Use TARGET_ADDR_BIT instead
 	of TARGET_PTR_BIT, because we're printing an address, not a pointer.
2000-08-25 20:51:19 +00:00
Andrew Cagney be8dfb8711 * regcache.c (TARGET_WRITE_PC, TARGET_READ_PC, TARGET_READ_FP,
TARGET_WRITE_FP, TARGET_READ_SP, TARGET_WRITE_SP): Move
        initialization from here.
        * gdbarch.sh: To here.
        * gdbarch.h, gdbarch.c: Regenerate.
2000-08-11 03:19:22 +00:00
Andrew Cagney 66b43ecb0f Move TARGET_*_PTR to gdbarch.h. 2000-08-11 02:55:38 +00:00
Andrew Cagney 16f33e2966 Rename gdbarch_update() to gdbarch_update_p() 2000-08-11 01:30:11 +00:00