aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
AgeCommit message (Collapse)AuthorFilesLines
2001-11-22 Fix for PR gdb/209, PR gdb/156:Tom Tromey1-0/+26
* 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-08When non-multi-arch, use predefault as the value of a pure-multi-archAndrew Cagney1-1/+1
method.
2001-11-07gdbarch.sh provides default for USE_STRUCT_CONVENTION.Andrew Cagney1-3/+2
2001-11-07gdbarch.sh (PC_IN_CALL_DUMMY): Require a value.Andrew Cagney1-1/+1
2001-11-06gdbarch.sh (CALL_DUMMY_LOCATION): Require a value.Andrew Cagney1-1/+1
2001-11-06Add predicate for PUSH_RETURN_ADDRESS.Andrew Cagney1-3/+7
2001-11-06 * arch-utils.c (generic_in_function_epilogue_p): New function.Corinna Vinschen1-0/+26
* 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-05Change INIT_EXTRA_FRAME_INFO() to a function with predicate.Andrew Cagney1-3/+7
2001-11-05* gdbarch.sh (verify_gdbarch): Use a mem_file to accumulate allAndrew Cagney1-98/+62
error messages. Print in a single batch. * gdbarch.c: Regenerate.
2001-10-31 * arch-utils.c (generic_in_solib_call_trampoline): New function.Corinna Vinschen1-0/+33
* 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-21Add explicit #include of "value.h".Andrew Cagney1-0/+1
2001-10-15Add INTEGER_TO_ADDRESS to hadle nasty harvard architectures that doAndrew Cagney1-0/+38
funnies to integer to address conversions.
2001-10-13From 2001-07-09 D.J. Barrow <djbarrow@de.ibm.com>:Andrew Cagney1-2/+2
* gdbarch.sh: Fixed CALL_DUMMY_BREAKPOINT_OFFSET to check CALL_DUMMY_BREAKPOINT_OFFSET_P. * gdbarch.c: Regenerate.
2001-09-30* gdbarch.sh (gdbarch_alloc): Name the new architectureAndrew Cagney1-75/+81
``current_gdbarch'' so that it, and not the identically named global is refered to by macros. * gdbarch.c: Regenerate.
2001-09-29* gdbarch.sh (gdbarch_dump): Sort output.Andrew Cagney1-1030/+842
* gdbarch.c: Regenerate.
2001-09-052001-09-05 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-0/+35
* 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-08-15 * arch-utils.c (generic_skip_trampoline_code): New function.Corinna Vinschen1-0/+35
* 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-11* target.h (TARGET_VIRTUAL_FRAME_POINTER): Delete, multi-arched.Andrew Cagney1-0/+36
* 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 * gdb-events.sh: Add architecture_changed event.Keith Seitz1-1/+4
* 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-07-10Clean up the D10V port so that GDB and the target program noJim Blandy1-204/+0
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-06-16* arch-utils.c (init_frame_pc_default): New functionAndrew Cagney1-1/+1
* 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-16regenerate gdbarch.c.Andrew Cagney1-8/+8
2001-06-15Multi-arch CANNOT_FETCH_REGISTER() and CANNOT_STORE_REGISTER().Andrew Cagney1-0/+70
2001-06-15Multi-arch INIT_FRAME_PC() and INIT_FRAME_PC_FIRST().Andrew Cagney1-0/+72
2001-06-15multi-arch ADDR_BITS_REMOVE.Andrew Cagney1-1/+36
2001-06-15* gdbarch.sh (EXTRACT_STRUCT_VALUE_ADDRESS_P): Delete definition.Andrew Cagney1-4/+7
(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-06* gdbarch.sh: Changes to effect the following:Jim Blandy1-0/+9
* 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* gdbarch.sh, gdbarch.c: Revert change of 2001-06-01; allJim Blandy1-52/+44
per-architecture data should be registered at initialization time, before any gdbarch objects get used, so the generality is unnecessary.
2001-06-02Expand the gdbarch per-architecture data vector as needed, ratherJim Blandy1-44/+52
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-05-14Fix logic selecting a new architecture. Use the sequence:Andrew Cagney1-44/+41
o provided by INFO o hard-wired by (gdb) set ... o reversed engineered from INFO.abfd o default to previous architecture
2001-05-04Phase 1 of the ptid_t changes.Kevin Buettner1-8/+8
2001-04-062001-04-06 David Smith <dsmith@redhat.com>David Smith1-0/+35
* 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-03-24* config/sparc/tm-sp64.h (GDB_MULTI_ARCH): Down grade toAndrew Cagney1-0/+41
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-24Re-vamp the register code so that a lot more is routed throughAndrew Cagney1-0/+62
{read,write}_register_gen. Hook that function with multi-arch.
2001-02-08Add __FILE__ and __LINE__ parameter to internal_error() /Andrew Cagney1-143/+286
internal_verror().
2001-02-07Addd set_gdbarch_data() method. Update register_gdbarch_data() interface.Andrew Cagney1-13/+70
2001-02-02Changed free() to xfree() where appropriate. Also changed Copyright toJohn R. Moore1-2/+2
include 2001.
2001-01-22 * gdbarch.sh (PARM_BOUNDARY): Define.Nicholas Duffek1-0/+27
* gdbarch.c: Regenerate. * gdbarch.h: Regenerate.
2000-12-15Multi-arch REGISTER_BYTES_OK.Andrew Cagney1-1/+40
2000-12-15Replace free() with xfree().Kevin Buettner1-1/+1
2000-12-04Multiarch STAB_REG_TO_REGNUM, ECOFF_REG_TO_REGNUM,Andrew Cagney1-0/+170
DWARF_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM.
2000-11-30Regenerate gdbarch.c.Andrew Cagney1-17/+17
2000-10-30* gdbarch.sh, hp-psymtab-read.c, hpread.c, m3-nat.c, mcore-tdep.c,J.T. Conklin1-2/+2
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-27* arch-utils.c (set_architecture, set_architecture_from_arch_mach,J.T. Conklin1-1/+1
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-27Corrected spelling errors in comments.David Anderson1-1/+1
gdbarch.{c,sh} removed a word from a comment.
2000-10-26 * arch-utils.c, arch-utils.h (default_convert_from_func_ptr_addr):Peter Schauer1-0/+34
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-09-01Corrected spelling error in comment: swaped -> swapped.David Anderson1-1/+1
2000-08-25Fri Aug 25 12:11:21 2000 David Taylor <taylor@texas.cygnus.com>David Taylor1-2/+33
* 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-11 * regcache.c (TARGET_WRITE_PC, TARGET_READ_PC, TARGET_READ_FP,Andrew Cagney1-18/+12
TARGET_WRITE_FP, TARGET_READ_SP, TARGET_WRITE_SP): Move initialization from here. * gdbarch.sh: To here. * gdbarch.h, gdbarch.c: Regenerate.
2000-08-11Move TARGET_*_PTR to gdbarch.h.Andrew Cagney1-96/+80