Commit Graph

115 Commits

Author SHA1 Message Date
Andrew Cagney 2c283bc467 * gdbarch.sh (TARGET_CHAR_SIGNED): Do not specify the print
format.
2001-12-20 17:23:06 +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
Andrew Cagney 33cce46887 Regenerate. 2001-12-15 18:07:57 +00:00
Andrew Cagney 778eb05eac LITTLE_ENDIAN -> BFD_ENDIAN_LITTLE 2001-12-15 16:53:24 +00:00
Michael Snyder ce29138a6e 2001-12-10 Michael Snyder <msnyder@redhat.com>
* arch-utils.c (generic_register_virtual_size): New function.
	* arch-utils.h: Export generic version of register_virtual_size.
	* gdbarch.sh (REGISTER_VIRTUAL_SIZE): Use new function as default.
	* gdbarch.c: Regenerate.
2001-12-11 22:15:55 +00:00
Andrew Cagney 46cd78fb46 * arch-utils.c (generic_register_raw_size): New function.
* gdbarch.sh (REGISTER_RAW_SIZE): Use generic_register_raw_size as
the static default.
* gdbarch.c: Regenerate.
* arch-utils.h (generic_register_raw_size): Declare.

* config/mips/tm-mips.h (REGISTER_RAW_SIZE): Delete macro.
* mips-tdep.c (mips_register_raw_size): Make function static.
(mips_gdbarch_init): Initialize register_raw_size.
2001-12-10 04:58:31 +00:00
Jiri Smid b6af0555b5 * dwarf2cfi.c: New file.
* dwarf2cfi.h: New file.
* dwarf2read.c (dwarf_frame_offset, dwarf_frame_size): New variables.
(dwarf_eh_frame_offset, dwarf_eh_frame_size): New variables.
(dwarf2_read_section): Change to non static.
(dwarf2_locate_sections): Add .debug_frame and .eh_frame section
recognition.
(FRAME_SECTION, EH_FRAME_SECTION): New define.
* elfread.c (elf_symfile_read): Add call of frame informations build.
* frame.h (frame_info): Add pointer to unwind_context.
* symfile.h (dwarf2_build_frame_info): Add declaration.
* gdbarch.sh (DWARF2_BUILD_FRAME_INFO): Add.
* gdbarch.h, gdbarch.c: Regenerate.
* Makefile.in: Add dwarf2cfi_h, dwarf2cfi.o
* x86-64-tdep.c (i386_gdbarch_init): Initialize target vector to
use debug frame info.
2001-12-07 12:10:15 +00:00
Andrew Cagney 31e9866ea6 Expand the regcache so that there is space for pseudo-registers. 2001-12-06 20:49:47 +00:00
Tom Tromey 552c04a742 Fix for PR gdb/209, PR gdb/156:
* gdbarch.c, gdbarch.h: Rebuilt.
	* gdbarch.sh: Added `construct_inferior_arguments'.
	* cli/cli-decode.h (cmd_list_element): Added pre_show_hook.
	Typo fix.
	* cli/cli-setshow.c (do_setshow_command): Call the pre_show_hook.
	* infcmd.c (_initialize_infcmd): Set sfunc on `set args' command.
	(inferior_argc, inferior_argv): New globals.
	(notice_args_set): New function.
	(set_inferior_args): Clear inferior_argc and inferior_argv.
	(set_inferior_args_vector): New function.
	(get_inferior_args): Handle inferior argument vector.
	(run_command): Use get_inferior_args().
	(notice_args_read): New function.
	(_initialize_infcmd): Don't call set_inferior_args.
	* command.h: Typo fix.
	(cmd_list_element): Added pre_show_hook.
	* main.c (captured_main): Added --args option.
	(print_gdb_help): Document --args.
	* inferior.h (construct_inferior_arguments): Declare.
	(set_inferior_args_vector): Likewise.
	* fork-child.c (construct_inferior_arguments): New function.
2001-11-22 00:23:13 +00:00
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