aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
AgeCommit message (Collapse)AuthorFilesLines
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
2000-08-11Rename gdbarch_update() to gdbarch_update_p()Andrew Cagney1-1/+1
2000-08-04Missing GDBARCH updates for EXTRA_STACK_ALIGNMENT needed.Andrew Cagney1-0/+30
2000-08-02* gdbarch.sh: Add print_p field for CALL_DUMMY_BREAKPINT_OFFSETJimmy Guo1-3/+4
to be printed only if CALL_DUMMY_BREAKPOINT_OFFSET_P. * gdbarch.c: Regenerated.
2000-08-02Multi-arch REGISTER_SIM_REGNO. Update d10v.Andrew Cagney1-3/+36
2000-08-012000-08-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>Elena Zannoni1-2/+38
* gdbarch.sh: Multiarch DO_REGISTERS_INFO macro. * gdbarch.h, gdbarch.c: Regenerate. * infcmd.c (do_registers_info): Make not static and unconditionalize. * inferior.h (do_registers_info): Export.
2000-07-30Protoization.Kevin Buettner1-3/+2
2000-07-27Move GDB_MULTI_ARCH selection to configure*. Makes tm.h optional.Andrew Cagney1-1/+1
2000-07-242000-07-24 Elena Zannoni <ezannoni@kwikemart.cygnus.com>Elena Zannoni1-0/+68
* gdbarch.sh: Add FETCH_PSEUDO_REGISTER and STORE_PSEUDO_REGISTER to the gdbarch structure. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. * inferior.h (FETCH_PSEUDO_REGISTER, STORE_PSEUDO_REGISTER): Delete macros. * regcache.c (write_register, read_register, write_register_bytes, write_register_gen, read_register_bytes, read_register_gen): Rename ARCH_FECTH_PSEUDO_REGISTERS to FETCH_PSEUDO_REGISTERS and ARCH_STORE_PSEUDO_REGISTER to STORE_PSEUDO_REGISTER.
2000-07-24 * gdbarch.sh: Add NUM_PSEUDO_REGS to the gdbarch structure.Elena Zannoni1-0/+29
* gdbarch.c: Regenerate. * gdbarch.h: Regenerate. * inferior.h (NUM_PSEUDO_REGS): Delete macro.
2000-06-12Don't try to dump void macros (when non multi-arch). They couldAndrew Cagney1-17/+34
contain C statements.
2000-06-10Re-implement gdbach_dump() so that it prints out the macro values.Andrew Cagney1-338/+981
Add ``maint print arch'' command. Add ``gdbarch_register()'' function that also takes gdbarch_dump_tdep(). Use in mips-tdep.c.
2000-06-07The attatched moves the remaining guff from gdbarch.{h,c,sh} toAndrew Cagney1-408/+45
arch-utils.{h,c}. The ``set architecutre'' and ``set endian'' commands (part of the move) were implemented to use add_set_enum_cmd() so that ``set architecture <tab>'' works.
2000-06-06Move generic_register_convertible_not and frame_num_args_unknown fromAndrew Cagney1-18/+0
gdbarch.* to arch-utils.*.
2000-06-04Add host_pointer_to_address() and address_to_host_pointer(). AddAndrew Cagney1-4/+4
signed_pointer_to_address() etc. Rename generic_pointer_to_address() to unsigned_pointer_to_address() etc.
2000-06-02Multiarch TARGET_FLOAT_FORMAT, TARGET_DOUBLE_FORMAT,Andrew Cagney1-0/+73
TARGET_LONG_DOUBLE_FORMAT. Update d10v.
2000-05-15Convert SAVE_DUMMY_FRAME_TOS to multi-arch.Andrew Cagney1-0/+32