aboutsummaryrefslogtreecommitdiff
path: root/gdb/arch-utils.c
AgeCommit message (Collapse)AuthorFilesLines
2002-02-06* gdbarch.sh (PRINT_FLOAT_INFO): Add rule.Richard Earnshaw1-0/+13
* gdbarch.c gdbarch.h: Regenerate. * arch-utils.c (default_print_float_info): New function. * arch-utils.h (default_print_float_info): Prototype it. * infcmd.c (float_info): Call PRINT_FLOAT_INFO. * doc/gdbint.texinfo (FLOAT_INFO): Mark as deprecated. (PRINT_FLOAT_INFO): Document it. * arm-tdep.c (arm_print_float_info): Renamed from arm_float_info. * config/arm/tm-arm.h (FLOAT_INFO): Delete. (PRINT_FLOAT_INFO): Define.
2002-02-062002-02-04 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-0/+12
* gdbarch.sh: Add definitions for COFF_MAKE_MSYMBOL_SPECIAL and ELF_MAKE_MSYMBOL_SPECIAL. * gdbarch.c, gdbarch.h: Regenerate. * arch-utils.c (default_elf_make_msymbol_special, default_coff_make_msymbol_special): New functions. * arch-utils.h (default_elf_make_msymbol_special, default_coff_make_msymbol_special): Export. * elfread.c (elf_symtab_read): Compile use of ELF_MAKE_MSYMBOL_SPECIAL unconditionally because it is now multiarched. * coffread.c (coff_symtab_read): Ditto, for COFF_MAKE_MSYMBOL_SPECIAL.
2002-02-05* cli/cli-decode.c (do_cfunc, set_cmd_cfunc): New functions.Andrew Cagney1-2/+2
(do_sfunc, set_cmd_sfunc): New functions. * command.h (struct cmd_list_element): Add field func. * cli/cli-decode.h (struct cmd_list_element): Ditto. * command.h (set_cmd_sfunc, set_cmd_cfunc): Declare. * cli/cli-decode.h: Ditto. * cli/cli-decode.c (help_cmd): Test for func not cfunc/sfunc. (help_all, help_cmd_list): Ditto. (find_cmd, complete_on_cmdlist): Ditto. * top.c (execute_command): Ditto. * cli/cli-setshow.c (do_setshow_command): Call func instead of function.sfunc. * infcmd.c (notice_args_read): Fix function signature. * cli/cli-cmds.c (init_cli_cmds): Use set_cmd_sfunc. * cli/cli-decode.c (add_set_cmd): Ditto. * utils.c (initialize_utils): Ditto. * maint.c (_initialize_maint_cmds): Ditto. * infrun.c (_initialize_infrun): Ditto. * demangle.c (_initialize_demangler): Ditto. * remote.c (add_packet_config_cmd): Ditto. * mips-tdep.c (_initialize_mips_tdep): Ditto. * cris-tdep.c (_initialize_cris_tdep): Ditto. * proc-api.c (_initialize_proc_api): Ditto. * kod.c (_initialize_kod): Ditto. * valprint.c (_initialize_valprint): Ditto. * top.c (init_main): Ditto. * infcmd.c (_initialize_infcmd): Ditto. * corefile.c (_initialize_core): Ditto. * arm-tdep.c (_initialize_arm_tdep): Ditto. * arch-utils.c (initialize_current_architecture): Ditto. (_initialize_gdbarch_utils): Ditto. * alpha-tdep.c (_initialize_alpha_tdep): Ditto. * cli/cli-decode.c (add_cmd): Use set_cmd_cfunc. * wince.c (_initialize_inftarg): Ditto. * symfile.c (_initialize_symfile): Ditto. * mips-tdep.c (_initialize_mips_tdep): Ditto. * language.c (_initialize_language): Ditto. * arc-tdep.c (_initialize_arc_tdep): Ditto.
2002-01-29* arch-utils.c (TARGET_BYTE_ORDER_DEFAULT): Delete macro.Andrew Cagney1-10/+15
(target_byte_order): Initialize to BFD_ENDIAN_BIG. (initialize_current_architecture): Update target_byte_order using information from BFD. * config/powerpc/tm-ppcle-eabi.h (TARGET_BYTE_ORDER_DEFAULT): * config/mcore/tm-mcore.h (TARGET_BYTE_ORDER_DEFAULT): * config/arm/tm-arm.h (TARGET_BYTE_ORDER_DEFAULT): Delete. Update doco.
2002-01-20Assume TARGET_BYTE_ORDER_SELECTABLE{,_P} is always true.Andrew Cagney1-45/+11
2002-01-05s/BIG_ENDIAN/BFD_ENDIAN_BIG/Andrew Cagney1-19/+19
2001-12-29* arch-utils.c (initialize_current_architecture): Test byte_orderAndrew Cagney1-3/+4
against BFD_ENDIAN_UNKNOWN. (gdbarch_info_init): Initialize byte_order to BFD_ENDIAN_UNKNOWN. * gdbarch.sh: Update comments on default value of byte_order. (verify_gdbarch, gdbarch_update_p): Test byte_order against BFD_ENDIAN_UNKNOWN. * gdbarch.h, gdbarch.c: Re-generate.
2001-12-19Add function gdbarch_info_init() replaces memset().Andrew Cagney1-5/+18
2001-12-15LITTLE_ENDIAN -> BFD_ENDIAN_LITTLEAndrew Cagney1-7/+7
2001-12-13Return typelength of register virtual type as size.Andrew Cagney1-1/+1
2001-12-112001-12-10 Michael Snyder <msnyder@redhat.com>Michael Snyder1-0/+8
* 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-10* arch-utils.c (generic_register_raw_size): New function.Andrew Cagney1-0/+11
* 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-11-29Tighten up GDB's support for returning structs by value.Jim Blandy1-0/+15
* s390-tdep.c (s390_use_struct_convention): New function. (s390_gdbarch_init): Register it as the S/390's USE_STRUCT_CONVENTION method. Register generic_cannot_extract_struct_value_address as our EXTRACT_STRUCT_VALUE_ADDRESS method. * arch-utils.c (generic_cannot_extract_struct_value_address): New function. * arch-utils.h: Add corresponding prototype.
2001-11-06 * arch-utils.c (generic_in_function_epilogue_p): New function.Corinna Vinschen1-0/+6
* 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-10-31 * arch-utils.c (generic_in_solib_call_trampoline): New function.Corinna Vinschen1-0/+6
* 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-09-052001-09-05 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-0/+7
* 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/+6
* 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/+14
* 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-06-16* arch-utils.c (init_frame_pc_default): New functionAndrew Cagney1-0/+11
* 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-15Multi-arch CANNOT_FETCH_REGISTER() and CANNOT_STORE_REGISTER().Andrew Cagney1-0/+6
2001-06-15Multi-arch INIT_FRAME_PC() and INIT_FRAME_PC_FIRST().Andrew Cagney1-0/+6
2001-06-15multi-arch ADDR_BITS_REMOVE.Andrew Cagney1-1/+1
2001-06-06* gdbarch.sh: Changes to effect the following:Jim Blandy1-0/+2
* 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* arch-utils.c (generic_prepare_to_proceed): Allow for havingJonathan Larmour1-9/+13
stopped due to a Ctrl-C as well as breakpoints. * hppa-tdep.c (hppa_prepare_to_proceed): Add FIXME as this may not support thread switches after Ctrl-C. * lin-lwp.c (lin_lwp_prepare_to_proceed): Ditto. * linux-thread.c (linuxthreads_prepare_to_proceed): Ditto. * m3-nat.c (mach3_prepare_to_proceed): Ditto.
2001-05-10Delete ``info architecture'' command.Andrew Cagney1-37/+0
2001-05-04Phase 1 of the ptid_t changes.Kevin Buettner1-5/+6
2001-04-19#include "regcache.h".Andrew Cagney1-0/+1
2001-04-062001-04-06 David Smith <dsmith@redhat.com>David Smith1-0/+55
* 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-27* arch-utils.c (#include "gdbthread.h"): Removed.J.T. Conklin1-9/+0
(#include "symfile.h"): Removed. (XMALLOC): Removed unused macro. * breakpoint.c (tbreak_command): Removed local declaration. (awatch_command, do_enable_breakpoint, set_breakpoint_count): Remove duplicate declarations. (bpstat_should_step, bpstat_have_active_hw_watchpoints) (remove_solib_event_breakpoints): Fix indentation botch. * c-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. * ch-exp.c (ch_terminal_match_float_literal, parse_expr) (parse_primval, parse_untyped_expr, parse_opt_untyped_expr): Removed duplicate declarations. * ch-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. * corefile.c (#include "frame.h"): Removed (#include "symfile.h"): Removed. (#include "language.h"): Removed. * dbxread.c (#include "command.h"): Removed. * environ.c (#include "gdbcore.h"): Removed. * event-loop.c (#include "top.h"): Removed. * f-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. (#include "language.h"): Removed. (#include "typeprint.h"): Removed. (#include "frame.h"): Removed. * gdbtypes.h (print_type_scalar): Removed declaration. * infcmd.c (#include "completer.h"): Removed. * language.c (#include "frame.h"): Removed. * m2-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. (#include "language.h"): Removed. * m2-valprint.c (#include "valprint.h"): Removed. * p-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. * p-valprint.c (#include "typeprint.h"): Removed. * parse.c (#include "linespec.h"): Removed. * regcache.c (#include "frame.h"): Removed. * remote.c (#include "frame.h"): Removed. (getpkt_sane): Make static. * source.c (#include "completer.h"): Removed. * stack.c (#include "symfile.h"): Removed. (#include "objfiles.h"): Removed. * symfile.c (#include "completer.h"): Removed. * tracepoint.c (#include "completer.h"): Removed. * values.c (#include "frame.h"): Removed. * varobj.c (#include "valprint.h"): Removed. * wrapper.c (#include "frame.h"): Removed. * memattr.c (create_mem_region): Removed unused variable. * remote-nrom.c: Removed spurious semicolon after init_nrom_ops. -------------------------------------------------------------------
2001-03-072001-03-06 J.T. Conklin <jtc@redback.com>J.T. Conklin1-1/+0
* symtab.h (decode_line_1): Removed declaration. * symfile.c (#include <assert.h>): Removed. * arch-utils.c (#include <ctype.h>): Removed. * c-typeprint.c: Likewise. * dbxread.c: Likewise. * gdbtypes.c: Likewise. * target.c: Likewise. * os9kread.c: Likewise. * c-valprint.c (#include "demangle.h"): Removed. * ch-typeprint.c: Likewise. * eval.c: Likewise. * f-typeprint.c: Likewise. * f-valprint.c: Likewise. * m2-typeprint.c: Likewise. * typeprint.c: Likewise. * p-typeprint.c: Likewise. * valarith.c: Likewise. * valprint.c: Likewise. * m2-typeprint.c (#include "gdb_string.h"): Removed. * nlmread.c: Likewise. * mdebugread.c (#include "gdb-stabs.h"): Removed. * minsyms.c: Likewise. * mipsread.c: Likewise. * nlmread.c: Likewise. * m2-typeprint.c (#include "obstack.h"): Removed. * m2-valprint.c: Likewise. * event-loop.c (#include <setjmp.h>): Removed.
2001-03-06Update/correct copyright notices.Kevin Buettner1-1/+1
2001-02-08Add __FILE__ and __LINE__ parameter to internal_error() /Andrew Cagney1-16/+31
internal_verror().
2001-01-022000-12-20 Michael Snyder <msnyder@mvstp600e.cygnus.com>Michael Snyder1-0/+7
* arch-utils.c (default_frame_address): New function. Default implementation of frame_args_address and frame_locals_address. * arch-utils.h (default_frame_address): Export. * d10v-tdep.c (d10v_gdbarch_init): Use default_frame_address. (d10v_frame_args_address, d10v_frame_locals_address): Delete. * sh-tdep.c (sh_gdbarch_init): Use default_frame_address. (sh_frame_args_address, sh_frame_locals_address): Delete. * sparc-tdep.c (sparc_gdbarch_init): Use default_frame_address. (sparc_frame_address): Delete.
2000-12-15Replace free() with xfree().Kevin Buettner1-1/+1
2000-12-04Multiarch STAB_REG_TO_REGNUM, ECOFF_REG_TO_REGNUM,Andrew Cagney1-0/+6
DWARF_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM.
2000-10-27* arch-utils.c (set_architecture, set_architecture_from_arch_mach,J.T. Conklin1-3/+3
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-26 * arch-utils.c, arch-utils.h (default_convert_from_func_ptr_addr):Peter Schauer1-0/+7
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-01spelling correction: depdendant->dependentDavid Anderson1-1/+1
2000-08-11Rename gdbarch_update() to gdbarch_update_p()Andrew Cagney1-5/+15
2000-08-02Multi-arch REGISTER_SIM_REGNO. Update d10v.Andrew Cagney1-0/+6
2000-07-30Protoization.Kevin Buettner1-12/+5
2000-06-10Re-implement gdbach_dump() so that it prints out the macro values.Andrew Cagney1-2/+2
Add ``maint print arch'' command. Add ``gdbarch_register()'' function that also takes gdbarch_dump_tdep(). Use in mips-tdep.c.
2000-06-08Use config.bfd to determine the default architecture and byte order.Andrew Cagney1-8/+82
Flush all BYTE_ORDER_DEFAULT macros from mips. Can rely on BFD's value.
2000-06-08Change signature of function add_set_enum_cmd() so that it usesAndrew Cagney1-7/+7
constant character pointers. Update everything. As a consequence fix infrun's follow-fork plugging a small memory leak.
2000-06-07The attatched moves the remaining guff from gdbarch.{h,c,sh} toAndrew Cagney1-2/+390
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-0/+17
gdbarch.* to arch-utils.*.
2000-06-02Multiarch TARGET_FLOAT_FORMAT, TARGET_DOUBLE_FORMAT,Andrew Cagney1-0/+43
TARGET_LONG_DOUBLE_FORMAT. Update d10v.
2000-05-15Move core_addr_lessthan and core_addr_greaterthan to arch-utils.Andrew Cagney1-0/+19
2000-04-29Convert SKIP_PROLOGUE_FRAMELESS_P into PROLOGUE_FRAMELESS_P.Andrew Cagney1-0/+11
2000-04-19Bring RETURN_VALUE_ON_STACK under gdbarch's control.Jim Blandy1-0/+6
* gdbarch.sh (RETURN_VALUE_ON_STACK): New entry. * gdbarch.c, gdbarch.h: Regenerated. * arch-utils.c (default_return_value_on_stack): New function. * arch-utils.h (default_return_value_on_stack): New declaration. * values.c (RETURN_VALUE_ON_STACK): Delete default definition.