binutils-gdb/gdb/i386-sol2-tdep.c

167 lines
4.9 KiB
C
Raw Normal View History

* config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and i386bsd-tdep.o. Remove solib.o, solib-svr4.o and solib-legacy.o. Move these to ... * config/i386/i386sol2.mh: ... here. * config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Remove define. (sigtramp_saved_pc, I386V4_SIGTRAMP_SAVED_PC): Don't #undef. (SIGCONTEXT_PC_OFFSET): Remove define. (IN_SIGTRAMP): Remove define. * i386-sol2-tdep.c: New file. * config/i386/i386nw.mt (TM_FILE): Change to tm-i386.h. * config/i386/tm-i386nw.h: Removed. * config/i386/tm-fbsd.h (STAB_REG_TO_REGNUM, USE_STRUCT_CONVENTION): Remove defines. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsdaout.h (i386nbsd_aout_use_struct_convention): Remove prototype. (USE_STRUCT_CONVENTION): Remove prototype. * i386bsd-nat.c (i386bsd_sigcontext_pc_offset): Remove declaration. (_initialize_i386bsd_nat): Revise logic to determine some constants at compile time when compiling a native GDB. Warn if things don't match up with what we expect. * i386bsd-tdep.c (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove variables. (i386bsd_in_sigtramp): Rename tp i386bsd_pc_in_sigtramp. Rewrite to use date stored in `struct gdbarch_tdep'. (i386bsd_sigcontext_offset): Remove varaible. (i386bsd_sigtramp_saved_pc): Make public. Rewrite to use data stored in `struct gdbarch_tdep'. (i386bsd_frame_saved_pc): Make static. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): New functions. (i386bsd_sc_pc_offset, i386nbsd_sc_pc_offset, i386fbsd_sigtramp_start, i386fbsd_sigtramp_end, i386fbsd4_sc_pc_offset): New variables. (i386bsd_init_abi, i386nbsd_init_abi, i386nbsdelf_init_abi, i386fbsdaout_init_abi, i386fbsd_init_abi, i386fbsd4_init_abi): New functions. (i386bsd_aout_osabi_sniffer, _initialize_i386bsd_tdep): New functions. * i386fbsd-nat.c (_initialize_i386fbsd_nat): Fix type in comment. Modify the value of i386fbsd_sigtramp_start and i386fbsd_sigtramp_end instead of i386bsd_sigtramp_start and i386fbsd_sigtramp_end. * i386nbsd-tdep.c: (i386nbsd_aout_use_struct_convention): Remove function. * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Move define to i386-linux-tdep.h. (NUM_REGS, MAX_NUM_REGS, REGISTER_BYTES, REGISTER_NAME, REGISTER_BYTE, REGISTER_RAW_SIZE, STAB_REG_TO_REGNUM): Remove defines. (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size): Remove prototypes. (i386_linux_svr4_fetch_link_map_offsets): Remove prototype. (SVR4_FETCH_LINK_MAP_OFFSETS): Remove define. (IN_SIGTRAMP, FRAME_CHAIN, FRAME_SAVED_PC, SAVED_PC_AFTER_CALL, TARGET_WRITE_PC): Remove defines. (i386_linux_in_sigtramp, i386_linux_frame_chain, i386_linux_frame_saved_pc, i386_linux_saved_pc_after_call, i386_linux_write_pc): Remove prototypes. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-linux-tdep.h: New file. * i386-linux-nat.c: Include "i386-linux-tdep.h". * i386-linux-tdep.c: Include "i386-tdep.h" and "i386-linux-tdep.h". (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size, i386_linux_in_sigtramp, i386_linux_write_pc, i386_linux_svr4_fetch_link_map_offsets): Make static. (i386_linux_init_abi): New function. (_initialize_i386_linux_tdep): New function. * config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Remove define. (i386_saved_pc_after_call): Remove prototype. (MAX_NUM_REGS): Increase to deal with Linux's orig_eax "register". (REGISTER_NAME, STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Remove defines. (i386_register_name, i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum): Remove prototypes. (SIZEOF_GREGS, SIZEOF_FPU_REGS, SIZEOF_FPU_CTL_REGS, SIZEOF_SSE_REGS): Remove defines. (REGISTER_BYTES): Remove define. (REGISTER_BYTE, REGISTER_RAW_SIZE): Remove defines. (i386_register_byte, i386_register_raw_size): Remove prototypes. (FRAME_CHAIN, FRAME_SAVED_PC): Remove defines. (i386_frame_chain, i386_frame_saved_pc): Remove prototypes. * config/i386/tm-i386v4.h (FRAME_CHAIN_VALID): Remove define. (JB_ELEMENT_SIZE, JB_PC, JB_EBX, JB_ESI, JB_EDI, JB_EBP, JB_ESP, JB_EDX, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP): Remove defines. (sigtramp_saved_pc): Remove define. (i386v4_sigtramp_saved_pc): Remove prototype. * config/i386/tm-go32.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): Remove defines. (i386go32_frame_saved_pc): Remove prototype. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-tdep.h: Include "osabi.h". (enum i386_abi): Removed. (enum struct_return): New enum. (struct gdbarch_tdep): Remove abi member, add osabi, jb_pc_offset, struct_return, sigtramp_saved_pc, sigtramp_start, sigtramp_end and sc_pc_offset members. (i386_gdbarch_register_os_abi): Remove prototype. (I386_NUM_GREGS, I386_NUM_FREGS, I386_NUM_XREGS, I386_SSE_NUM_REGS): New defines. (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS, I386_SSE_SIZEOF_REGS): New defines. (i386_register_name, i386_register_byte, i386_register_raw_size): New prototypes. (i386_elf_init_abi, i386_svr4_init_abi): New prototypes. (i386bsd_sigtramp_saved_pc): New prototype. * i386-tdep.c: Don't include "elf-bfd.h". (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum, i386_frame_chain, i386_saved_pc_after_call): Make static. (i386_frame_saved_pc): Rewrite to call architecture dependent function to deal with signal handlers. Make static. (i386go32_frame_saved_pc): Removed. [GET_LONGJMP_TARGET] (JB_PC, JB_ELEMENT_SIZE, get_longjmp_target): Removed. (i386_get_longjmp_target): New function. (default_struct_convention, pcc_struct_convention, reg_struct_convention, valid_conventions, struct_convention): New variables. (i386_use_struct_convention): New function. (i386v4_sigtramp_saved_pc): Renamed to i386_svr4_sigtramp_saved_pc. Made static. Moved. (i386_pc_in_sigtramp): New function. (i386_abi_names): Removed. (ABI_TAG_OS_GNU_LINUX, ABI_TAG_OS_GNU_HURD, ABI_TAG_OS_GNU_SOLARIS, ABI_TAG_OS_FREEBSD, ABI_TAG_OS_NETBSD): Removed. (process_note_sections, i386_elf_abi_from_note, i386_elf_abi, i386_gdbarch_register_os_abi): Removed. (struct i386_abi_handler): Removed. (i386_abi_handler_list): Removed. (i386_svr4_pc_in_sigtramp, i386_go32_pc_in_sigtramp): New functions. (i386_elf_init_abi, i386_svr4_init_abi, i386_go32_init_abi, i386_nw_init_abi): New functions. (i386_gdbarch_init): Rewritten to use generic OS ABI framework. Use set_gdbarch_xxx() calls instead of relying on macros for a number of calls. (i386_coff_osabi_sniffer, i386_nlm_osabi_sniffer): New functions. (_initialize_i386_tdep): Add new 'struct-convcention' command. Register the various architecture variants defined in this file.
2002-06-14 21:42:20 +02:00
/* Target-dependent code for Solaris x86.
* amd64-tdep.c (amd64_sigtramp_frame_sniffer): Rewrite to use new sigtramp_p member of `struct gdbarch_tdep'. Also check whether the program counter is in the range specified by `struct gdbarch_tdep'. * amd64-linux-tdep.c: Include "symtab.h". (amd64_linux_pc_in_sigtramp): Remove function. (amd64_linux_sigtramp_p): New function. (amd64_linux_init_abi): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * amd64nbsd-tdep.c: Include "symtab.h". (amd64nbsd_sigtramp_p): New function. (amd64nbsd_init_abi): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * amd64obsd-tdep.c: Include "symtab.h" and "objfiles.h". Add a few comments. (amd64obsd_pc_in_sigtramp): Remove function. (amd64obsd_sigtramp_p): New function. (amd64obsd_init_abi): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * i386-tdep.h (struct gdbarch_tdep): Add sigtramp_p member. (i386bsd_pc_ins_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove prototypes. * i386-tdep.c (i386_sigtramp_frame_sniffer): Rewrite to use new sigtramp_p member of `struct gdbarch_tdep'. Also check whether the program counter is in the range specified by `struct gdbarch_tdep'. (i386_pc_in_sigtramp, i386_svr4_pc_in_sigtramp): Remove functions. (i386_sigtramp_p, i386_svr4_sigtramp_p): New functions. (i386_go32_pc_in_sigtramp): Remove function. (i386_svr4_init_abi): Don't set deprecated_pc_in_sigtramp. Initialize TDEP->sigtramp_p. (i386_go32_init_abi): Initialize TDEP->sigtramp_p to NULL. (i386_gdbarch_init): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * i386-linux-tdep.c: Adjust comments. (i386_linux_pc_in_sigtramp): Remove function. (i386_linux_sigtramp_p): New function. (i386_linux_init_abi): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * i386-nto-tdep.c: Update copyright year. (i386nto_pc_in_sigtramp): Remove function. (i386nto_sigtramp_p): New function. (i386nto_sigcontext_addr): Use I386_ESP_REGNUM instead of SP_REGNUM. (i386nto_init_abi): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * i386-sol2-tdep.c: Update copyright year. (i386_sol2_pc_in_sigtramp): Remove function. (i386_sol2_sigtramp_p): New function. (i386_sol2_init_abi): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * i386bsd-tdep.c (i386bsd_pc_in_sigtramp): Remove function. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove functions. (i386bsd_init_abi): Don't set deprecated_pc_in_sigtramp, deprecated_sigtramp_start and deprecated_sigtramp_end. * i386nbsd-tdep.c: Include "frame.h" and "symtab.h". (i386nbsd_pc_in_sigtramp): Remove function. (i386nbsd_sigtramp_p): New function. (i386nbsd_init_abi): Don't set deprecated_pc_in_sigtramp, deprecated_sigtramp_start, deprecated_sigtramp_end. Initialize TDEP->sigtramp_start, TDEP->sigtramp_end and TDEP->sigtramp_p. * i386obsd-tdep.c: Include "frame.h", "symtab.h" and "objfiles.h". (i386obsd_pc_in_sigtramp): Remove function. (i386obsd_sigtramp_p): New function. (i386obsd_sigtramp_start, i386obsd_sigtramp_end): Remove functions. (i386bsd_init_abi): Don't set deprecated_pc_in_sigtramp, deprecated_sigtramp_start, deprecated_sigtramp_end. Initialize TDEP->sigtramp_p. * Makefile.in (amd64-linux-tdep.o, amd64nbsd-tdep.o, amd64obsd-tdep.o, i386nbsd-tdep.o, i386obsd-tdep.o): Update dependencies.
2004-04-09 18:28:50 +02:00
Copyright (C) 2002-2013 Free Software Foundation, Inc.
* config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and i386bsd-tdep.o. Remove solib.o, solib-svr4.o and solib-legacy.o. Move these to ... * config/i386/i386sol2.mh: ... here. * config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Remove define. (sigtramp_saved_pc, I386V4_SIGTRAMP_SAVED_PC): Don't #undef. (SIGCONTEXT_PC_OFFSET): Remove define. (IN_SIGTRAMP): Remove define. * i386-sol2-tdep.c: New file. * config/i386/i386nw.mt (TM_FILE): Change to tm-i386.h. * config/i386/tm-i386nw.h: Removed. * config/i386/tm-fbsd.h (STAB_REG_TO_REGNUM, USE_STRUCT_CONVENTION): Remove defines. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsdaout.h (i386nbsd_aout_use_struct_convention): Remove prototype. (USE_STRUCT_CONVENTION): Remove prototype. * i386bsd-nat.c (i386bsd_sigcontext_pc_offset): Remove declaration. (_initialize_i386bsd_nat): Revise logic to determine some constants at compile time when compiling a native GDB. Warn if things don't match up with what we expect. * i386bsd-tdep.c (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove variables. (i386bsd_in_sigtramp): Rename tp i386bsd_pc_in_sigtramp. Rewrite to use date stored in `struct gdbarch_tdep'. (i386bsd_sigcontext_offset): Remove varaible. (i386bsd_sigtramp_saved_pc): Make public. Rewrite to use data stored in `struct gdbarch_tdep'. (i386bsd_frame_saved_pc): Make static. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): New functions. (i386bsd_sc_pc_offset, i386nbsd_sc_pc_offset, i386fbsd_sigtramp_start, i386fbsd_sigtramp_end, i386fbsd4_sc_pc_offset): New variables. (i386bsd_init_abi, i386nbsd_init_abi, i386nbsdelf_init_abi, i386fbsdaout_init_abi, i386fbsd_init_abi, i386fbsd4_init_abi): New functions. (i386bsd_aout_osabi_sniffer, _initialize_i386bsd_tdep): New functions. * i386fbsd-nat.c (_initialize_i386fbsd_nat): Fix type in comment. Modify the value of i386fbsd_sigtramp_start and i386fbsd_sigtramp_end instead of i386bsd_sigtramp_start and i386fbsd_sigtramp_end. * i386nbsd-tdep.c: (i386nbsd_aout_use_struct_convention): Remove function. * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Move define to i386-linux-tdep.h. (NUM_REGS, MAX_NUM_REGS, REGISTER_BYTES, REGISTER_NAME, REGISTER_BYTE, REGISTER_RAW_SIZE, STAB_REG_TO_REGNUM): Remove defines. (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size): Remove prototypes. (i386_linux_svr4_fetch_link_map_offsets): Remove prototype. (SVR4_FETCH_LINK_MAP_OFFSETS): Remove define. (IN_SIGTRAMP, FRAME_CHAIN, FRAME_SAVED_PC, SAVED_PC_AFTER_CALL, TARGET_WRITE_PC): Remove defines. (i386_linux_in_sigtramp, i386_linux_frame_chain, i386_linux_frame_saved_pc, i386_linux_saved_pc_after_call, i386_linux_write_pc): Remove prototypes. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-linux-tdep.h: New file. * i386-linux-nat.c: Include "i386-linux-tdep.h". * i386-linux-tdep.c: Include "i386-tdep.h" and "i386-linux-tdep.h". (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size, i386_linux_in_sigtramp, i386_linux_write_pc, i386_linux_svr4_fetch_link_map_offsets): Make static. (i386_linux_init_abi): New function. (_initialize_i386_linux_tdep): New function. * config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Remove define. (i386_saved_pc_after_call): Remove prototype. (MAX_NUM_REGS): Increase to deal with Linux's orig_eax "register". (REGISTER_NAME, STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Remove defines. (i386_register_name, i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum): Remove prototypes. (SIZEOF_GREGS, SIZEOF_FPU_REGS, SIZEOF_FPU_CTL_REGS, SIZEOF_SSE_REGS): Remove defines. (REGISTER_BYTES): Remove define. (REGISTER_BYTE, REGISTER_RAW_SIZE): Remove defines. (i386_register_byte, i386_register_raw_size): Remove prototypes. (FRAME_CHAIN, FRAME_SAVED_PC): Remove defines. (i386_frame_chain, i386_frame_saved_pc): Remove prototypes. * config/i386/tm-i386v4.h (FRAME_CHAIN_VALID): Remove define. (JB_ELEMENT_SIZE, JB_PC, JB_EBX, JB_ESI, JB_EDI, JB_EBP, JB_ESP, JB_EDX, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP): Remove defines. (sigtramp_saved_pc): Remove define. (i386v4_sigtramp_saved_pc): Remove prototype. * config/i386/tm-go32.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): Remove defines. (i386go32_frame_saved_pc): Remove prototype. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-tdep.h: Include "osabi.h". (enum i386_abi): Removed. (enum struct_return): New enum. (struct gdbarch_tdep): Remove abi member, add osabi, jb_pc_offset, struct_return, sigtramp_saved_pc, sigtramp_start, sigtramp_end and sc_pc_offset members. (i386_gdbarch_register_os_abi): Remove prototype. (I386_NUM_GREGS, I386_NUM_FREGS, I386_NUM_XREGS, I386_SSE_NUM_REGS): New defines. (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS, I386_SSE_SIZEOF_REGS): New defines. (i386_register_name, i386_register_byte, i386_register_raw_size): New prototypes. (i386_elf_init_abi, i386_svr4_init_abi): New prototypes. (i386bsd_sigtramp_saved_pc): New prototype. * i386-tdep.c: Don't include "elf-bfd.h". (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum, i386_frame_chain, i386_saved_pc_after_call): Make static. (i386_frame_saved_pc): Rewrite to call architecture dependent function to deal with signal handlers. Make static. (i386go32_frame_saved_pc): Removed. [GET_LONGJMP_TARGET] (JB_PC, JB_ELEMENT_SIZE, get_longjmp_target): Removed. (i386_get_longjmp_target): New function. (default_struct_convention, pcc_struct_convention, reg_struct_convention, valid_conventions, struct_convention): New variables. (i386_use_struct_convention): New function. (i386v4_sigtramp_saved_pc): Renamed to i386_svr4_sigtramp_saved_pc. Made static. Moved. (i386_pc_in_sigtramp): New function. (i386_abi_names): Removed. (ABI_TAG_OS_GNU_LINUX, ABI_TAG_OS_GNU_HURD, ABI_TAG_OS_GNU_SOLARIS, ABI_TAG_OS_FREEBSD, ABI_TAG_OS_NETBSD): Removed. (process_note_sections, i386_elf_abi_from_note, i386_elf_abi, i386_gdbarch_register_os_abi): Removed. (struct i386_abi_handler): Removed. (i386_abi_handler_list): Removed. (i386_svr4_pc_in_sigtramp, i386_go32_pc_in_sigtramp): New functions. (i386_elf_init_abi, i386_svr4_init_abi, i386_go32_init_abi, i386_nw_init_abi): New functions. (i386_gdbarch_init): Rewritten to use generic OS ABI framework. Use set_gdbarch_xxx() calls instead of relying on macros for a number of calls. (i386_coff_osabi_sniffer, i386_nlm_osabi_sniffer): New functions. (_initialize_i386_tdep): Add new 'struct-convcention' command. Register the various architecture variants defined in this file.
2002-06-14 21:42:20 +02:00
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
* config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and i386bsd-tdep.o. Remove solib.o, solib-svr4.o and solib-legacy.o. Move these to ... * config/i386/i386sol2.mh: ... here. * config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Remove define. (sigtramp_saved_pc, I386V4_SIGTRAMP_SAVED_PC): Don't #undef. (SIGCONTEXT_PC_OFFSET): Remove define. (IN_SIGTRAMP): Remove define. * i386-sol2-tdep.c: New file. * config/i386/i386nw.mt (TM_FILE): Change to tm-i386.h. * config/i386/tm-i386nw.h: Removed. * config/i386/tm-fbsd.h (STAB_REG_TO_REGNUM, USE_STRUCT_CONVENTION): Remove defines. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsdaout.h (i386nbsd_aout_use_struct_convention): Remove prototype. (USE_STRUCT_CONVENTION): Remove prototype. * i386bsd-nat.c (i386bsd_sigcontext_pc_offset): Remove declaration. (_initialize_i386bsd_nat): Revise logic to determine some constants at compile time when compiling a native GDB. Warn if things don't match up with what we expect. * i386bsd-tdep.c (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove variables. (i386bsd_in_sigtramp): Rename tp i386bsd_pc_in_sigtramp. Rewrite to use date stored in `struct gdbarch_tdep'. (i386bsd_sigcontext_offset): Remove varaible. (i386bsd_sigtramp_saved_pc): Make public. Rewrite to use data stored in `struct gdbarch_tdep'. (i386bsd_frame_saved_pc): Make static. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): New functions. (i386bsd_sc_pc_offset, i386nbsd_sc_pc_offset, i386fbsd_sigtramp_start, i386fbsd_sigtramp_end, i386fbsd4_sc_pc_offset): New variables. (i386bsd_init_abi, i386nbsd_init_abi, i386nbsdelf_init_abi, i386fbsdaout_init_abi, i386fbsd_init_abi, i386fbsd4_init_abi): New functions. (i386bsd_aout_osabi_sniffer, _initialize_i386bsd_tdep): New functions. * i386fbsd-nat.c (_initialize_i386fbsd_nat): Fix type in comment. Modify the value of i386fbsd_sigtramp_start and i386fbsd_sigtramp_end instead of i386bsd_sigtramp_start and i386fbsd_sigtramp_end. * i386nbsd-tdep.c: (i386nbsd_aout_use_struct_convention): Remove function. * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Move define to i386-linux-tdep.h. (NUM_REGS, MAX_NUM_REGS, REGISTER_BYTES, REGISTER_NAME, REGISTER_BYTE, REGISTER_RAW_SIZE, STAB_REG_TO_REGNUM): Remove defines. (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size): Remove prototypes. (i386_linux_svr4_fetch_link_map_offsets): Remove prototype. (SVR4_FETCH_LINK_MAP_OFFSETS): Remove define. (IN_SIGTRAMP, FRAME_CHAIN, FRAME_SAVED_PC, SAVED_PC_AFTER_CALL, TARGET_WRITE_PC): Remove defines. (i386_linux_in_sigtramp, i386_linux_frame_chain, i386_linux_frame_saved_pc, i386_linux_saved_pc_after_call, i386_linux_write_pc): Remove prototypes. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-linux-tdep.h: New file. * i386-linux-nat.c: Include "i386-linux-tdep.h". * i386-linux-tdep.c: Include "i386-tdep.h" and "i386-linux-tdep.h". (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size, i386_linux_in_sigtramp, i386_linux_write_pc, i386_linux_svr4_fetch_link_map_offsets): Make static. (i386_linux_init_abi): New function. (_initialize_i386_linux_tdep): New function. * config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Remove define. (i386_saved_pc_after_call): Remove prototype. (MAX_NUM_REGS): Increase to deal with Linux's orig_eax "register". (REGISTER_NAME, STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Remove defines. (i386_register_name, i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum): Remove prototypes. (SIZEOF_GREGS, SIZEOF_FPU_REGS, SIZEOF_FPU_CTL_REGS, SIZEOF_SSE_REGS): Remove defines. (REGISTER_BYTES): Remove define. (REGISTER_BYTE, REGISTER_RAW_SIZE): Remove defines. (i386_register_byte, i386_register_raw_size): Remove prototypes. (FRAME_CHAIN, FRAME_SAVED_PC): Remove defines. (i386_frame_chain, i386_frame_saved_pc): Remove prototypes. * config/i386/tm-i386v4.h (FRAME_CHAIN_VALID): Remove define. (JB_ELEMENT_SIZE, JB_PC, JB_EBX, JB_ESI, JB_EDI, JB_EBP, JB_ESP, JB_EDX, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP): Remove defines. (sigtramp_saved_pc): Remove define. (i386v4_sigtramp_saved_pc): Remove prototype. * config/i386/tm-go32.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): Remove defines. (i386go32_frame_saved_pc): Remove prototype. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-tdep.h: Include "osabi.h". (enum i386_abi): Removed. (enum struct_return): New enum. (struct gdbarch_tdep): Remove abi member, add osabi, jb_pc_offset, struct_return, sigtramp_saved_pc, sigtramp_start, sigtramp_end and sc_pc_offset members. (i386_gdbarch_register_os_abi): Remove prototype. (I386_NUM_GREGS, I386_NUM_FREGS, I386_NUM_XREGS, I386_SSE_NUM_REGS): New defines. (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS, I386_SSE_SIZEOF_REGS): New defines. (i386_register_name, i386_register_byte, i386_register_raw_size): New prototypes. (i386_elf_init_abi, i386_svr4_init_abi): New prototypes. (i386bsd_sigtramp_saved_pc): New prototype. * i386-tdep.c: Don't include "elf-bfd.h". (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum, i386_frame_chain, i386_saved_pc_after_call): Make static. (i386_frame_saved_pc): Rewrite to call architecture dependent function to deal with signal handlers. Make static. (i386go32_frame_saved_pc): Removed. [GET_LONGJMP_TARGET] (JB_PC, JB_ELEMENT_SIZE, get_longjmp_target): Removed. (i386_get_longjmp_target): New function. (default_struct_convention, pcc_struct_convention, reg_struct_convention, valid_conventions, struct_convention): New variables. (i386_use_struct_convention): New function. (i386v4_sigtramp_saved_pc): Renamed to i386_svr4_sigtramp_saved_pc. Made static. Moved. (i386_pc_in_sigtramp): New function. (i386_abi_names): Removed. (ABI_TAG_OS_GNU_LINUX, ABI_TAG_OS_GNU_HURD, ABI_TAG_OS_GNU_SOLARIS, ABI_TAG_OS_FREEBSD, ABI_TAG_OS_NETBSD): Removed. (process_note_sections, i386_elf_abi_from_note, i386_elf_abi, i386_gdbarch_register_os_abi): Removed. (struct i386_abi_handler): Removed. (i386_abi_handler_list): Removed. (i386_svr4_pc_in_sigtramp, i386_go32_pc_in_sigtramp): New functions. (i386_elf_init_abi, i386_svr4_init_abi, i386_go32_init_abi, i386_nw_init_abi): New functions. (i386_gdbarch_init): Rewritten to use generic OS ABI framework. Use set_gdbarch_xxx() calls instead of relying on macros for a number of calls. (i386_coff_osabi_sniffer, i386_nlm_osabi_sniffer): New functions. (_initialize_i386_tdep): Add new 'struct-convcention' command. Register the various architecture variants defined in this file.
2002-06-14 21:42:20 +02:00
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
* config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and i386bsd-tdep.o. Remove solib.o, solib-svr4.o and solib-legacy.o. Move these to ... * config/i386/i386sol2.mh: ... here. * config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Remove define. (sigtramp_saved_pc, I386V4_SIGTRAMP_SAVED_PC): Don't #undef. (SIGCONTEXT_PC_OFFSET): Remove define. (IN_SIGTRAMP): Remove define. * i386-sol2-tdep.c: New file. * config/i386/i386nw.mt (TM_FILE): Change to tm-i386.h. * config/i386/tm-i386nw.h: Removed. * config/i386/tm-fbsd.h (STAB_REG_TO_REGNUM, USE_STRUCT_CONVENTION): Remove defines. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsdaout.h (i386nbsd_aout_use_struct_convention): Remove prototype. (USE_STRUCT_CONVENTION): Remove prototype. * i386bsd-nat.c (i386bsd_sigcontext_pc_offset): Remove declaration. (_initialize_i386bsd_nat): Revise logic to determine some constants at compile time when compiling a native GDB. Warn if things don't match up with what we expect. * i386bsd-tdep.c (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove variables. (i386bsd_in_sigtramp): Rename tp i386bsd_pc_in_sigtramp. Rewrite to use date stored in `struct gdbarch_tdep'. (i386bsd_sigcontext_offset): Remove varaible. (i386bsd_sigtramp_saved_pc): Make public. Rewrite to use data stored in `struct gdbarch_tdep'. (i386bsd_frame_saved_pc): Make static. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): New functions. (i386bsd_sc_pc_offset, i386nbsd_sc_pc_offset, i386fbsd_sigtramp_start, i386fbsd_sigtramp_end, i386fbsd4_sc_pc_offset): New variables. (i386bsd_init_abi, i386nbsd_init_abi, i386nbsdelf_init_abi, i386fbsdaout_init_abi, i386fbsd_init_abi, i386fbsd4_init_abi): New functions. (i386bsd_aout_osabi_sniffer, _initialize_i386bsd_tdep): New functions. * i386fbsd-nat.c (_initialize_i386fbsd_nat): Fix type in comment. Modify the value of i386fbsd_sigtramp_start and i386fbsd_sigtramp_end instead of i386bsd_sigtramp_start and i386fbsd_sigtramp_end. * i386nbsd-tdep.c: (i386nbsd_aout_use_struct_convention): Remove function. * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Move define to i386-linux-tdep.h. (NUM_REGS, MAX_NUM_REGS, REGISTER_BYTES, REGISTER_NAME, REGISTER_BYTE, REGISTER_RAW_SIZE, STAB_REG_TO_REGNUM): Remove defines. (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size): Remove prototypes. (i386_linux_svr4_fetch_link_map_offsets): Remove prototype. (SVR4_FETCH_LINK_MAP_OFFSETS): Remove define. (IN_SIGTRAMP, FRAME_CHAIN, FRAME_SAVED_PC, SAVED_PC_AFTER_CALL, TARGET_WRITE_PC): Remove defines. (i386_linux_in_sigtramp, i386_linux_frame_chain, i386_linux_frame_saved_pc, i386_linux_saved_pc_after_call, i386_linux_write_pc): Remove prototypes. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-linux-tdep.h: New file. * i386-linux-nat.c: Include "i386-linux-tdep.h". * i386-linux-tdep.c: Include "i386-tdep.h" and "i386-linux-tdep.h". (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size, i386_linux_in_sigtramp, i386_linux_write_pc, i386_linux_svr4_fetch_link_map_offsets): Make static. (i386_linux_init_abi): New function. (_initialize_i386_linux_tdep): New function. * config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Remove define. (i386_saved_pc_after_call): Remove prototype. (MAX_NUM_REGS): Increase to deal with Linux's orig_eax "register". (REGISTER_NAME, STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Remove defines. (i386_register_name, i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum): Remove prototypes. (SIZEOF_GREGS, SIZEOF_FPU_REGS, SIZEOF_FPU_CTL_REGS, SIZEOF_SSE_REGS): Remove defines. (REGISTER_BYTES): Remove define. (REGISTER_BYTE, REGISTER_RAW_SIZE): Remove defines. (i386_register_byte, i386_register_raw_size): Remove prototypes. (FRAME_CHAIN, FRAME_SAVED_PC): Remove defines. (i386_frame_chain, i386_frame_saved_pc): Remove prototypes. * config/i386/tm-i386v4.h (FRAME_CHAIN_VALID): Remove define. (JB_ELEMENT_SIZE, JB_PC, JB_EBX, JB_ESI, JB_EDI, JB_EBP, JB_ESP, JB_EDX, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP): Remove defines. (sigtramp_saved_pc): Remove define. (i386v4_sigtramp_saved_pc): Remove prototype. * config/i386/tm-go32.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): Remove defines. (i386go32_frame_saved_pc): Remove prototype. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-tdep.h: Include "osabi.h". (enum i386_abi): Removed. (enum struct_return): New enum. (struct gdbarch_tdep): Remove abi member, add osabi, jb_pc_offset, struct_return, sigtramp_saved_pc, sigtramp_start, sigtramp_end and sc_pc_offset members. (i386_gdbarch_register_os_abi): Remove prototype. (I386_NUM_GREGS, I386_NUM_FREGS, I386_NUM_XREGS, I386_SSE_NUM_REGS): New defines. (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS, I386_SSE_SIZEOF_REGS): New defines. (i386_register_name, i386_register_byte, i386_register_raw_size): New prototypes. (i386_elf_init_abi, i386_svr4_init_abi): New prototypes. (i386bsd_sigtramp_saved_pc): New prototype. * i386-tdep.c: Don't include "elf-bfd.h". (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum, i386_frame_chain, i386_saved_pc_after_call): Make static. (i386_frame_saved_pc): Rewrite to call architecture dependent function to deal with signal handlers. Make static. (i386go32_frame_saved_pc): Removed. [GET_LONGJMP_TARGET] (JB_PC, JB_ELEMENT_SIZE, get_longjmp_target): Removed. (i386_get_longjmp_target): New function. (default_struct_convention, pcc_struct_convention, reg_struct_convention, valid_conventions, struct_convention): New variables. (i386_use_struct_convention): New function. (i386v4_sigtramp_saved_pc): Renamed to i386_svr4_sigtramp_saved_pc. Made static. Moved. (i386_pc_in_sigtramp): New function. (i386_abi_names): Removed. (ABI_TAG_OS_GNU_LINUX, ABI_TAG_OS_GNU_HURD, ABI_TAG_OS_GNU_SOLARIS, ABI_TAG_OS_FREEBSD, ABI_TAG_OS_NETBSD): Removed. (process_note_sections, i386_elf_abi_from_note, i386_elf_abi, i386_gdbarch_register_os_abi): Removed. (struct i386_abi_handler): Removed. (i386_abi_handler_list): Removed. (i386_svr4_pc_in_sigtramp, i386_go32_pc_in_sigtramp): New functions. (i386_elf_init_abi, i386_svr4_init_abi, i386_go32_init_abi, i386_nw_init_abi): New functions. (i386_gdbarch_init): Rewritten to use generic OS ABI framework. Use set_gdbarch_xxx() calls instead of relying on macros for a number of calls. (i386_coff_osabi_sniffer, i386_nlm_osabi_sniffer): New functions. (_initialize_i386_tdep): Add new 'struct-convcention' command. Register the various architecture variants defined in this file.
2002-06-14 21:42:20 +02:00
#include "defs.h"
#include "value.h"
#include "osabi.h"
* config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and i386bsd-tdep.o. Remove solib.o, solib-svr4.o and solib-legacy.o. Move these to ... * config/i386/i386sol2.mh: ... here. * config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Remove define. (sigtramp_saved_pc, I386V4_SIGTRAMP_SAVED_PC): Don't #undef. (SIGCONTEXT_PC_OFFSET): Remove define. (IN_SIGTRAMP): Remove define. * i386-sol2-tdep.c: New file. * config/i386/i386nw.mt (TM_FILE): Change to tm-i386.h. * config/i386/tm-i386nw.h: Removed. * config/i386/tm-fbsd.h (STAB_REG_TO_REGNUM, USE_STRUCT_CONVENTION): Remove defines. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsdaout.h (i386nbsd_aout_use_struct_convention): Remove prototype. (USE_STRUCT_CONVENTION): Remove prototype. * i386bsd-nat.c (i386bsd_sigcontext_pc_offset): Remove declaration. (_initialize_i386bsd_nat): Revise logic to determine some constants at compile time when compiling a native GDB. Warn if things don't match up with what we expect. * i386bsd-tdep.c (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove variables. (i386bsd_in_sigtramp): Rename tp i386bsd_pc_in_sigtramp. Rewrite to use date stored in `struct gdbarch_tdep'. (i386bsd_sigcontext_offset): Remove varaible. (i386bsd_sigtramp_saved_pc): Make public. Rewrite to use data stored in `struct gdbarch_tdep'. (i386bsd_frame_saved_pc): Make static. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): New functions. (i386bsd_sc_pc_offset, i386nbsd_sc_pc_offset, i386fbsd_sigtramp_start, i386fbsd_sigtramp_end, i386fbsd4_sc_pc_offset): New variables. (i386bsd_init_abi, i386nbsd_init_abi, i386nbsdelf_init_abi, i386fbsdaout_init_abi, i386fbsd_init_abi, i386fbsd4_init_abi): New functions. (i386bsd_aout_osabi_sniffer, _initialize_i386bsd_tdep): New functions. * i386fbsd-nat.c (_initialize_i386fbsd_nat): Fix type in comment. Modify the value of i386fbsd_sigtramp_start and i386fbsd_sigtramp_end instead of i386bsd_sigtramp_start and i386fbsd_sigtramp_end. * i386nbsd-tdep.c: (i386nbsd_aout_use_struct_convention): Remove function. * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Move define to i386-linux-tdep.h. (NUM_REGS, MAX_NUM_REGS, REGISTER_BYTES, REGISTER_NAME, REGISTER_BYTE, REGISTER_RAW_SIZE, STAB_REG_TO_REGNUM): Remove defines. (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size): Remove prototypes. (i386_linux_svr4_fetch_link_map_offsets): Remove prototype. (SVR4_FETCH_LINK_MAP_OFFSETS): Remove define. (IN_SIGTRAMP, FRAME_CHAIN, FRAME_SAVED_PC, SAVED_PC_AFTER_CALL, TARGET_WRITE_PC): Remove defines. (i386_linux_in_sigtramp, i386_linux_frame_chain, i386_linux_frame_saved_pc, i386_linux_saved_pc_after_call, i386_linux_write_pc): Remove prototypes. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-linux-tdep.h: New file. * i386-linux-nat.c: Include "i386-linux-tdep.h". * i386-linux-tdep.c: Include "i386-tdep.h" and "i386-linux-tdep.h". (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size, i386_linux_in_sigtramp, i386_linux_write_pc, i386_linux_svr4_fetch_link_map_offsets): Make static. (i386_linux_init_abi): New function. (_initialize_i386_linux_tdep): New function. * config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Remove define. (i386_saved_pc_after_call): Remove prototype. (MAX_NUM_REGS): Increase to deal with Linux's orig_eax "register". (REGISTER_NAME, STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Remove defines. (i386_register_name, i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum): Remove prototypes. (SIZEOF_GREGS, SIZEOF_FPU_REGS, SIZEOF_FPU_CTL_REGS, SIZEOF_SSE_REGS): Remove defines. (REGISTER_BYTES): Remove define. (REGISTER_BYTE, REGISTER_RAW_SIZE): Remove defines. (i386_register_byte, i386_register_raw_size): Remove prototypes. (FRAME_CHAIN, FRAME_SAVED_PC): Remove defines. (i386_frame_chain, i386_frame_saved_pc): Remove prototypes. * config/i386/tm-i386v4.h (FRAME_CHAIN_VALID): Remove define. (JB_ELEMENT_SIZE, JB_PC, JB_EBX, JB_ESI, JB_EDI, JB_EBP, JB_ESP, JB_EDX, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP): Remove defines. (sigtramp_saved_pc): Remove define. (i386v4_sigtramp_saved_pc): Remove prototype. * config/i386/tm-go32.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): Remove defines. (i386go32_frame_saved_pc): Remove prototype. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-tdep.h: Include "osabi.h". (enum i386_abi): Removed. (enum struct_return): New enum. (struct gdbarch_tdep): Remove abi member, add osabi, jb_pc_offset, struct_return, sigtramp_saved_pc, sigtramp_start, sigtramp_end and sc_pc_offset members. (i386_gdbarch_register_os_abi): Remove prototype. (I386_NUM_GREGS, I386_NUM_FREGS, I386_NUM_XREGS, I386_SSE_NUM_REGS): New defines. (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS, I386_SSE_SIZEOF_REGS): New defines. (i386_register_name, i386_register_byte, i386_register_raw_size): New prototypes. (i386_elf_init_abi, i386_svr4_init_abi): New prototypes. (i386bsd_sigtramp_saved_pc): New prototype. * i386-tdep.c: Don't include "elf-bfd.h". (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum, i386_frame_chain, i386_saved_pc_after_call): Make static. (i386_frame_saved_pc): Rewrite to call architecture dependent function to deal with signal handlers. Make static. (i386go32_frame_saved_pc): Removed. [GET_LONGJMP_TARGET] (JB_PC, JB_ELEMENT_SIZE, get_longjmp_target): Removed. (i386_get_longjmp_target): New function. (default_struct_convention, pcc_struct_convention, reg_struct_convention, valid_conventions, struct_convention): New variables. (i386_use_struct_convention): New function. (i386v4_sigtramp_saved_pc): Renamed to i386_svr4_sigtramp_saved_pc. Made static. Moved. (i386_pc_in_sigtramp): New function. (i386_abi_names): Removed. (ABI_TAG_OS_GNU_LINUX, ABI_TAG_OS_GNU_HURD, ABI_TAG_OS_GNU_SOLARIS, ABI_TAG_OS_FREEBSD, ABI_TAG_OS_NETBSD): Removed. (process_note_sections, i386_elf_abi_from_note, i386_elf_abi, i386_gdbarch_register_os_abi): Removed. (struct i386_abi_handler): Removed. (i386_abi_handler_list): Removed. (i386_svr4_pc_in_sigtramp, i386_go32_pc_in_sigtramp): New functions. (i386_elf_init_abi, i386_svr4_init_abi, i386_go32_init_abi, i386_nw_init_abi): New functions. (i386_gdbarch_init): Rewritten to use generic OS ABI framework. Use set_gdbarch_xxx() calls instead of relying on macros for a number of calls. (i386_coff_osabi_sniffer, i386_nlm_osabi_sniffer): New functions. (_initialize_i386_tdep): Add new 'struct-convcention' command. Register the various architecture variants defined in this file.
2002-06-14 21:42:20 +02:00
remove gdb_string.h This removes gdb_string.h. This patch is purely mechanical. I created it by running the two commands: git rm common/gdb_string.h perl -pi -e's/"gdb_string.h"/<string.h>/;' *.[chyl] */*.[chyl] 2013-11-18 Tom Tromey <tromey@redhat.com> * common/gdb_string.h: Remove. * aarch64-tdep.c: Use string.h, not gdb_string.h. * ada-exp.y: Use string.h, not gdb_string.h. * ada-lang.c: Use string.h, not gdb_string.h. * ada-lex.l: Use string.h, not gdb_string.h. * ada-typeprint.c: Use string.h, not gdb_string.h. * ada-valprint.c: Use string.h, not gdb_string.h. * aix-thread.c: Use string.h, not gdb_string.h. * alpha-linux-tdep.c: Use string.h, not gdb_string.h. * alpha-mdebug-tdep.c: Use string.h, not gdb_string.h. * alpha-nat.c: Use string.h, not gdb_string.h. * alpha-osf1-tdep.c: Use string.h, not gdb_string.h. * alpha-tdep.c: Use string.h, not gdb_string.h. * alphanbsd-tdep.c: Use string.h, not gdb_string.h. * amd64-dicos-tdep.c: Use string.h, not gdb_string.h. * amd64-linux-nat.c: Use string.h, not gdb_string.h. * amd64-linux-tdep.c: Use string.h, not gdb_string.h. * amd64-nat.c: Use string.h, not gdb_string.h. * amd64-sol2-tdep.c: Use string.h, not gdb_string.h. * amd64fbsd-tdep.c: Use string.h, not gdb_string.h. * amd64obsd-tdep.c: Use string.h, not gdb_string.h. * arch-utils.c: Use string.h, not gdb_string.h. * arm-linux-nat.c: Use string.h, not gdb_string.h. * arm-linux-tdep.c: Use string.h, not gdb_string.h. * arm-tdep.c: Use string.h, not gdb_string.h. * arm-wince-tdep.c: Use string.h, not gdb_string.h. * armbsd-tdep.c: Use string.h, not gdb_string.h. * armnbsd-nat.c: Use string.h, not gdb_string.h. * armnbsd-tdep.c: Use string.h, not gdb_string.h. * armobsd-tdep.c: Use string.h, not gdb_string.h. * avr-tdep.c: Use string.h, not gdb_string.h. * ax-gdb.c: Use string.h, not gdb_string.h. * ax-general.c: Use string.h, not gdb_string.h. * bcache.c: Use string.h, not gdb_string.h. * bfin-tdep.c: Use string.h, not gdb_string.h. * breakpoint.c: Use string.h, not gdb_string.h. * build-id.c: Use string.h, not gdb_string.h. * buildsym.c: Use string.h, not gdb_string.h. * c-exp.y: Use string.h, not gdb_string.h. * c-lang.c: Use string.h, not gdb_string.h. * c-typeprint.c: Use string.h, not gdb_string.h. * c-valprint.c: Use string.h, not gdb_string.h. * charset.c: Use string.h, not gdb_string.h. * cli-out.c: Use string.h, not gdb_string.h. * cli/cli-cmds.c: Use string.h, not gdb_string.h. * cli/cli-decode.c: Use string.h, not gdb_string.h. * cli/cli-dump.c: Use string.h, not gdb_string.h. * cli/cli-interp.c: Use string.h, not gdb_string.h. * cli/cli-logging.c: Use string.h, not gdb_string.h. * cli/cli-script.c: Use string.h, not gdb_string.h. * cli/cli-setshow.c: Use string.h, not gdb_string.h. * cli/cli-utils.c: Use string.h, not gdb_string.h. * coffread.c: Use string.h, not gdb_string.h. * common/common-utils.c: Use string.h, not gdb_string.h. * common/filestuff.c: Use string.h, not gdb_string.h. * common/linux-procfs.c: Use string.h, not gdb_string.h. * common/linux-ptrace.c: Use string.h, not gdb_string.h. * common/signals.c: Use string.h, not gdb_string.h. * common/vec.h: Use string.h, not gdb_string.h. * core-regset.c: Use string.h, not gdb_string.h. * corefile.c: Use string.h, not gdb_string.h. * corelow.c: Use string.h, not gdb_string.h. * cp-abi.c: Use string.h, not gdb_string.h. * cp-support.c: Use string.h, not gdb_string.h. * cp-valprint.c: Use string.h, not gdb_string.h. * cris-tdep.c: Use string.h, not gdb_string.h. * d-lang.c: Use string.h, not gdb_string.h. * dbxread.c: Use string.h, not gdb_string.h. * dcache.c: Use string.h, not gdb_string.h. * demangle.c: Use string.h, not gdb_string.h. * dicos-tdep.c: Use string.h, not gdb_string.h. * disasm.c: Use string.h, not gdb_string.h. * doublest.c: Use string.h, not gdb_string.h. * dsrec.c: Use string.h, not gdb_string.h. * dummy-frame.c: Use string.h, not gdb_string.h. * dwarf2-frame.c: Use string.h, not gdb_string.h. * dwarf2loc.c: Use string.h, not gdb_string.h. * dwarf2read.c: Use string.h, not gdb_string.h. * elfread.c: Use string.h, not gdb_string.h. * environ.c: Use string.h, not gdb_string.h. * eval.c: Use string.h, not gdb_string.h. * event-loop.c: Use string.h, not gdb_string.h. * exceptions.c: Use string.h, not gdb_string.h. * exec.c: Use string.h, not gdb_string.h. * expprint.c: Use string.h, not gdb_string.h. * f-exp.y: Use string.h, not gdb_string.h. * f-lang.c: Use string.h, not gdb_string.h. * f-typeprint.c: Use string.h, not gdb_string.h. * f-valprint.c: Use string.h, not gdb_string.h. * fbsd-nat.c: Use string.h, not gdb_string.h. * findcmd.c: Use string.h, not gdb_string.h. * findvar.c: Use string.h, not gdb_string.h. * fork-child.c: Use string.h, not gdb_string.h. * frame.c: Use string.h, not gdb_string.h. * frv-linux-tdep.c: Use string.h, not gdb_string.h. * frv-tdep.c: Use string.h, not gdb_string.h. * gdb.c: Use string.h, not gdb_string.h. * gdb_bfd.c: Use string.h, not gdb_string.h. * gdbarch.c: Use string.h, not gdb_string.h. * gdbtypes.c: Use string.h, not gdb_string.h. * gnu-nat.c: Use string.h, not gdb_string.h. * gnu-v2-abi.c: Use string.h, not gdb_string.h. * gnu-v3-abi.c: Use string.h, not gdb_string.h. * go-exp.y: Use string.h, not gdb_string.h. * go-lang.c: Use string.h, not gdb_string.h. * go32-nat.c: Use string.h, not gdb_string.h. * hppa-hpux-tdep.c: Use string.h, not gdb_string.h. * hppa-linux-nat.c: Use string.h, not gdb_string.h. * hppanbsd-tdep.c: Use string.h, not gdb_string.h. * hppaobsd-tdep.c: Use string.h, not gdb_string.h. * i386-cygwin-tdep.c: Use string.h, not gdb_string.h. * i386-dicos-tdep.c: Use string.h, not gdb_string.h. * i386-linux-nat.c: Use string.h, not gdb_string.h. * i386-linux-tdep.c: Use string.h, not gdb_string.h. * i386-nto-tdep.c: Use string.h, not gdb_string.h. * i386-sol2-tdep.c: Use string.h, not gdb_string.h. * i386-tdep.c: Use string.h, not gdb_string.h. * i386bsd-tdep.c: Use string.h, not gdb_string.h. * i386gnu-nat.c: Use string.h, not gdb_string.h. * i386nbsd-tdep.c: Use string.h, not gdb_string.h. * i386obsd-tdep.c: Use string.h, not gdb_string.h. * i387-tdep.c: Use string.h, not gdb_string.h. * ia64-libunwind-tdep.c: Use string.h, not gdb_string.h. * ia64-linux-nat.c: Use string.h, not gdb_string.h. * inf-child.c: Use string.h, not gdb_string.h. * inf-ptrace.c: Use string.h, not gdb_string.h. * inf-ttrace.c: Use string.h, not gdb_string.h. * infcall.c: Use string.h, not gdb_string.h. * infcmd.c: Use string.h, not gdb_string.h. * inflow.c: Use string.h, not gdb_string.h. * infrun.c: Use string.h, not gdb_string.h. * interps.c: Use string.h, not gdb_string.h. * iq2000-tdep.c: Use string.h, not gdb_string.h. * irix5-nat.c: Use string.h, not gdb_string.h. * jv-exp.y: Use string.h, not gdb_string.h. * jv-lang.c: Use string.h, not gdb_string.h. * jv-typeprint.c: Use string.h, not gdb_string.h. * jv-valprint.c: Use string.h, not gdb_string.h. * language.c: Use string.h, not gdb_string.h. * linux-fork.c: Use string.h, not gdb_string.h. * linux-nat.c: Use string.h, not gdb_string.h. * lm32-tdep.c: Use string.h, not gdb_string.h. * m2-exp.y: Use string.h, not gdb_string.h. * m2-typeprint.c: Use string.h, not gdb_string.h. * m32c-tdep.c: Use string.h, not gdb_string.h. * m32r-linux-nat.c: Use string.h, not gdb_string.h. * m32r-linux-tdep.c: Use string.h, not gdb_string.h. * m32r-rom.c: Use string.h, not gdb_string.h. * m32r-tdep.c: Use string.h, not gdb_string.h. * m68hc11-tdep.c: Use string.h, not gdb_string.h. * m68k-tdep.c: Use string.h, not gdb_string.h. * m68kbsd-tdep.c: Use string.h, not gdb_string.h. * m68klinux-nat.c: Use string.h, not gdb_string.h. * m68klinux-tdep.c: Use string.h, not gdb_string.h. * m88k-tdep.c: Use string.h, not gdb_string.h. * macrocmd.c: Use string.h, not gdb_string.h. * main.c: Use string.h, not gdb_string.h. * mdebugread.c: Use string.h, not gdb_string.h. * mem-break.c: Use string.h, not gdb_string.h. * memattr.c: Use string.h, not gdb_string.h. * memory-map.c: Use string.h, not gdb_string.h. * mep-tdep.c: Use string.h, not gdb_string.h. * mi/mi-cmd-break.c: Use string.h, not gdb_string.h. * mi/mi-cmd-disas.c: Use string.h, not gdb_string.h. * mi/mi-cmd-env.c: Use string.h, not gdb_string.h. * mi/mi-cmd-stack.c: Use string.h, not gdb_string.h. * mi/mi-cmd-var.c: Use string.h, not gdb_string.h. * mi/mi-cmds.c: Use string.h, not gdb_string.h. * mi/mi-console.c: Use string.h, not gdb_string.h. * mi/mi-getopt.c: Use string.h, not gdb_string.h. * mi/mi-interp.c: Use string.h, not gdb_string.h. * mi/mi-main.c: Use string.h, not gdb_string.h. * mi/mi-parse.c: Use string.h, not gdb_string.h. * microblaze-rom.c: Use string.h, not gdb_string.h. * microblaze-tdep.c: Use string.h, not gdb_string.h. * mingw-hdep.c: Use string.h, not gdb_string.h. * minidebug.c: Use string.h, not gdb_string.h. * minsyms.c: Use string.h, not gdb_string.h. * mips-irix-tdep.c: Use string.h, not gdb_string.h. * mips-linux-tdep.c: Use string.h, not gdb_string.h. * mips-tdep.c: Use string.h, not gdb_string.h. * mips64obsd-tdep.c: Use string.h, not gdb_string.h. * mipsnbsd-tdep.c: Use string.h, not gdb_string.h. * mipsread.c: Use string.h, not gdb_string.h. * mn10300-linux-tdep.c: Use string.h, not gdb_string.h. * mn10300-tdep.c: Use string.h, not gdb_string.h. * monitor.c: Use string.h, not gdb_string.h. * moxie-tdep.c: Use string.h, not gdb_string.h. * mt-tdep.c: Use string.h, not gdb_string.h. * nbsd-tdep.c: Use string.h, not gdb_string.h. * nios2-linux-tdep.c: Use string.h, not gdb_string.h. * nto-procfs.c: Use string.h, not gdb_string.h. * nto-tdep.c: Use string.h, not gdb_string.h. * objc-lang.c: Use string.h, not gdb_string.h. * objfiles.c: Use string.h, not gdb_string.h. * opencl-lang.c: Use string.h, not gdb_string.h. * osabi.c: Use string.h, not gdb_string.h. * osdata.c: Use string.h, not gdb_string.h. * p-exp.y: Use string.h, not gdb_string.h. * p-lang.c: Use string.h, not gdb_string.h. * p-typeprint.c: Use string.h, not gdb_string.h. * parse.c: Use string.h, not gdb_string.h. * posix-hdep.c: Use string.h, not gdb_string.h. * ppc-linux-nat.c: Use string.h, not gdb_string.h. * ppc-sysv-tdep.c: Use string.h, not gdb_string.h. * ppcfbsd-tdep.c: Use string.h, not gdb_string.h. * ppcnbsd-tdep.c: Use string.h, not gdb_string.h. * ppcobsd-tdep.c: Use string.h, not gdb_string.h. * printcmd.c: Use string.h, not gdb_string.h. * procfs.c: Use string.h, not gdb_string.h. * prologue-value.c: Use string.h, not gdb_string.h. * python/py-auto-load.c: Use string.h, not gdb_string.h. * python/py-gdb-readline.c: Use string.h, not gdb_string.h. * ravenscar-thread.c: Use string.h, not gdb_string.h. * regcache.c: Use string.h, not gdb_string.h. * registry.c: Use string.h, not gdb_string.h. * remote-fileio.c: Use string.h, not gdb_string.h. * remote-m32r-sdi.c: Use string.h, not gdb_string.h. * remote-mips.c: Use string.h, not gdb_string.h. * remote-sim.c: Use string.h, not gdb_string.h. * remote.c: Use string.h, not gdb_string.h. * reverse.c: Use string.h, not gdb_string.h. * rs6000-aix-tdep.c: Use string.h, not gdb_string.h. * ser-base.c: Use string.h, not gdb_string.h. * ser-go32.c: Use string.h, not gdb_string.h. * ser-mingw.c: Use string.h, not gdb_string.h. * ser-pipe.c: Use string.h, not gdb_string.h. * ser-tcp.c: Use string.h, not gdb_string.h. * ser-unix.c: Use string.h, not gdb_string.h. * serial.c: Use string.h, not gdb_string.h. * sh-tdep.c: Use string.h, not gdb_string.h. * sh64-tdep.c: Use string.h, not gdb_string.h. * shnbsd-tdep.c: Use string.h, not gdb_string.h. * skip.c: Use string.h, not gdb_string.h. * sol-thread.c: Use string.h, not gdb_string.h. * solib-dsbt.c: Use string.h, not gdb_string.h. * solib-frv.c: Use string.h, not gdb_string.h. * solib-osf.c: Use string.h, not gdb_string.h. * solib-spu.c: Use string.h, not gdb_string.h. * solib-target.c: Use string.h, not gdb_string.h. * solib.c: Use string.h, not gdb_string.h. * somread.c: Use string.h, not gdb_string.h. * source.c: Use string.h, not gdb_string.h. * sparc-nat.c: Use string.h, not gdb_string.h. * sparc-sol2-tdep.c: Use string.h, not gdb_string.h. * sparc-tdep.c: Use string.h, not gdb_string.h. * sparc64-tdep.c: Use string.h, not gdb_string.h. * sparc64fbsd-tdep.c: Use string.h, not gdb_string.h. * sparc64nbsd-tdep.c: Use string.h, not gdb_string.h. * sparcnbsd-tdep.c: Use string.h, not gdb_string.h. * spu-linux-nat.c: Use string.h, not gdb_string.h. * spu-multiarch.c: Use string.h, not gdb_string.h. * spu-tdep.c: Use string.h, not gdb_string.h. * stabsread.c: Use string.h, not gdb_string.h. * stack.c: Use string.h, not gdb_string.h. * std-regs.c: Use string.h, not gdb_string.h. * symfile.c: Use string.h, not gdb_string.h. * symmisc.c: Use string.h, not gdb_string.h. * symtab.c: Use string.h, not gdb_string.h. * target.c: Use string.h, not gdb_string.h. * thread.c: Use string.h, not gdb_string.h. * tilegx-linux-nat.c: Use string.h, not gdb_string.h. * tilegx-tdep.c: Use string.h, not gdb_string.h. * top.c: Use string.h, not gdb_string.h. * tracepoint.c: Use string.h, not gdb_string.h. * tui/tui-command.c: Use string.h, not gdb_string.h. * tui/tui-data.c: Use string.h, not gdb_string.h. * tui/tui-disasm.c: Use string.h, not gdb_string.h. * tui/tui-file.c: Use string.h, not gdb_string.h. * tui/tui-layout.c: Use string.h, not gdb_string.h. * tui/tui-out.c: Use string.h, not gdb_string.h. * tui/tui-regs.c: Use string.h, not gdb_string.h. * tui/tui-source.c: Use string.h, not gdb_string.h. * tui/tui-stack.c: Use string.h, not gdb_string.h. * tui/tui-win.c: Use string.h, not gdb_string.h. * tui/tui-windata.c: Use string.h, not gdb_string.h. * tui/tui-winsource.c: Use string.h, not gdb_string.h. * typeprint.c: Use string.h, not gdb_string.h. * ui-file.c: Use string.h, not gdb_string.h. * ui-out.c: Use string.h, not gdb_string.h. * user-regs.c: Use string.h, not gdb_string.h. * utils.c: Use string.h, not gdb_string.h. * v850-tdep.c: Use string.h, not gdb_string.h. * valarith.c: Use string.h, not gdb_string.h. * valops.c: Use string.h, not gdb_string.h. * valprint.c: Use string.h, not gdb_string.h. * value.c: Use string.h, not gdb_string.h. * varobj.c: Use string.h, not gdb_string.h. * vax-tdep.c: Use string.h, not gdb_string.h. * vaxnbsd-tdep.c: Use string.h, not gdb_string.h. * vaxobsd-tdep.c: Use string.h, not gdb_string.h. * windows-nat.c: Use string.h, not gdb_string.h. * xcoffread.c: Use string.h, not gdb_string.h. * xml-support.c: Use string.h, not gdb_string.h. * xstormy16-tdep.c: Use string.h, not gdb_string.h. * xtensa-linux-nat.c: Use string.h, not gdb_string.h.
2013-11-06 15:14:23 +01:00
#include <string.h>
#include "sol2-tdep.h"
* config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and i386bsd-tdep.o. Remove solib.o, solib-svr4.o and solib-legacy.o. Move these to ... * config/i386/i386sol2.mh: ... here. * config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Remove define. (sigtramp_saved_pc, I386V4_SIGTRAMP_SAVED_PC): Don't #undef. (SIGCONTEXT_PC_OFFSET): Remove define. (IN_SIGTRAMP): Remove define. * i386-sol2-tdep.c: New file. * config/i386/i386nw.mt (TM_FILE): Change to tm-i386.h. * config/i386/tm-i386nw.h: Removed. * config/i386/tm-fbsd.h (STAB_REG_TO_REGNUM, USE_STRUCT_CONVENTION): Remove defines. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsdaout.h (i386nbsd_aout_use_struct_convention): Remove prototype. (USE_STRUCT_CONVENTION): Remove prototype. * i386bsd-nat.c (i386bsd_sigcontext_pc_offset): Remove declaration. (_initialize_i386bsd_nat): Revise logic to determine some constants at compile time when compiling a native GDB. Warn if things don't match up with what we expect. * i386bsd-tdep.c (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove variables. (i386bsd_in_sigtramp): Rename tp i386bsd_pc_in_sigtramp. Rewrite to use date stored in `struct gdbarch_tdep'. (i386bsd_sigcontext_offset): Remove varaible. (i386bsd_sigtramp_saved_pc): Make public. Rewrite to use data stored in `struct gdbarch_tdep'. (i386bsd_frame_saved_pc): Make static. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): New functions. (i386bsd_sc_pc_offset, i386nbsd_sc_pc_offset, i386fbsd_sigtramp_start, i386fbsd_sigtramp_end, i386fbsd4_sc_pc_offset): New variables. (i386bsd_init_abi, i386nbsd_init_abi, i386nbsdelf_init_abi, i386fbsdaout_init_abi, i386fbsd_init_abi, i386fbsd4_init_abi): New functions. (i386bsd_aout_osabi_sniffer, _initialize_i386bsd_tdep): New functions. * i386fbsd-nat.c (_initialize_i386fbsd_nat): Fix type in comment. Modify the value of i386fbsd_sigtramp_start and i386fbsd_sigtramp_end instead of i386bsd_sigtramp_start and i386fbsd_sigtramp_end. * i386nbsd-tdep.c: (i386nbsd_aout_use_struct_convention): Remove function. * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Move define to i386-linux-tdep.h. (NUM_REGS, MAX_NUM_REGS, REGISTER_BYTES, REGISTER_NAME, REGISTER_BYTE, REGISTER_RAW_SIZE, STAB_REG_TO_REGNUM): Remove defines. (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size): Remove prototypes. (i386_linux_svr4_fetch_link_map_offsets): Remove prototype. (SVR4_FETCH_LINK_MAP_OFFSETS): Remove define. (IN_SIGTRAMP, FRAME_CHAIN, FRAME_SAVED_PC, SAVED_PC_AFTER_CALL, TARGET_WRITE_PC): Remove defines. (i386_linux_in_sigtramp, i386_linux_frame_chain, i386_linux_frame_saved_pc, i386_linux_saved_pc_after_call, i386_linux_write_pc): Remove prototypes. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-linux-tdep.h: New file. * i386-linux-nat.c: Include "i386-linux-tdep.h". * i386-linux-tdep.c: Include "i386-tdep.h" and "i386-linux-tdep.h". (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size, i386_linux_in_sigtramp, i386_linux_write_pc, i386_linux_svr4_fetch_link_map_offsets): Make static. (i386_linux_init_abi): New function. (_initialize_i386_linux_tdep): New function. * config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Remove define. (i386_saved_pc_after_call): Remove prototype. (MAX_NUM_REGS): Increase to deal with Linux's orig_eax "register". (REGISTER_NAME, STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Remove defines. (i386_register_name, i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum): Remove prototypes. (SIZEOF_GREGS, SIZEOF_FPU_REGS, SIZEOF_FPU_CTL_REGS, SIZEOF_SSE_REGS): Remove defines. (REGISTER_BYTES): Remove define. (REGISTER_BYTE, REGISTER_RAW_SIZE): Remove defines. (i386_register_byte, i386_register_raw_size): Remove prototypes. (FRAME_CHAIN, FRAME_SAVED_PC): Remove defines. (i386_frame_chain, i386_frame_saved_pc): Remove prototypes. * config/i386/tm-i386v4.h (FRAME_CHAIN_VALID): Remove define. (JB_ELEMENT_SIZE, JB_PC, JB_EBX, JB_ESI, JB_EDI, JB_EBP, JB_ESP, JB_EDX, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP): Remove defines. (sigtramp_saved_pc): Remove define. (i386v4_sigtramp_saved_pc): Remove prototype. * config/i386/tm-go32.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): Remove defines. (i386go32_frame_saved_pc): Remove prototype. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-tdep.h: Include "osabi.h". (enum i386_abi): Removed. (enum struct_return): New enum. (struct gdbarch_tdep): Remove abi member, add osabi, jb_pc_offset, struct_return, sigtramp_saved_pc, sigtramp_start, sigtramp_end and sc_pc_offset members. (i386_gdbarch_register_os_abi): Remove prototype. (I386_NUM_GREGS, I386_NUM_FREGS, I386_NUM_XREGS, I386_SSE_NUM_REGS): New defines. (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS, I386_SSE_SIZEOF_REGS): New defines. (i386_register_name, i386_register_byte, i386_register_raw_size): New prototypes. (i386_elf_init_abi, i386_svr4_init_abi): New prototypes. (i386bsd_sigtramp_saved_pc): New prototype. * i386-tdep.c: Don't include "elf-bfd.h". (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum, i386_frame_chain, i386_saved_pc_after_call): Make static. (i386_frame_saved_pc): Rewrite to call architecture dependent function to deal with signal handlers. Make static. (i386go32_frame_saved_pc): Removed. [GET_LONGJMP_TARGET] (JB_PC, JB_ELEMENT_SIZE, get_longjmp_target): Removed. (i386_get_longjmp_target): New function. (default_struct_convention, pcc_struct_convention, reg_struct_convention, valid_conventions, struct_convention): New variables. (i386_use_struct_convention): New function. (i386v4_sigtramp_saved_pc): Renamed to i386_svr4_sigtramp_saved_pc. Made static. Moved. (i386_pc_in_sigtramp): New function. (i386_abi_names): Removed. (ABI_TAG_OS_GNU_LINUX, ABI_TAG_OS_GNU_HURD, ABI_TAG_OS_GNU_SOLARIS, ABI_TAG_OS_FREEBSD, ABI_TAG_OS_NETBSD): Removed. (process_note_sections, i386_elf_abi_from_note, i386_elf_abi, i386_gdbarch_register_os_abi): Removed. (struct i386_abi_handler): Removed. (i386_abi_handler_list): Removed. (i386_svr4_pc_in_sigtramp, i386_go32_pc_in_sigtramp): New functions. (i386_elf_init_abi, i386_svr4_init_abi, i386_go32_init_abi, i386_nw_init_abi): New functions. (i386_gdbarch_init): Rewritten to use generic OS ABI framework. Use set_gdbarch_xxx() calls instead of relying on macros for a number of calls. (i386_coff_osabi_sniffer, i386_nlm_osabi_sniffer): New functions. (_initialize_i386_tdep): Add new 'struct-convcention' command. Register the various architecture variants defined in this file.
2002-06-14 21:42:20 +02:00
#include "i386-tdep.h"
#include "solib-svr4.h"
* config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and i386bsd-tdep.o. Remove solib.o, solib-svr4.o and solib-legacy.o. Move these to ... * config/i386/i386sol2.mh: ... here. * config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Remove define. (sigtramp_saved_pc, I386V4_SIGTRAMP_SAVED_PC): Don't #undef. (SIGCONTEXT_PC_OFFSET): Remove define. (IN_SIGTRAMP): Remove define. * i386-sol2-tdep.c: New file. * config/i386/i386nw.mt (TM_FILE): Change to tm-i386.h. * config/i386/tm-i386nw.h: Removed. * config/i386/tm-fbsd.h (STAB_REG_TO_REGNUM, USE_STRUCT_CONVENTION): Remove defines. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsdaout.h (i386nbsd_aout_use_struct_convention): Remove prototype. (USE_STRUCT_CONVENTION): Remove prototype. * i386bsd-nat.c (i386bsd_sigcontext_pc_offset): Remove declaration. (_initialize_i386bsd_nat): Revise logic to determine some constants at compile time when compiling a native GDB. Warn if things don't match up with what we expect. * i386bsd-tdep.c (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove variables. (i386bsd_in_sigtramp): Rename tp i386bsd_pc_in_sigtramp. Rewrite to use date stored in `struct gdbarch_tdep'. (i386bsd_sigcontext_offset): Remove varaible. (i386bsd_sigtramp_saved_pc): Make public. Rewrite to use data stored in `struct gdbarch_tdep'. (i386bsd_frame_saved_pc): Make static. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): New functions. (i386bsd_sc_pc_offset, i386nbsd_sc_pc_offset, i386fbsd_sigtramp_start, i386fbsd_sigtramp_end, i386fbsd4_sc_pc_offset): New variables. (i386bsd_init_abi, i386nbsd_init_abi, i386nbsdelf_init_abi, i386fbsdaout_init_abi, i386fbsd_init_abi, i386fbsd4_init_abi): New functions. (i386bsd_aout_osabi_sniffer, _initialize_i386bsd_tdep): New functions. * i386fbsd-nat.c (_initialize_i386fbsd_nat): Fix type in comment. Modify the value of i386fbsd_sigtramp_start and i386fbsd_sigtramp_end instead of i386bsd_sigtramp_start and i386fbsd_sigtramp_end. * i386nbsd-tdep.c: (i386nbsd_aout_use_struct_convention): Remove function. * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Move define to i386-linux-tdep.h. (NUM_REGS, MAX_NUM_REGS, REGISTER_BYTES, REGISTER_NAME, REGISTER_BYTE, REGISTER_RAW_SIZE, STAB_REG_TO_REGNUM): Remove defines. (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size): Remove prototypes. (i386_linux_svr4_fetch_link_map_offsets): Remove prototype. (SVR4_FETCH_LINK_MAP_OFFSETS): Remove define. (IN_SIGTRAMP, FRAME_CHAIN, FRAME_SAVED_PC, SAVED_PC_AFTER_CALL, TARGET_WRITE_PC): Remove defines. (i386_linux_in_sigtramp, i386_linux_frame_chain, i386_linux_frame_saved_pc, i386_linux_saved_pc_after_call, i386_linux_write_pc): Remove prototypes. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-linux-tdep.h: New file. * i386-linux-nat.c: Include "i386-linux-tdep.h". * i386-linux-tdep.c: Include "i386-tdep.h" and "i386-linux-tdep.h". (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size, i386_linux_in_sigtramp, i386_linux_write_pc, i386_linux_svr4_fetch_link_map_offsets): Make static. (i386_linux_init_abi): New function. (_initialize_i386_linux_tdep): New function. * config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Remove define. (i386_saved_pc_after_call): Remove prototype. (MAX_NUM_REGS): Increase to deal with Linux's orig_eax "register". (REGISTER_NAME, STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Remove defines. (i386_register_name, i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum): Remove prototypes. (SIZEOF_GREGS, SIZEOF_FPU_REGS, SIZEOF_FPU_CTL_REGS, SIZEOF_SSE_REGS): Remove defines. (REGISTER_BYTES): Remove define. (REGISTER_BYTE, REGISTER_RAW_SIZE): Remove defines. (i386_register_byte, i386_register_raw_size): Remove prototypes. (FRAME_CHAIN, FRAME_SAVED_PC): Remove defines. (i386_frame_chain, i386_frame_saved_pc): Remove prototypes. * config/i386/tm-i386v4.h (FRAME_CHAIN_VALID): Remove define. (JB_ELEMENT_SIZE, JB_PC, JB_EBX, JB_ESI, JB_EDI, JB_EBP, JB_ESP, JB_EDX, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP): Remove defines. (sigtramp_saved_pc): Remove define. (i386v4_sigtramp_saved_pc): Remove prototype. * config/i386/tm-go32.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): Remove defines. (i386go32_frame_saved_pc): Remove prototype. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-tdep.h: Include "osabi.h". (enum i386_abi): Removed. (enum struct_return): New enum. (struct gdbarch_tdep): Remove abi member, add osabi, jb_pc_offset, struct_return, sigtramp_saved_pc, sigtramp_start, sigtramp_end and sc_pc_offset members. (i386_gdbarch_register_os_abi): Remove prototype. (I386_NUM_GREGS, I386_NUM_FREGS, I386_NUM_XREGS, I386_SSE_NUM_REGS): New defines. (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS, I386_SSE_SIZEOF_REGS): New defines. (i386_register_name, i386_register_byte, i386_register_raw_size): New prototypes. (i386_elf_init_abi, i386_svr4_init_abi): New prototypes. (i386bsd_sigtramp_saved_pc): New prototype. * i386-tdep.c: Don't include "elf-bfd.h". (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum, i386_frame_chain, i386_saved_pc_after_call): Make static. (i386_frame_saved_pc): Rewrite to call architecture dependent function to deal with signal handlers. Make static. (i386go32_frame_saved_pc): Removed. [GET_LONGJMP_TARGET] (JB_PC, JB_ELEMENT_SIZE, get_longjmp_target): Removed. (i386_get_longjmp_target): New function. (default_struct_convention, pcc_struct_convention, reg_struct_convention, valid_conventions, struct_convention): New variables. (i386_use_struct_convention): New function. (i386v4_sigtramp_saved_pc): Renamed to i386_svr4_sigtramp_saved_pc. Made static. Moved. (i386_pc_in_sigtramp): New function. (i386_abi_names): Removed. (ABI_TAG_OS_GNU_LINUX, ABI_TAG_OS_GNU_HURD, ABI_TAG_OS_GNU_SOLARIS, ABI_TAG_OS_FREEBSD, ABI_TAG_OS_NETBSD): Removed. (process_note_sections, i386_elf_abi_from_note, i386_elf_abi, i386_gdbarch_register_os_abi): Removed. (struct i386_abi_handler): Removed. (i386_abi_handler_list): Removed. (i386_svr4_pc_in_sigtramp, i386_go32_pc_in_sigtramp): New functions. (i386_elf_init_abi, i386_svr4_init_abi, i386_go32_init_abi, i386_nw_init_abi): New functions. (i386_gdbarch_init): Rewritten to use generic OS ABI framework. Use set_gdbarch_xxx() calls instead of relying on macros for a number of calls. (i386_coff_osabi_sniffer, i386_nlm_osabi_sniffer): New functions. (_initialize_i386_tdep): Add new 'struct-convcention' command. Register the various architecture variants defined in this file.
2002-06-14 21:42:20 +02:00
/* From <ia32/sys/reg.h>. */
static int i386_sol2_gregset_reg_offset[] =
{
11 * 4, /* %eax */
10 * 4, /* %ecx */
9 * 4, /* %edx */
8 * 4, /* %ebx */
17 * 4, /* %esp */
6 * 4, /* %ebp */
5 * 4, /* %esi */
4 * 4, /* %edi */
14 * 4, /* %eip */
16 * 4, /* %eflags */
15 * 4, /* %cs */
18 * 4, /* %ss */
3 * 4, /* %ds */
2 * 4, /* %es */
1 * 4, /* %fs */
0 * 4 /* %gs */
};
Update i386 and amd64 ports for unwinder changes. * amd64-tdep.c (amd64_frame_cache): Expect this_frame. (amd64_frame_this_id, amd64_frame_prev_register): Update signature. (amd64_frame_unwind): Use default_frame_sniffer. (amd64_frame_sniffer): Delete. (amd64_sigtramp_frame_cache): Expect this_frame. (amd64_sigtramp_frame_this_id, amd64_sigtramp_frame_prev_register) (amd64_sigtramp_frame_sniffer): Update signature. (amd64_sigtramp_frame_unwind): Add amd64_sigtramp_frame_sniffer. (amd64_frame_base_address): Expect this_frame. (amd64_dummy_id): Renamed from amd64_unwind_dummy_id. Expect this_frame. (amd64_init_abi): Use set_gdbarch_dummy_id and frame_unwind_append_unwinder. * i386-tdep.c (i386_frame_cache): Expect this_frame. (i386_frame_this_id, i386_frame_prev_register): Update signature. (i386_frame_unwind): Use default_frame_sniffer. (i386_frame_sniffer): Delete. (i386_sigtramp_frame_cache): Expect this_frame. (i386_sigtramp_frame_this_id, i386_sigtramp_frame_prev_register) (i386_sigtramp_frame_sniffer): Update signature. (i386_sigtramp_frame_unwind): Use i386_sigtramp_frame_sniffer. (i386_frame_base_address): Update signature. (i386_dummy_id): Rename from i386_unwind_dummy_id. Expect this_frame. (i386_push_dummy_call): Update comment. (i386_sigtramp_p, i386_svr4_sigtramp_p, i386_svr4_sigcontext_addr): Expect this_frame. (i386_gdbarch_init): Use set_gdbarch_dummy_id, dwarf2_append_unwinders, and frame_unwind_append_unwinder. * amd64-linux-tdep.c, amd64-sol2-tdep.c, amd64fbsd-tdep.c, amd64nbsd-tdep.c, amd64obsd-tdep.c, i386-linux-tdep.c, i386-nto-tdep.c, i386bsd-tdep.c, i386-sol2-tdep.c, i386obsd-tdep.c, i386nbsd-tdep.c: Update for unwinder changes.
2008-04-30 23:19:45 +02:00
/* Return whether THIS_FRAME corresponds to a Solaris sigtramp
routine. */
* config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and i386bsd-tdep.o. Remove solib.o, solib-svr4.o and solib-legacy.o. Move these to ... * config/i386/i386sol2.mh: ... here. * config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Remove define. (sigtramp_saved_pc, I386V4_SIGTRAMP_SAVED_PC): Don't #undef. (SIGCONTEXT_PC_OFFSET): Remove define. (IN_SIGTRAMP): Remove define. * i386-sol2-tdep.c: New file. * config/i386/i386nw.mt (TM_FILE): Change to tm-i386.h. * config/i386/tm-i386nw.h: Removed. * config/i386/tm-fbsd.h (STAB_REG_TO_REGNUM, USE_STRUCT_CONVENTION): Remove defines. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsdaout.h (i386nbsd_aout_use_struct_convention): Remove prototype. (USE_STRUCT_CONVENTION): Remove prototype. * i386bsd-nat.c (i386bsd_sigcontext_pc_offset): Remove declaration. (_initialize_i386bsd_nat): Revise logic to determine some constants at compile time when compiling a native GDB. Warn if things don't match up with what we expect. * i386bsd-tdep.c (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove variables. (i386bsd_in_sigtramp): Rename tp i386bsd_pc_in_sigtramp. Rewrite to use date stored in `struct gdbarch_tdep'. (i386bsd_sigcontext_offset): Remove varaible. (i386bsd_sigtramp_saved_pc): Make public. Rewrite to use data stored in `struct gdbarch_tdep'. (i386bsd_frame_saved_pc): Make static. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): New functions. (i386bsd_sc_pc_offset, i386nbsd_sc_pc_offset, i386fbsd_sigtramp_start, i386fbsd_sigtramp_end, i386fbsd4_sc_pc_offset): New variables. (i386bsd_init_abi, i386nbsd_init_abi, i386nbsdelf_init_abi, i386fbsdaout_init_abi, i386fbsd_init_abi, i386fbsd4_init_abi): New functions. (i386bsd_aout_osabi_sniffer, _initialize_i386bsd_tdep): New functions. * i386fbsd-nat.c (_initialize_i386fbsd_nat): Fix type in comment. Modify the value of i386fbsd_sigtramp_start and i386fbsd_sigtramp_end instead of i386bsd_sigtramp_start and i386fbsd_sigtramp_end. * i386nbsd-tdep.c: (i386nbsd_aout_use_struct_convention): Remove function. * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Move define to i386-linux-tdep.h. (NUM_REGS, MAX_NUM_REGS, REGISTER_BYTES, REGISTER_NAME, REGISTER_BYTE, REGISTER_RAW_SIZE, STAB_REG_TO_REGNUM): Remove defines. (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size): Remove prototypes. (i386_linux_svr4_fetch_link_map_offsets): Remove prototype. (SVR4_FETCH_LINK_MAP_OFFSETS): Remove define. (IN_SIGTRAMP, FRAME_CHAIN, FRAME_SAVED_PC, SAVED_PC_AFTER_CALL, TARGET_WRITE_PC): Remove defines. (i386_linux_in_sigtramp, i386_linux_frame_chain, i386_linux_frame_saved_pc, i386_linux_saved_pc_after_call, i386_linux_write_pc): Remove prototypes. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-linux-tdep.h: New file. * i386-linux-nat.c: Include "i386-linux-tdep.h". * i386-linux-tdep.c: Include "i386-tdep.h" and "i386-linux-tdep.h". (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size, i386_linux_in_sigtramp, i386_linux_write_pc, i386_linux_svr4_fetch_link_map_offsets): Make static. (i386_linux_init_abi): New function. (_initialize_i386_linux_tdep): New function. * config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Remove define. (i386_saved_pc_after_call): Remove prototype. (MAX_NUM_REGS): Increase to deal with Linux's orig_eax "register". (REGISTER_NAME, STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Remove defines. (i386_register_name, i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum): Remove prototypes. (SIZEOF_GREGS, SIZEOF_FPU_REGS, SIZEOF_FPU_CTL_REGS, SIZEOF_SSE_REGS): Remove defines. (REGISTER_BYTES): Remove define. (REGISTER_BYTE, REGISTER_RAW_SIZE): Remove defines. (i386_register_byte, i386_register_raw_size): Remove prototypes. (FRAME_CHAIN, FRAME_SAVED_PC): Remove defines. (i386_frame_chain, i386_frame_saved_pc): Remove prototypes. * config/i386/tm-i386v4.h (FRAME_CHAIN_VALID): Remove define. (JB_ELEMENT_SIZE, JB_PC, JB_EBX, JB_ESI, JB_EDI, JB_EBP, JB_ESP, JB_EDX, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP): Remove defines. (sigtramp_saved_pc): Remove define. (i386v4_sigtramp_saved_pc): Remove prototype. * config/i386/tm-go32.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): Remove defines. (i386go32_frame_saved_pc): Remove prototype. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-tdep.h: Include "osabi.h". (enum i386_abi): Removed. (enum struct_return): New enum. (struct gdbarch_tdep): Remove abi member, add osabi, jb_pc_offset, struct_return, sigtramp_saved_pc, sigtramp_start, sigtramp_end and sc_pc_offset members. (i386_gdbarch_register_os_abi): Remove prototype. (I386_NUM_GREGS, I386_NUM_FREGS, I386_NUM_XREGS, I386_SSE_NUM_REGS): New defines. (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS, I386_SSE_SIZEOF_REGS): New defines. (i386_register_name, i386_register_byte, i386_register_raw_size): New prototypes. (i386_elf_init_abi, i386_svr4_init_abi): New prototypes. (i386bsd_sigtramp_saved_pc): New prototype. * i386-tdep.c: Don't include "elf-bfd.h". (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum, i386_frame_chain, i386_saved_pc_after_call): Make static. (i386_frame_saved_pc): Rewrite to call architecture dependent function to deal with signal handlers. Make static. (i386go32_frame_saved_pc): Removed. [GET_LONGJMP_TARGET] (JB_PC, JB_ELEMENT_SIZE, get_longjmp_target): Removed. (i386_get_longjmp_target): New function. (default_struct_convention, pcc_struct_convention, reg_struct_convention, valid_conventions, struct_convention): New variables. (i386_use_struct_convention): New function. (i386v4_sigtramp_saved_pc): Renamed to i386_svr4_sigtramp_saved_pc. Made static. Moved. (i386_pc_in_sigtramp): New function. (i386_abi_names): Removed. (ABI_TAG_OS_GNU_LINUX, ABI_TAG_OS_GNU_HURD, ABI_TAG_OS_GNU_SOLARIS, ABI_TAG_OS_FREEBSD, ABI_TAG_OS_NETBSD): Removed. (process_note_sections, i386_elf_abi_from_note, i386_elf_abi, i386_gdbarch_register_os_abi): Removed. (struct i386_abi_handler): Removed. (i386_abi_handler_list): Removed. (i386_svr4_pc_in_sigtramp, i386_go32_pc_in_sigtramp): New functions. (i386_elf_init_abi, i386_svr4_init_abi, i386_go32_init_abi, i386_nw_init_abi): New functions. (i386_gdbarch_init): Rewritten to use generic OS ABI framework. Use set_gdbarch_xxx() calls instead of relying on macros for a number of calls. (i386_coff_osabi_sniffer, i386_nlm_osabi_sniffer): New functions. (_initialize_i386_tdep): Add new 'struct-convcention' command. Register the various architecture variants defined in this file.
2002-06-14 21:42:20 +02:00
static int
Update i386 and amd64 ports for unwinder changes. * amd64-tdep.c (amd64_frame_cache): Expect this_frame. (amd64_frame_this_id, amd64_frame_prev_register): Update signature. (amd64_frame_unwind): Use default_frame_sniffer. (amd64_frame_sniffer): Delete. (amd64_sigtramp_frame_cache): Expect this_frame. (amd64_sigtramp_frame_this_id, amd64_sigtramp_frame_prev_register) (amd64_sigtramp_frame_sniffer): Update signature. (amd64_sigtramp_frame_unwind): Add amd64_sigtramp_frame_sniffer. (amd64_frame_base_address): Expect this_frame. (amd64_dummy_id): Renamed from amd64_unwind_dummy_id. Expect this_frame. (amd64_init_abi): Use set_gdbarch_dummy_id and frame_unwind_append_unwinder. * i386-tdep.c (i386_frame_cache): Expect this_frame. (i386_frame_this_id, i386_frame_prev_register): Update signature. (i386_frame_unwind): Use default_frame_sniffer. (i386_frame_sniffer): Delete. (i386_sigtramp_frame_cache): Expect this_frame. (i386_sigtramp_frame_this_id, i386_sigtramp_frame_prev_register) (i386_sigtramp_frame_sniffer): Update signature. (i386_sigtramp_frame_unwind): Use i386_sigtramp_frame_sniffer. (i386_frame_base_address): Update signature. (i386_dummy_id): Rename from i386_unwind_dummy_id. Expect this_frame. (i386_push_dummy_call): Update comment. (i386_sigtramp_p, i386_svr4_sigtramp_p, i386_svr4_sigcontext_addr): Expect this_frame. (i386_gdbarch_init): Use set_gdbarch_dummy_id, dwarf2_append_unwinders, and frame_unwind_append_unwinder. * amd64-linux-tdep.c, amd64-sol2-tdep.c, amd64fbsd-tdep.c, amd64nbsd-tdep.c, amd64obsd-tdep.c, i386-linux-tdep.c, i386-nto-tdep.c, i386bsd-tdep.c, i386-sol2-tdep.c, i386obsd-tdep.c, i386nbsd-tdep.c: Update for unwinder changes.
2008-04-30 23:19:45 +02:00
i386_sol2_sigtramp_p (struct frame_info *this_frame)
* config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and i386bsd-tdep.o. Remove solib.o, solib-svr4.o and solib-legacy.o. Move these to ... * config/i386/i386sol2.mh: ... here. * config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Remove define. (sigtramp_saved_pc, I386V4_SIGTRAMP_SAVED_PC): Don't #undef. (SIGCONTEXT_PC_OFFSET): Remove define. (IN_SIGTRAMP): Remove define. * i386-sol2-tdep.c: New file. * config/i386/i386nw.mt (TM_FILE): Change to tm-i386.h. * config/i386/tm-i386nw.h: Removed. * config/i386/tm-fbsd.h (STAB_REG_TO_REGNUM, USE_STRUCT_CONVENTION): Remove defines. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsdaout.h (i386nbsd_aout_use_struct_convention): Remove prototype. (USE_STRUCT_CONVENTION): Remove prototype. * i386bsd-nat.c (i386bsd_sigcontext_pc_offset): Remove declaration. (_initialize_i386bsd_nat): Revise logic to determine some constants at compile time when compiling a native GDB. Warn if things don't match up with what we expect. * i386bsd-tdep.c (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove variables. (i386bsd_in_sigtramp): Rename tp i386bsd_pc_in_sigtramp. Rewrite to use date stored in `struct gdbarch_tdep'. (i386bsd_sigcontext_offset): Remove varaible. (i386bsd_sigtramp_saved_pc): Make public. Rewrite to use data stored in `struct gdbarch_tdep'. (i386bsd_frame_saved_pc): Make static. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): New functions. (i386bsd_sc_pc_offset, i386nbsd_sc_pc_offset, i386fbsd_sigtramp_start, i386fbsd_sigtramp_end, i386fbsd4_sc_pc_offset): New variables. (i386bsd_init_abi, i386nbsd_init_abi, i386nbsdelf_init_abi, i386fbsdaout_init_abi, i386fbsd_init_abi, i386fbsd4_init_abi): New functions. (i386bsd_aout_osabi_sniffer, _initialize_i386bsd_tdep): New functions. * i386fbsd-nat.c (_initialize_i386fbsd_nat): Fix type in comment. Modify the value of i386fbsd_sigtramp_start and i386fbsd_sigtramp_end instead of i386bsd_sigtramp_start and i386fbsd_sigtramp_end. * i386nbsd-tdep.c: (i386nbsd_aout_use_struct_convention): Remove function. * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Move define to i386-linux-tdep.h. (NUM_REGS, MAX_NUM_REGS, REGISTER_BYTES, REGISTER_NAME, REGISTER_BYTE, REGISTER_RAW_SIZE, STAB_REG_TO_REGNUM): Remove defines. (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size): Remove prototypes. (i386_linux_svr4_fetch_link_map_offsets): Remove prototype. (SVR4_FETCH_LINK_MAP_OFFSETS): Remove define. (IN_SIGTRAMP, FRAME_CHAIN, FRAME_SAVED_PC, SAVED_PC_AFTER_CALL, TARGET_WRITE_PC): Remove defines. (i386_linux_in_sigtramp, i386_linux_frame_chain, i386_linux_frame_saved_pc, i386_linux_saved_pc_after_call, i386_linux_write_pc): Remove prototypes. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-linux-tdep.h: New file. * i386-linux-nat.c: Include "i386-linux-tdep.h". * i386-linux-tdep.c: Include "i386-tdep.h" and "i386-linux-tdep.h". (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size, i386_linux_in_sigtramp, i386_linux_write_pc, i386_linux_svr4_fetch_link_map_offsets): Make static. (i386_linux_init_abi): New function. (_initialize_i386_linux_tdep): New function. * config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Remove define. (i386_saved_pc_after_call): Remove prototype. (MAX_NUM_REGS): Increase to deal with Linux's orig_eax "register". (REGISTER_NAME, STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Remove defines. (i386_register_name, i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum): Remove prototypes. (SIZEOF_GREGS, SIZEOF_FPU_REGS, SIZEOF_FPU_CTL_REGS, SIZEOF_SSE_REGS): Remove defines. (REGISTER_BYTES): Remove define. (REGISTER_BYTE, REGISTER_RAW_SIZE): Remove defines. (i386_register_byte, i386_register_raw_size): Remove prototypes. (FRAME_CHAIN, FRAME_SAVED_PC): Remove defines. (i386_frame_chain, i386_frame_saved_pc): Remove prototypes. * config/i386/tm-i386v4.h (FRAME_CHAIN_VALID): Remove define. (JB_ELEMENT_SIZE, JB_PC, JB_EBX, JB_ESI, JB_EDI, JB_EBP, JB_ESP, JB_EDX, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP): Remove defines. (sigtramp_saved_pc): Remove define. (i386v4_sigtramp_saved_pc): Remove prototype. * config/i386/tm-go32.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): Remove defines. (i386go32_frame_saved_pc): Remove prototype. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-tdep.h: Include "osabi.h". (enum i386_abi): Removed. (enum struct_return): New enum. (struct gdbarch_tdep): Remove abi member, add osabi, jb_pc_offset, struct_return, sigtramp_saved_pc, sigtramp_start, sigtramp_end and sc_pc_offset members. (i386_gdbarch_register_os_abi): Remove prototype. (I386_NUM_GREGS, I386_NUM_FREGS, I386_NUM_XREGS, I386_SSE_NUM_REGS): New defines. (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS, I386_SSE_SIZEOF_REGS): New defines. (i386_register_name, i386_register_byte, i386_register_raw_size): New prototypes. (i386_elf_init_abi, i386_svr4_init_abi): New prototypes. (i386bsd_sigtramp_saved_pc): New prototype. * i386-tdep.c: Don't include "elf-bfd.h". (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum, i386_frame_chain, i386_saved_pc_after_call): Make static. (i386_frame_saved_pc): Rewrite to call architecture dependent function to deal with signal handlers. Make static. (i386go32_frame_saved_pc): Removed. [GET_LONGJMP_TARGET] (JB_PC, JB_ELEMENT_SIZE, get_longjmp_target): Removed. (i386_get_longjmp_target): New function. (default_struct_convention, pcc_struct_convention, reg_struct_convention, valid_conventions, struct_convention): New variables. (i386_use_struct_convention): New function. (i386v4_sigtramp_saved_pc): Renamed to i386_svr4_sigtramp_saved_pc. Made static. Moved. (i386_pc_in_sigtramp): New function. (i386_abi_names): Removed. (ABI_TAG_OS_GNU_LINUX, ABI_TAG_OS_GNU_HURD, ABI_TAG_OS_GNU_SOLARIS, ABI_TAG_OS_FREEBSD, ABI_TAG_OS_NETBSD): Removed. (process_note_sections, i386_elf_abi_from_note, i386_elf_abi, i386_gdbarch_register_os_abi): Removed. (struct i386_abi_handler): Removed. (i386_abi_handler_list): Removed. (i386_svr4_pc_in_sigtramp, i386_go32_pc_in_sigtramp): New functions. (i386_elf_init_abi, i386_svr4_init_abi, i386_go32_init_abi, i386_nw_init_abi): New functions. (i386_gdbarch_init): Rewritten to use generic OS ABI framework. Use set_gdbarch_xxx() calls instead of relying on macros for a number of calls. (i386_coff_osabi_sniffer, i386_nlm_osabi_sniffer): New functions. (_initialize_i386_tdep): Add new 'struct-convcention' command. Register the various architecture variants defined in this file.
2002-06-14 21:42:20 +02:00
{
Update i386 and amd64 ports for unwinder changes. * amd64-tdep.c (amd64_frame_cache): Expect this_frame. (amd64_frame_this_id, amd64_frame_prev_register): Update signature. (amd64_frame_unwind): Use default_frame_sniffer. (amd64_frame_sniffer): Delete. (amd64_sigtramp_frame_cache): Expect this_frame. (amd64_sigtramp_frame_this_id, amd64_sigtramp_frame_prev_register) (amd64_sigtramp_frame_sniffer): Update signature. (amd64_sigtramp_frame_unwind): Add amd64_sigtramp_frame_sniffer. (amd64_frame_base_address): Expect this_frame. (amd64_dummy_id): Renamed from amd64_unwind_dummy_id. Expect this_frame. (amd64_init_abi): Use set_gdbarch_dummy_id and frame_unwind_append_unwinder. * i386-tdep.c (i386_frame_cache): Expect this_frame. (i386_frame_this_id, i386_frame_prev_register): Update signature. (i386_frame_unwind): Use default_frame_sniffer. (i386_frame_sniffer): Delete. (i386_sigtramp_frame_cache): Expect this_frame. (i386_sigtramp_frame_this_id, i386_sigtramp_frame_prev_register) (i386_sigtramp_frame_sniffer): Update signature. (i386_sigtramp_frame_unwind): Use i386_sigtramp_frame_sniffer. (i386_frame_base_address): Update signature. (i386_dummy_id): Rename from i386_unwind_dummy_id. Expect this_frame. (i386_push_dummy_call): Update comment. (i386_sigtramp_p, i386_svr4_sigtramp_p, i386_svr4_sigcontext_addr): Expect this_frame. (i386_gdbarch_init): Use set_gdbarch_dummy_id, dwarf2_append_unwinders, and frame_unwind_append_unwinder. * amd64-linux-tdep.c, amd64-sol2-tdep.c, amd64fbsd-tdep.c, amd64nbsd-tdep.c, amd64obsd-tdep.c, i386-linux-tdep.c, i386-nto-tdep.c, i386bsd-tdep.c, i386-sol2-tdep.c, i386obsd-tdep.c, i386nbsd-tdep.c: Update for unwinder changes.
2008-04-30 23:19:45 +02:00
CORE_ADDR pc = get_frame_pc (this_frame);
* blockframe.c (find_pc_partial_function_gnu_ifunc): Change type of "name" parameter to const char ** from char **. All callers updated. (find_pc_partial_function): Ditto. (cache_pc_function_name): Change type to const char * from char *. * symtab.h ((find_pc_partial_function_gnu_ifunc): Update. (find_pc_partial_function): Update. * alpha-tdep.h (struct gdbarch_tdep, member pc_in_sigtramp): Change type of "name" parameter to const char * from char *. All uses updated. * arch-utils.c (generic_in_solib_return_trampoline): Change type of "name" parameter to const char * from char *. * arch-utils.h (generic_in_solib_return_trampoline): Update. * frv-linux-tdep.c (frv_linux_pc_in_sigtramp): Change type of "name" parameter to const char * from char *. * gdbarch.sh (in_solib_return_trampoline): Ditto. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. * hppa-hpux-tdep.c (hppa_hpux_in_solib_return_trampoline): Update. * rs6000-tdep.c (rs6000_in_solib_return_trampoline): Update. * m32r-linux-tdep.c (m32r_linux_pc_in_sigtramp): Change type of "name" parameter to const char * from char *. * skip.c (skip_function_pc): Ditto. * sparc-sol2-tdep.c (sparc_sol2_pc_in_sigtramp): Ditto. * sparc-tdep.h (sparc_sol2_pc_in_sigtramp): Update. * sparc64fbsd-tdep.c (sparc64fbsd_pc_in_sigtramp): Ditto. * sparc64nbsd-tdep.c (sparc64nbsd_pc_in_sigtramp): Ditto. * sparc64obsd-tdep.c (sparc64obsd_pc_in_sigtramp): Ditto. * sparcnbsd-tdep.c (sparc32nbsd_pc_in_sigtramp): Ditto. * sparcobsd-tdep.c (sparc32obsd_pc_in_sigtramp): Ditto. * nbsd-tdep.c (nbsd_pc_in_sigtramp): Similary for "func_name". * nbsd-tdep.h (nbsd_pc_in_sigtramp): Update.
2012-02-02 21:19:17 +01:00
const char *name;
* amd64-tdep.c (amd64_sigtramp_frame_sniffer): Rewrite to use new sigtramp_p member of `struct gdbarch_tdep'. Also check whether the program counter is in the range specified by `struct gdbarch_tdep'. * amd64-linux-tdep.c: Include "symtab.h". (amd64_linux_pc_in_sigtramp): Remove function. (amd64_linux_sigtramp_p): New function. (amd64_linux_init_abi): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * amd64nbsd-tdep.c: Include "symtab.h". (amd64nbsd_sigtramp_p): New function. (amd64nbsd_init_abi): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * amd64obsd-tdep.c: Include "symtab.h" and "objfiles.h". Add a few comments. (amd64obsd_pc_in_sigtramp): Remove function. (amd64obsd_sigtramp_p): New function. (amd64obsd_init_abi): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * i386-tdep.h (struct gdbarch_tdep): Add sigtramp_p member. (i386bsd_pc_ins_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove prototypes. * i386-tdep.c (i386_sigtramp_frame_sniffer): Rewrite to use new sigtramp_p member of `struct gdbarch_tdep'. Also check whether the program counter is in the range specified by `struct gdbarch_tdep'. (i386_pc_in_sigtramp, i386_svr4_pc_in_sigtramp): Remove functions. (i386_sigtramp_p, i386_svr4_sigtramp_p): New functions. (i386_go32_pc_in_sigtramp): Remove function. (i386_svr4_init_abi): Don't set deprecated_pc_in_sigtramp. Initialize TDEP->sigtramp_p. (i386_go32_init_abi): Initialize TDEP->sigtramp_p to NULL. (i386_gdbarch_init): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * i386-linux-tdep.c: Adjust comments. (i386_linux_pc_in_sigtramp): Remove function. (i386_linux_sigtramp_p): New function. (i386_linux_init_abi): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * i386-nto-tdep.c: Update copyright year. (i386nto_pc_in_sigtramp): Remove function. (i386nto_sigtramp_p): New function. (i386nto_sigcontext_addr): Use I386_ESP_REGNUM instead of SP_REGNUM. (i386nto_init_abi): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * i386-sol2-tdep.c: Update copyright year. (i386_sol2_pc_in_sigtramp): Remove function. (i386_sol2_sigtramp_p): New function. (i386_sol2_init_abi): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * i386bsd-tdep.c (i386bsd_pc_in_sigtramp): Remove function. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove functions. (i386bsd_init_abi): Don't set deprecated_pc_in_sigtramp, deprecated_sigtramp_start and deprecated_sigtramp_end. * i386nbsd-tdep.c: Include "frame.h" and "symtab.h". (i386nbsd_pc_in_sigtramp): Remove function. (i386nbsd_sigtramp_p): New function. (i386nbsd_init_abi): Don't set deprecated_pc_in_sigtramp, deprecated_sigtramp_start, deprecated_sigtramp_end. Initialize TDEP->sigtramp_start, TDEP->sigtramp_end and TDEP->sigtramp_p. * i386obsd-tdep.c: Include "frame.h", "symtab.h" and "objfiles.h". (i386obsd_pc_in_sigtramp): Remove function. (i386obsd_sigtramp_p): New function. (i386obsd_sigtramp_start, i386obsd_sigtramp_end): Remove functions. (i386bsd_init_abi): Don't set deprecated_pc_in_sigtramp, deprecated_sigtramp_start, deprecated_sigtramp_end. Initialize TDEP->sigtramp_p. * Makefile.in (amd64-linux-tdep.o, amd64nbsd-tdep.o, amd64obsd-tdep.o, i386nbsd-tdep.o, i386obsd-tdep.o): Update dependencies.
2004-04-09 18:28:50 +02:00
find_pc_partial_function (pc, &name, NULL, NULL);
return (name && (strcmp ("sigacthandler", name) == 0
|| strcmp (name, "ucbsigvechandler") == 0));
* config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and i386bsd-tdep.o. Remove solib.o, solib-svr4.o and solib-legacy.o. Move these to ... * config/i386/i386sol2.mh: ... here. * config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Remove define. (sigtramp_saved_pc, I386V4_SIGTRAMP_SAVED_PC): Don't #undef. (SIGCONTEXT_PC_OFFSET): Remove define. (IN_SIGTRAMP): Remove define. * i386-sol2-tdep.c: New file. * config/i386/i386nw.mt (TM_FILE): Change to tm-i386.h. * config/i386/tm-i386nw.h: Removed. * config/i386/tm-fbsd.h (STAB_REG_TO_REGNUM, USE_STRUCT_CONVENTION): Remove defines. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsdaout.h (i386nbsd_aout_use_struct_convention): Remove prototype. (USE_STRUCT_CONVENTION): Remove prototype. * i386bsd-nat.c (i386bsd_sigcontext_pc_offset): Remove declaration. (_initialize_i386bsd_nat): Revise logic to determine some constants at compile time when compiling a native GDB. Warn if things don't match up with what we expect. * i386bsd-tdep.c (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove variables. (i386bsd_in_sigtramp): Rename tp i386bsd_pc_in_sigtramp. Rewrite to use date stored in `struct gdbarch_tdep'. (i386bsd_sigcontext_offset): Remove varaible. (i386bsd_sigtramp_saved_pc): Make public. Rewrite to use data stored in `struct gdbarch_tdep'. (i386bsd_frame_saved_pc): Make static. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): New functions. (i386bsd_sc_pc_offset, i386nbsd_sc_pc_offset, i386fbsd_sigtramp_start, i386fbsd_sigtramp_end, i386fbsd4_sc_pc_offset): New variables. (i386bsd_init_abi, i386nbsd_init_abi, i386nbsdelf_init_abi, i386fbsdaout_init_abi, i386fbsd_init_abi, i386fbsd4_init_abi): New functions. (i386bsd_aout_osabi_sniffer, _initialize_i386bsd_tdep): New functions. * i386fbsd-nat.c (_initialize_i386fbsd_nat): Fix type in comment. Modify the value of i386fbsd_sigtramp_start and i386fbsd_sigtramp_end instead of i386bsd_sigtramp_start and i386fbsd_sigtramp_end. * i386nbsd-tdep.c: (i386nbsd_aout_use_struct_convention): Remove function. * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Move define to i386-linux-tdep.h. (NUM_REGS, MAX_NUM_REGS, REGISTER_BYTES, REGISTER_NAME, REGISTER_BYTE, REGISTER_RAW_SIZE, STAB_REG_TO_REGNUM): Remove defines. (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size): Remove prototypes. (i386_linux_svr4_fetch_link_map_offsets): Remove prototype. (SVR4_FETCH_LINK_MAP_OFFSETS): Remove define. (IN_SIGTRAMP, FRAME_CHAIN, FRAME_SAVED_PC, SAVED_PC_AFTER_CALL, TARGET_WRITE_PC): Remove defines. (i386_linux_in_sigtramp, i386_linux_frame_chain, i386_linux_frame_saved_pc, i386_linux_saved_pc_after_call, i386_linux_write_pc): Remove prototypes. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-linux-tdep.h: New file. * i386-linux-nat.c: Include "i386-linux-tdep.h". * i386-linux-tdep.c: Include "i386-tdep.h" and "i386-linux-tdep.h". (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size, i386_linux_in_sigtramp, i386_linux_write_pc, i386_linux_svr4_fetch_link_map_offsets): Make static. (i386_linux_init_abi): New function. (_initialize_i386_linux_tdep): New function. * config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Remove define. (i386_saved_pc_after_call): Remove prototype. (MAX_NUM_REGS): Increase to deal with Linux's orig_eax "register". (REGISTER_NAME, STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Remove defines. (i386_register_name, i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum): Remove prototypes. (SIZEOF_GREGS, SIZEOF_FPU_REGS, SIZEOF_FPU_CTL_REGS, SIZEOF_SSE_REGS): Remove defines. (REGISTER_BYTES): Remove define. (REGISTER_BYTE, REGISTER_RAW_SIZE): Remove defines. (i386_register_byte, i386_register_raw_size): Remove prototypes. (FRAME_CHAIN, FRAME_SAVED_PC): Remove defines. (i386_frame_chain, i386_frame_saved_pc): Remove prototypes. * config/i386/tm-i386v4.h (FRAME_CHAIN_VALID): Remove define. (JB_ELEMENT_SIZE, JB_PC, JB_EBX, JB_ESI, JB_EDI, JB_EBP, JB_ESP, JB_EDX, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP): Remove defines. (sigtramp_saved_pc): Remove define. (i386v4_sigtramp_saved_pc): Remove prototype. * config/i386/tm-go32.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): Remove defines. (i386go32_frame_saved_pc): Remove prototype. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-tdep.h: Include "osabi.h". (enum i386_abi): Removed. (enum struct_return): New enum. (struct gdbarch_tdep): Remove abi member, add osabi, jb_pc_offset, struct_return, sigtramp_saved_pc, sigtramp_start, sigtramp_end and sc_pc_offset members. (i386_gdbarch_register_os_abi): Remove prototype. (I386_NUM_GREGS, I386_NUM_FREGS, I386_NUM_XREGS, I386_SSE_NUM_REGS): New defines. (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS, I386_SSE_SIZEOF_REGS): New defines. (i386_register_name, i386_register_byte, i386_register_raw_size): New prototypes. (i386_elf_init_abi, i386_svr4_init_abi): New prototypes. (i386bsd_sigtramp_saved_pc): New prototype. * i386-tdep.c: Don't include "elf-bfd.h". (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum, i386_frame_chain, i386_saved_pc_after_call): Make static. (i386_frame_saved_pc): Rewrite to call architecture dependent function to deal with signal handlers. Make static. (i386go32_frame_saved_pc): Removed. [GET_LONGJMP_TARGET] (JB_PC, JB_ELEMENT_SIZE, get_longjmp_target): Removed. (i386_get_longjmp_target): New function. (default_struct_convention, pcc_struct_convention, reg_struct_convention, valid_conventions, struct_convention): New variables. (i386_use_struct_convention): New function. (i386v4_sigtramp_saved_pc): Renamed to i386_svr4_sigtramp_saved_pc. Made static. Moved. (i386_pc_in_sigtramp): New function. (i386_abi_names): Removed. (ABI_TAG_OS_GNU_LINUX, ABI_TAG_OS_GNU_HURD, ABI_TAG_OS_GNU_SOLARIS, ABI_TAG_OS_FREEBSD, ABI_TAG_OS_NETBSD): Removed. (process_note_sections, i386_elf_abi_from_note, i386_elf_abi, i386_gdbarch_register_os_abi): Removed. (struct i386_abi_handler): Removed. (i386_abi_handler_list): Removed. (i386_svr4_pc_in_sigtramp, i386_go32_pc_in_sigtramp): New functions. (i386_elf_init_abi, i386_svr4_init_abi, i386_go32_init_abi, i386_nw_init_abi): New functions. (i386_gdbarch_init): Rewritten to use generic OS ABI framework. Use set_gdbarch_xxx() calls instead of relying on macros for a number of calls. (i386_coff_osabi_sniffer, i386_nlm_osabi_sniffer): New functions. (_initialize_i386_tdep): Add new 'struct-convcention' command. Register the various architecture variants defined in this file.
2002-06-14 21:42:20 +02:00
}
/* Solaris doesn't have a `struct sigcontext', but it does have a
`mcontext_t' that contains the saved set of machine registers. */
static CORE_ADDR
Update i386 and amd64 ports for unwinder changes. * amd64-tdep.c (amd64_frame_cache): Expect this_frame. (amd64_frame_this_id, amd64_frame_prev_register): Update signature. (amd64_frame_unwind): Use default_frame_sniffer. (amd64_frame_sniffer): Delete. (amd64_sigtramp_frame_cache): Expect this_frame. (amd64_sigtramp_frame_this_id, amd64_sigtramp_frame_prev_register) (amd64_sigtramp_frame_sniffer): Update signature. (amd64_sigtramp_frame_unwind): Add amd64_sigtramp_frame_sniffer. (amd64_frame_base_address): Expect this_frame. (amd64_dummy_id): Renamed from amd64_unwind_dummy_id. Expect this_frame. (amd64_init_abi): Use set_gdbarch_dummy_id and frame_unwind_append_unwinder. * i386-tdep.c (i386_frame_cache): Expect this_frame. (i386_frame_this_id, i386_frame_prev_register): Update signature. (i386_frame_unwind): Use default_frame_sniffer. (i386_frame_sniffer): Delete. (i386_sigtramp_frame_cache): Expect this_frame. (i386_sigtramp_frame_this_id, i386_sigtramp_frame_prev_register) (i386_sigtramp_frame_sniffer): Update signature. (i386_sigtramp_frame_unwind): Use i386_sigtramp_frame_sniffer. (i386_frame_base_address): Update signature. (i386_dummy_id): Rename from i386_unwind_dummy_id. Expect this_frame. (i386_push_dummy_call): Update comment. (i386_sigtramp_p, i386_svr4_sigtramp_p, i386_svr4_sigcontext_addr): Expect this_frame. (i386_gdbarch_init): Use set_gdbarch_dummy_id, dwarf2_append_unwinders, and frame_unwind_append_unwinder. * amd64-linux-tdep.c, amd64-sol2-tdep.c, amd64fbsd-tdep.c, amd64nbsd-tdep.c, amd64obsd-tdep.c, i386-linux-tdep.c, i386-nto-tdep.c, i386bsd-tdep.c, i386-sol2-tdep.c, i386obsd-tdep.c, i386nbsd-tdep.c: Update for unwinder changes.
2008-04-30 23:19:45 +02:00
i386_sol2_mcontext_addr (struct frame_info *this_frame)
{
CORE_ADDR sp, ucontext_addr;
Update i386 and amd64 ports for unwinder changes. * amd64-tdep.c (amd64_frame_cache): Expect this_frame. (amd64_frame_this_id, amd64_frame_prev_register): Update signature. (amd64_frame_unwind): Use default_frame_sniffer. (amd64_frame_sniffer): Delete. (amd64_sigtramp_frame_cache): Expect this_frame. (amd64_sigtramp_frame_this_id, amd64_sigtramp_frame_prev_register) (amd64_sigtramp_frame_sniffer): Update signature. (amd64_sigtramp_frame_unwind): Add amd64_sigtramp_frame_sniffer. (amd64_frame_base_address): Expect this_frame. (amd64_dummy_id): Renamed from amd64_unwind_dummy_id. Expect this_frame. (amd64_init_abi): Use set_gdbarch_dummy_id and frame_unwind_append_unwinder. * i386-tdep.c (i386_frame_cache): Expect this_frame. (i386_frame_this_id, i386_frame_prev_register): Update signature. (i386_frame_unwind): Use default_frame_sniffer. (i386_frame_sniffer): Delete. (i386_sigtramp_frame_cache): Expect this_frame. (i386_sigtramp_frame_this_id, i386_sigtramp_frame_prev_register) (i386_sigtramp_frame_sniffer): Update signature. (i386_sigtramp_frame_unwind): Use i386_sigtramp_frame_sniffer. (i386_frame_base_address): Update signature. (i386_dummy_id): Rename from i386_unwind_dummy_id. Expect this_frame. (i386_push_dummy_call): Update comment. (i386_sigtramp_p, i386_svr4_sigtramp_p, i386_svr4_sigcontext_addr): Expect this_frame. (i386_gdbarch_init): Use set_gdbarch_dummy_id, dwarf2_append_unwinders, and frame_unwind_append_unwinder. * amd64-linux-tdep.c, amd64-sol2-tdep.c, amd64fbsd-tdep.c, amd64nbsd-tdep.c, amd64obsd-tdep.c, i386-linux-tdep.c, i386-nto-tdep.c, i386bsd-tdep.c, i386-sol2-tdep.c, i386obsd-tdep.c, i386nbsd-tdep.c: Update for unwinder changes.
2008-04-30 23:19:45 +02:00
sp = get_frame_register_unsigned (this_frame, I386_ESP_REGNUM);
ucontext_addr = get_frame_memory_unsigned (this_frame, sp + 8, 4);
return ucontext_addr + 36;
}
/* SunPRO encodes the static variables. This is not related to C++
mangling, it is done for C too. */
* gdbtypes.h (struct main_type): Change type of name,tag_name, and fields.name members from char * to const char *. All uses updated. (struct cplus_struct_type): Change type of fn_fieldlists.name member from char * to const char *. All uses updated. (type_name_no_tag): Update. (lookup_unsigned_typename, lookup_signed_typename): Update. * gdbtypes.c (type_name_no_tag): Change result type from char * to const char *. All callers updated. (lookup_unsigned_typename, lookup_signed_typename): Change type of name parameter from char * to const char *. * symtab.h (struct cplus_specific): Change type of demangled_name member from char * to const char *. All uses updated. (struct general_symbol_info): Change type of name and mangled_lang.demangled_name members from char * to const char *. All uses updated. (symbol_get_demangled_name, symbol_natural_name): Update. (symbol_demangled_name, symbol_search_name): Update. * symtab.c (symbol_get_demangled_name): Change result type from char * to const char *. All callers updated. (symbol_natural_name, symbol_demangled_name): Ditto. (symbol_search_name): Ditto. (completion_list_add_name): Change type of symname,sym_text, text,word parameters from char * to const char *. (completion_list_objc_symbol): Change type of sym_text, text,word parameters from char * to const char *. * ada-lang.c (find_struct_field): Change type of name parameter from char * to const char *. (encoded_ordered_before): Similarly for N0,N1 parameters. (old_renaming_is_invisible): Similarly for function_name parameter. (ada_type_name): Change result type from char * to const char *. All callers updated. * ada-lang.h (ada_type_name): Update. * buildsym.c (hashname): Change type of name parameter from char * to const char *. * buildsym.h (hashname): Update. * dbxread.c (end_psymtab): Change type of include_list parameter from char ** to const char **. * dwarf2read.c (determine_prefix): Change result type from char * to const char *. All callers updated. * f-lang.c (find_common_for_function): Change type of name, funcname parameters from char * to const char *. * f-lang.c (find_common_for_function): Update. * f-valprint.c (list_all_visible_commons): Change type of funcname parameters from char * to const char *. * gdbarch.sh (static_transform_name): Change type of name parameter and result from char * to const char *. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. * i386-sol2-tdep.c (i386_sol2_static_transform_name): Change type of name parameter from char * to const char *. * jv-lang.c (java_primitive_type_from_name): Ditto. (java_demangled_signature_length): Similarly for signature parameter. (java_demangled_signature_copy): Ditto. (java_demangle_type_signature): Ditto. * jv-lang.h (java_primitive_type_from_name): Update. (java_demangle_type_signature): Update. * objc-lang.c (specialcmp): Change type of a,b parameters from char * to const char *. * p-lang.c (is_pascal_string_type): Change type of arrayname parameter from char * to const char *. All callers updated. * p-lang.h (is_pascal_string_type): Update. * solib-frv.c (find_canonical_descriptor_in_load_object): Change type of name parameter from char * to const char *. * sparc-sol2-tdep.c (sparc_sol2_static_transform_name): Ditto. * utils.c (fprintf_symbol_filtered): Ditto. * defs.h (fprintf_symbol_filtered): Update. * sparc-tdep.h (sparc_sol2_static_transform_name): Update. * stabsread.h (end_psymtab): Update. * stack.c (find_frame_funname): Change type of funname parameter from char ** to const char **. * stack.h (find_frame_funname): Update. * typeprint.c (type_print): Change type of varstring parameter from char * to const char *. * value.h (type_print): Update. * xcoffread.c (xcoff_start_psymtab): Change type of filename parameter from char * to const char *. All callers updated. (xcoff_end_psymtab): Change type of include_list parameter from char ** to const char **. All callers updated. (swap_sym): Similarly for name parameter. All callers updated. * coffread.c (patch_type): Add (char*) cast to xfree parameter. Use xstrdup. (process_coff_symbol): Use xstrdup. * stabsread.c (stabs_method_name_from_physname): Renamed from update_method_name_from_physname. Change result type from void to char *. All callers updated. (read_member_functions): In has_destructor case, store name in objfile obstack instead of malloc space. In !has_stub case, fix mem leak.
2012-02-07 05:48:23 +01:00
static const char *
i386_sol2_static_transform_name (const char *name)
{
char *p;
if (name[0] == '.')
{
/* For file-local statics there will be a period, a bunch of
junk (the contents of which match a string given in the
N_OPT), a period and the name. For function-local statics
there will be a bunch of junk (which seems to change the
second character from 'A' to 'B'), a period, the name of the
function, and the name. So just skip everything before the
last period. */
p = strrchr (name, '.');
if (p != NULL)
name = p + 1;
}
return name;
}
* config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and i386bsd-tdep.o. Remove solib.o, solib-svr4.o and solib-legacy.o. Move these to ... * config/i386/i386sol2.mh: ... here. * config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Remove define. (sigtramp_saved_pc, I386V4_SIGTRAMP_SAVED_PC): Don't #undef. (SIGCONTEXT_PC_OFFSET): Remove define. (IN_SIGTRAMP): Remove define. * i386-sol2-tdep.c: New file. * config/i386/i386nw.mt (TM_FILE): Change to tm-i386.h. * config/i386/tm-i386nw.h: Removed. * config/i386/tm-fbsd.h (STAB_REG_TO_REGNUM, USE_STRUCT_CONVENTION): Remove defines. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsdaout.h (i386nbsd_aout_use_struct_convention): Remove prototype. (USE_STRUCT_CONVENTION): Remove prototype. * i386bsd-nat.c (i386bsd_sigcontext_pc_offset): Remove declaration. (_initialize_i386bsd_nat): Revise logic to determine some constants at compile time when compiling a native GDB. Warn if things don't match up with what we expect. * i386bsd-tdep.c (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove variables. (i386bsd_in_sigtramp): Rename tp i386bsd_pc_in_sigtramp. Rewrite to use date stored in `struct gdbarch_tdep'. (i386bsd_sigcontext_offset): Remove varaible. (i386bsd_sigtramp_saved_pc): Make public. Rewrite to use data stored in `struct gdbarch_tdep'. (i386bsd_frame_saved_pc): Make static. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): New functions. (i386bsd_sc_pc_offset, i386nbsd_sc_pc_offset, i386fbsd_sigtramp_start, i386fbsd_sigtramp_end, i386fbsd4_sc_pc_offset): New variables. (i386bsd_init_abi, i386nbsd_init_abi, i386nbsdelf_init_abi, i386fbsdaout_init_abi, i386fbsd_init_abi, i386fbsd4_init_abi): New functions. (i386bsd_aout_osabi_sniffer, _initialize_i386bsd_tdep): New functions. * i386fbsd-nat.c (_initialize_i386fbsd_nat): Fix type in comment. Modify the value of i386fbsd_sigtramp_start and i386fbsd_sigtramp_end instead of i386bsd_sigtramp_start and i386fbsd_sigtramp_end. * i386nbsd-tdep.c: (i386nbsd_aout_use_struct_convention): Remove function. * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Move define to i386-linux-tdep.h. (NUM_REGS, MAX_NUM_REGS, REGISTER_BYTES, REGISTER_NAME, REGISTER_BYTE, REGISTER_RAW_SIZE, STAB_REG_TO_REGNUM): Remove defines. (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size): Remove prototypes. (i386_linux_svr4_fetch_link_map_offsets): Remove prototype. (SVR4_FETCH_LINK_MAP_OFFSETS): Remove define. (IN_SIGTRAMP, FRAME_CHAIN, FRAME_SAVED_PC, SAVED_PC_AFTER_CALL, TARGET_WRITE_PC): Remove defines. (i386_linux_in_sigtramp, i386_linux_frame_chain, i386_linux_frame_saved_pc, i386_linux_saved_pc_after_call, i386_linux_write_pc): Remove prototypes. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-linux-tdep.h: New file. * i386-linux-nat.c: Include "i386-linux-tdep.h". * i386-linux-tdep.c: Include "i386-tdep.h" and "i386-linux-tdep.h". (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size, i386_linux_in_sigtramp, i386_linux_write_pc, i386_linux_svr4_fetch_link_map_offsets): Make static. (i386_linux_init_abi): New function. (_initialize_i386_linux_tdep): New function. * config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Remove define. (i386_saved_pc_after_call): Remove prototype. (MAX_NUM_REGS): Increase to deal with Linux's orig_eax "register". (REGISTER_NAME, STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Remove defines. (i386_register_name, i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum): Remove prototypes. (SIZEOF_GREGS, SIZEOF_FPU_REGS, SIZEOF_FPU_CTL_REGS, SIZEOF_SSE_REGS): Remove defines. (REGISTER_BYTES): Remove define. (REGISTER_BYTE, REGISTER_RAW_SIZE): Remove defines. (i386_register_byte, i386_register_raw_size): Remove prototypes. (FRAME_CHAIN, FRAME_SAVED_PC): Remove defines. (i386_frame_chain, i386_frame_saved_pc): Remove prototypes. * config/i386/tm-i386v4.h (FRAME_CHAIN_VALID): Remove define. (JB_ELEMENT_SIZE, JB_PC, JB_EBX, JB_ESI, JB_EDI, JB_EBP, JB_ESP, JB_EDX, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP): Remove defines. (sigtramp_saved_pc): Remove define. (i386v4_sigtramp_saved_pc): Remove prototype. * config/i386/tm-go32.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): Remove defines. (i386go32_frame_saved_pc): Remove prototype. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-tdep.h: Include "osabi.h". (enum i386_abi): Removed. (enum struct_return): New enum. (struct gdbarch_tdep): Remove abi member, add osabi, jb_pc_offset, struct_return, sigtramp_saved_pc, sigtramp_start, sigtramp_end and sc_pc_offset members. (i386_gdbarch_register_os_abi): Remove prototype. (I386_NUM_GREGS, I386_NUM_FREGS, I386_NUM_XREGS, I386_SSE_NUM_REGS): New defines. (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS, I386_SSE_SIZEOF_REGS): New defines. (i386_register_name, i386_register_byte, i386_register_raw_size): New prototypes. (i386_elf_init_abi, i386_svr4_init_abi): New prototypes. (i386bsd_sigtramp_saved_pc): New prototype. * i386-tdep.c: Don't include "elf-bfd.h". (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum, i386_frame_chain, i386_saved_pc_after_call): Make static. (i386_frame_saved_pc): Rewrite to call architecture dependent function to deal with signal handlers. Make static. (i386go32_frame_saved_pc): Removed. [GET_LONGJMP_TARGET] (JB_PC, JB_ELEMENT_SIZE, get_longjmp_target): Removed. (i386_get_longjmp_target): New function. (default_struct_convention, pcc_struct_convention, reg_struct_convention, valid_conventions, struct_convention): New variables. (i386_use_struct_convention): New function. (i386v4_sigtramp_saved_pc): Renamed to i386_svr4_sigtramp_saved_pc. Made static. Moved. (i386_pc_in_sigtramp): New function. (i386_abi_names): Removed. (ABI_TAG_OS_GNU_LINUX, ABI_TAG_OS_GNU_HURD, ABI_TAG_OS_GNU_SOLARIS, ABI_TAG_OS_FREEBSD, ABI_TAG_OS_NETBSD): Removed. (process_note_sections, i386_elf_abi_from_note, i386_elf_abi, i386_gdbarch_register_os_abi): Removed. (struct i386_abi_handler): Removed. (i386_abi_handler_list): Removed. (i386_svr4_pc_in_sigtramp, i386_go32_pc_in_sigtramp): New functions. (i386_elf_init_abi, i386_svr4_init_abi, i386_go32_init_abi, i386_nw_init_abi): New functions. (i386_gdbarch_init): Rewritten to use generic OS ABI framework. Use set_gdbarch_xxx() calls instead of relying on macros for a number of calls. (i386_coff_osabi_sniffer, i386_nlm_osabi_sniffer): New functions. (_initialize_i386_tdep): Add new 'struct-convcention' command. Register the various architecture variants defined in this file.
2002-06-14 21:42:20 +02:00
/* Solaris 2. */
static void
i386_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
/* Solaris is SVR4-based. */
i386_svr4_init_abi (info, gdbarch);
* gdbarch.sh (sofun_address_maybe_missing): New gdbarch variable. * gdbarch.c, gdbarch.h: Regenerate. * dbxread.c (find_stab_function_addr): Define unconditionally. (read_dbx_symtab): Use gdbarch_sofun_address_maybe_missing instead of SOFUN_ADDRESS_MAYBE_MISSING. (end_psymtab): Likewise. (process_one_symbol): Likewise. * mdebugread.c (parse_partial_symbols): Likewise. * symtab.h (struct minimal_symbol): Always define "filename" member. * elfread.c (elf_symtab_read): Use msym->filename unconditionally. * minsyms.c (lookup_minimal_symbol): Likewise. * symmisc.c (dump_msymbols): Likewise. * config/i386/i386sol2.mt (DEPRECATED_TM_FILE): Remove. * config/i386/linux.mt (DEPRECATED_TM_FILE): Remove. * config/i386/tm-i386sol2.h: Remove file. * config/i386/tm-linux.h: Remove file. * i386-linux-tdep.c (i386_linux_init_abi): Add call to set_gdbarch_sofun_address_maybe_missing. * i386-sol2-tdep.c (i386_sol2_init_abi): Likewise. * config/powerpc/linux.mt (DEPRECATED_TM_FILE): Remove. * config/powerpc/nbsd.mt (DEPRECATED_TM_FILE): Remove. * config/powerpc/obsd.mt (DEPRECATED_TM_FILE): Remove. * config/powerpc/ppc-eabi.mt (DEPRECATED_TM_FILE): Remove. * config/powerpc/ppc-sim.mt (DEPRECATED_TM_FILE): Remove. * config/powerpc/tm-ppc-eabi.h: Remove file. * rs6000-tdep.c (rs6000_gdbarch_init): Add call to set_gdbarch_sofun_address_maybe_missing. * config/sparc/sol2-64.mt (DEPRECATED_TM_FILE): Remove. * config/sparc/sol2.mt (DEPRECATED_TM_FILE): Remove. * config/sparc/tm-sol2.h: Remove file. * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Add call to set_gdbarch_sofun_address_maybe_missing. * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Likewise. doc/ChangeLog: * gdbarch.texi (Target Conditionals): Remove documentation of SOFUN_ADDRESS_MAYBE_MISSING, replaced by ... (Compiler Characteristics): ... documentation of set_gdbarch_sofun_address_maybe_missing.
2007-10-19 14:26:35 +02:00
/* The SunPRO compiler puts out 0 instead of the address in N_SO symbols,
and for SunPRO 3.0, N_FUN symbols too. */
set_gdbarch_sofun_address_maybe_missing (gdbarch, 1);
/* Handle SunPRO encoding of static symbols. */
set_gdbarch_static_transform_name (gdbarch, i386_sol2_static_transform_name);
/* Solaris reserves space for its FPU emulator in `fpregset_t'.
There is also some space reserved for the registers of a Weitek
math coprocessor. */
tdep->gregset_reg_offset = i386_sol2_gregset_reg_offset;
tdep->gregset_num_regs = ARRAY_SIZE (i386_sol2_gregset_reg_offset);
tdep->sizeof_gregset = 19 * 4;
tdep->sizeof_fpregset = 380;
* amd64-tdep.c (amd64_sigtramp_frame_sniffer): Rewrite to use new sigtramp_p member of `struct gdbarch_tdep'. Also check whether the program counter is in the range specified by `struct gdbarch_tdep'. * amd64-linux-tdep.c: Include "symtab.h". (amd64_linux_pc_in_sigtramp): Remove function. (amd64_linux_sigtramp_p): New function. (amd64_linux_init_abi): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * amd64nbsd-tdep.c: Include "symtab.h". (amd64nbsd_sigtramp_p): New function. (amd64nbsd_init_abi): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * amd64obsd-tdep.c: Include "symtab.h" and "objfiles.h". Add a few comments. (amd64obsd_pc_in_sigtramp): Remove function. (amd64obsd_sigtramp_p): New function. (amd64obsd_init_abi): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * i386-tdep.h (struct gdbarch_tdep): Add sigtramp_p member. (i386bsd_pc_ins_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove prototypes. * i386-tdep.c (i386_sigtramp_frame_sniffer): Rewrite to use new sigtramp_p member of `struct gdbarch_tdep'. Also check whether the program counter is in the range specified by `struct gdbarch_tdep'. (i386_pc_in_sigtramp, i386_svr4_pc_in_sigtramp): Remove functions. (i386_sigtramp_p, i386_svr4_sigtramp_p): New functions. (i386_go32_pc_in_sigtramp): Remove function. (i386_svr4_init_abi): Don't set deprecated_pc_in_sigtramp. Initialize TDEP->sigtramp_p. (i386_go32_init_abi): Initialize TDEP->sigtramp_p to NULL. (i386_gdbarch_init): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * i386-linux-tdep.c: Adjust comments. (i386_linux_pc_in_sigtramp): Remove function. (i386_linux_sigtramp_p): New function. (i386_linux_init_abi): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * i386-nto-tdep.c: Update copyright year. (i386nto_pc_in_sigtramp): Remove function. (i386nto_sigtramp_p): New function. (i386nto_sigcontext_addr): Use I386_ESP_REGNUM instead of SP_REGNUM. (i386nto_init_abi): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * i386-sol2-tdep.c: Update copyright year. (i386_sol2_pc_in_sigtramp): Remove function. (i386_sol2_sigtramp_p): New function. (i386_sol2_init_abi): Initialize TDEP->sigtramp_p. Don't set deprecated_pc_in_sigtramp. * i386bsd-tdep.c (i386bsd_pc_in_sigtramp): Remove function. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove functions. (i386bsd_init_abi): Don't set deprecated_pc_in_sigtramp, deprecated_sigtramp_start and deprecated_sigtramp_end. * i386nbsd-tdep.c: Include "frame.h" and "symtab.h". (i386nbsd_pc_in_sigtramp): Remove function. (i386nbsd_sigtramp_p): New function. (i386nbsd_init_abi): Don't set deprecated_pc_in_sigtramp, deprecated_sigtramp_start, deprecated_sigtramp_end. Initialize TDEP->sigtramp_start, TDEP->sigtramp_end and TDEP->sigtramp_p. * i386obsd-tdep.c: Include "frame.h", "symtab.h" and "objfiles.h". (i386obsd_pc_in_sigtramp): Remove function. (i386obsd_sigtramp_p): New function. (i386obsd_sigtramp_start, i386obsd_sigtramp_end): Remove functions. (i386bsd_init_abi): Don't set deprecated_pc_in_sigtramp, deprecated_sigtramp_start, deprecated_sigtramp_end. Initialize TDEP->sigtramp_p. * Makefile.in (amd64-linux-tdep.o, amd64nbsd-tdep.o, amd64obsd-tdep.o, i386nbsd-tdep.o, i386obsd-tdep.o): Update dependencies.
2004-04-09 18:28:50 +02:00
/* Signal trampolines are slightly different from SVR4. */
tdep->sigtramp_p = i386_sol2_sigtramp_p;
tdep->sigcontext_addr = i386_sol2_mcontext_addr;
tdep->sc_reg_offset = tdep->gregset_reg_offset;
tdep->sc_num_regs = tdep->gregset_num_regs;
/* Solaris has SVR4-style shared libraries. */
set_gdbarch_skip_solib_resolver (gdbarch, sol2_skip_solib_resolver);
set_solib_svr4_fetch_link_map_offsets
(gdbarch, svr4_ilp32_fetch_link_map_offsets);
* corelow.c (get_core_registers): Adjust. (core_file_thread_alive): Rename to... (core_thread_alive): ... this. (core_pid_to_str): Try gdbarch_core_pid_to_str first. (init_core_ops): Adjust. (coreops_suppress_target): Delete. (_initialize_corelow): Unconditionally add core_ops. * procfs.c: Include "inf-child.h". (procfs_ops): Delete. (init_procfs_ops): Delete. Reimplement as... (procfs_target): ... this, inheriting from inf-child. (procfs_attach, procfs_detach, procfs_fetch_registers): Adjust. (procfs_prepare_to_store): Delete. (procfs_store_registers, procfs_resume): Adjust. (procfs_open): Delete. (procfs_suppress_run): Delete. (procfs_can_run): Delete. (procfs_mourn_inferior): Adjust. (procfs_init_inferior): Add target_ops parameter. Adjust. (procfs_create_inferior): Don't pass procfs_init_inferior to fork_inferior. Instead call it after fork_inferior returns. (procfs_find_new_threads): Adjust. (_initialize_procfs): Adjust to use procfs_target instead of init_procfs_ops. * sol-thread.c (orig_core_ops, sol_core_ops): Delete. (lwp_to_thread): Use target_thread_alive. (sol_thread_open): Delete. (sol_thread_attach): Delete. (sol_thread_detach, sol_thread_resume, sol_thread_wait) (sol_thread_fetch_registers, sol_thread_store_registers): Adjust to use find_target_beneath. (sol_thread_prepare_to_store, sol_thread_xfer_memory): Delete. (sol_thread_xfer_partial): Adjust to use find_target_beneath. (sol_thread_files_info, sol_thread_kill_inferior): Delete. (check_for_thread_db): New. (sol_thread_notice_signals, sol_thread_create_inferior): Delete. (sol_thread_new_objfile): Call check_for_thread_db. (sol_thread_mourn_inferior): Adjust to use find_target_beneath. (sol_thread_can_run): Delete. (sol_thread_alive): Adjust to use find_target_beneath. (sol_thread_stop): Delete. (rw_common): Use target_write_memory or target_read_memory. (ps_lgetregs, ps_lgetfpregs): Use target_fetch_registers. (ps_lsetregs, ps_lsetfpregs): Use target_store_registers. (solaris_pid_to_str): Remove check for libthread_db initialization failing. (sol_find_new_threads): Remove check for libthread_db initialization failing, or for an invalid inferior_ptid. Adjust to use find_target_beneath. (sol_core_open, sol_core_close, sol_core_detach, sol_core_files_info, sol_find_memory_regions, sol_make_note_section, ignore): Delete. (init_sol_thread_ops): Make it a thread_stratum target. Remove unneeded callback settings. (init_sol_core_ops): Delete. (_initialize_sol_thread): No longer call init_sol_core_ops, set procfs_suppress_run, or hack with core_ops. * target.h (struct target_ops): Add a target_ops * parameter to to_resume, to_fetch_registers, to_store_registers, to_thread_alive and to_find_new_threads. (target_fetch_registers, target_store_registers) (target_thread_alive, target_find_new_threads): Redeclare as function. * target.c (update_current_target): Do not inherit or de_fault to_resume, to_fetch_registers, to_store_registers, to_thread_alive, to_find_new_threads. (target_resume): Adjust. (target_thread_alive, target_find_new_threads): New. (debug_to_resume, debug_to_fetch_registers): Delete. (target_fetch_registers): New. (debug_to_store_registers): Delete. (target_store_registers): New. (debug_to_thread_alive, debug_to_find_new_threads): Delete. (setup_target_debug): Adjust. * gdbcore.h (core_ops): Delete declaration. * inf-ptrace.c, linux-nat.c, remote.c, amd64-linux-nat.c, inf-child.c, linux-thread-db.c, bsd-uthread.c, inf-ttrace.c, i386-sol2-tdep.c, darwin-nat.c, gnu-nat.c, go32-nat.c, hpux-thread.c, i386-linux-nat.c, i386fbsd-nat.c, monitor.c, nto-procfs.c, remote-m32r-sdi.c, remote-mips.c, windows-nat.c, alphabsd-nat.c, amd64bsd-nat.c, arm-linux-nat.c, armnbsd-nat.c, bsd-kvm.c, hppa-hpux-nat.c, hppa-linux-nat.c, hppabsd-nat.c, hppanbsd-nat.c, i386-darwin-nat.c, i386bsd-nat.c, ia64-linux-nat.c, m32r-linux-nat.c, m68kbsd-nat.c, m68klinux-nat.c, m88kbsd-nat.c, mips-linux-nat.c, mips64obsd-nat.c, mipsnbsd-nat.c, ppc-linux-nat.c, ppcnbsd-nat.c, ppcobsd-nat.c, remote-sim.c, rs6000-nat.c, s390-nat.c, shnbsd-nat.c, sparc-nat.c, sparc-nat.h, spu-linux-nat.c, vaxbsd-nat.c, xtensa-linux-nat.c: Adjust to target_ops changes. * gdbarch.sh (core_pid_to_str): New gdbarch callback. * gdbarch.h, gdbarch.c: Regenerate. * sol2-tdep.c: Include "inferior.h". (sol2_core_pid_to_str): New. * sol2-tdep.h (sol2_core_pid_to_str): Declare. * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it. * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it. * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it. * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
2009-02-23 01:03:50 +01:00
/* How to print LWP PTIDs from core files. */
set_gdbarch_core_pid_to_str (gdbarch, sol2_core_pid_to_str);
* config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and i386bsd-tdep.o. Remove solib.o, solib-svr4.o and solib-legacy.o. Move these to ... * config/i386/i386sol2.mh: ... here. * config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Remove define. (sigtramp_saved_pc, I386V4_SIGTRAMP_SAVED_PC): Don't #undef. (SIGCONTEXT_PC_OFFSET): Remove define. (IN_SIGTRAMP): Remove define. * i386-sol2-tdep.c: New file. * config/i386/i386nw.mt (TM_FILE): Change to tm-i386.h. * config/i386/tm-i386nw.h: Removed. * config/i386/tm-fbsd.h (STAB_REG_TO_REGNUM, USE_STRUCT_CONVENTION): Remove defines. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsdaout.h (i386nbsd_aout_use_struct_convention): Remove prototype. (USE_STRUCT_CONVENTION): Remove prototype. * i386bsd-nat.c (i386bsd_sigcontext_pc_offset): Remove declaration. (_initialize_i386bsd_nat): Revise logic to determine some constants at compile time when compiling a native GDB. Warn if things don't match up with what we expect. * i386bsd-tdep.c (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove variables. (i386bsd_in_sigtramp): Rename tp i386bsd_pc_in_sigtramp. Rewrite to use date stored in `struct gdbarch_tdep'. (i386bsd_sigcontext_offset): Remove varaible. (i386bsd_sigtramp_saved_pc): Make public. Rewrite to use data stored in `struct gdbarch_tdep'. (i386bsd_frame_saved_pc): Make static. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): New functions. (i386bsd_sc_pc_offset, i386nbsd_sc_pc_offset, i386fbsd_sigtramp_start, i386fbsd_sigtramp_end, i386fbsd4_sc_pc_offset): New variables. (i386bsd_init_abi, i386nbsd_init_abi, i386nbsdelf_init_abi, i386fbsdaout_init_abi, i386fbsd_init_abi, i386fbsd4_init_abi): New functions. (i386bsd_aout_osabi_sniffer, _initialize_i386bsd_tdep): New functions. * i386fbsd-nat.c (_initialize_i386fbsd_nat): Fix type in comment. Modify the value of i386fbsd_sigtramp_start and i386fbsd_sigtramp_end instead of i386bsd_sigtramp_start and i386fbsd_sigtramp_end. * i386nbsd-tdep.c: (i386nbsd_aout_use_struct_convention): Remove function. * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Move define to i386-linux-tdep.h. (NUM_REGS, MAX_NUM_REGS, REGISTER_BYTES, REGISTER_NAME, REGISTER_BYTE, REGISTER_RAW_SIZE, STAB_REG_TO_REGNUM): Remove defines. (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size): Remove prototypes. (i386_linux_svr4_fetch_link_map_offsets): Remove prototype. (SVR4_FETCH_LINK_MAP_OFFSETS): Remove define. (IN_SIGTRAMP, FRAME_CHAIN, FRAME_SAVED_PC, SAVED_PC_AFTER_CALL, TARGET_WRITE_PC): Remove defines. (i386_linux_in_sigtramp, i386_linux_frame_chain, i386_linux_frame_saved_pc, i386_linux_saved_pc_after_call, i386_linux_write_pc): Remove prototypes. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-linux-tdep.h: New file. * i386-linux-nat.c: Include "i386-linux-tdep.h". * i386-linux-tdep.c: Include "i386-tdep.h" and "i386-linux-tdep.h". (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size, i386_linux_in_sigtramp, i386_linux_write_pc, i386_linux_svr4_fetch_link_map_offsets): Make static. (i386_linux_init_abi): New function. (_initialize_i386_linux_tdep): New function. * config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Remove define. (i386_saved_pc_after_call): Remove prototype. (MAX_NUM_REGS): Increase to deal with Linux's orig_eax "register". (REGISTER_NAME, STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Remove defines. (i386_register_name, i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum): Remove prototypes. (SIZEOF_GREGS, SIZEOF_FPU_REGS, SIZEOF_FPU_CTL_REGS, SIZEOF_SSE_REGS): Remove defines. (REGISTER_BYTES): Remove define. (REGISTER_BYTE, REGISTER_RAW_SIZE): Remove defines. (i386_register_byte, i386_register_raw_size): Remove prototypes. (FRAME_CHAIN, FRAME_SAVED_PC): Remove defines. (i386_frame_chain, i386_frame_saved_pc): Remove prototypes. * config/i386/tm-i386v4.h (FRAME_CHAIN_VALID): Remove define. (JB_ELEMENT_SIZE, JB_PC, JB_EBX, JB_ESI, JB_EDI, JB_EBP, JB_ESP, JB_EDX, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP): Remove defines. (sigtramp_saved_pc): Remove define. (i386v4_sigtramp_saved_pc): Remove prototype. * config/i386/tm-go32.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): Remove defines. (i386go32_frame_saved_pc): Remove prototype. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-tdep.h: Include "osabi.h". (enum i386_abi): Removed. (enum struct_return): New enum. (struct gdbarch_tdep): Remove abi member, add osabi, jb_pc_offset, struct_return, sigtramp_saved_pc, sigtramp_start, sigtramp_end and sc_pc_offset members. (i386_gdbarch_register_os_abi): Remove prototype. (I386_NUM_GREGS, I386_NUM_FREGS, I386_NUM_XREGS, I386_SSE_NUM_REGS): New defines. (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS, I386_SSE_SIZEOF_REGS): New defines. (i386_register_name, i386_register_byte, i386_register_raw_size): New prototypes. (i386_elf_init_abi, i386_svr4_init_abi): New prototypes. (i386bsd_sigtramp_saved_pc): New prototype. * i386-tdep.c: Don't include "elf-bfd.h". (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum, i386_frame_chain, i386_saved_pc_after_call): Make static. (i386_frame_saved_pc): Rewrite to call architecture dependent function to deal with signal handlers. Make static. (i386go32_frame_saved_pc): Removed. [GET_LONGJMP_TARGET] (JB_PC, JB_ELEMENT_SIZE, get_longjmp_target): Removed. (i386_get_longjmp_target): New function. (default_struct_convention, pcc_struct_convention, reg_struct_convention, valid_conventions, struct_convention): New variables. (i386_use_struct_convention): New function. (i386v4_sigtramp_saved_pc): Renamed to i386_svr4_sigtramp_saved_pc. Made static. Moved. (i386_pc_in_sigtramp): New function. (i386_abi_names): Removed. (ABI_TAG_OS_GNU_LINUX, ABI_TAG_OS_GNU_HURD, ABI_TAG_OS_GNU_SOLARIS, ABI_TAG_OS_FREEBSD, ABI_TAG_OS_NETBSD): Removed. (process_note_sections, i386_elf_abi_from_note, i386_elf_abi, i386_gdbarch_register_os_abi): Removed. (struct i386_abi_handler): Removed. (i386_abi_handler_list): Removed. (i386_svr4_pc_in_sigtramp, i386_go32_pc_in_sigtramp): New functions. (i386_elf_init_abi, i386_svr4_init_abi, i386_go32_init_abi, i386_nw_init_abi): New functions. (i386_gdbarch_init): Rewritten to use generic OS ABI framework. Use set_gdbarch_xxx() calls instead of relying on macros for a number of calls. (i386_coff_osabi_sniffer, i386_nlm_osabi_sniffer): New functions. (_initialize_i386_tdep): Add new 'struct-convcention' command. Register the various architecture variants defined in this file.
2002-06-14 21:42:20 +02:00
}
static enum gdb_osabi
i386_sol2_osabi_sniffer (bfd *abfd)
{
/* If we have a section named .SUNW_version, then it is almost
certainly Solaris 2. */
if (bfd_get_section_by_name (abfd, ".SUNW_version"))
return GDB_OSABI_SOLARIS;
return GDB_OSABI_UNKNOWN;
}
* config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and i386bsd-tdep.o. Remove solib.o, solib-svr4.o and solib-legacy.o. Move these to ... * config/i386/i386sol2.mh: ... here. * config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Remove define. (sigtramp_saved_pc, I386V4_SIGTRAMP_SAVED_PC): Don't #undef. (SIGCONTEXT_PC_OFFSET): Remove define. (IN_SIGTRAMP): Remove define. * i386-sol2-tdep.c: New file. * config/i386/i386nw.mt (TM_FILE): Change to tm-i386.h. * config/i386/tm-i386nw.h: Removed. * config/i386/tm-fbsd.h (STAB_REG_TO_REGNUM, USE_STRUCT_CONVENTION): Remove defines. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsdaout.h (i386nbsd_aout_use_struct_convention): Remove prototype. (USE_STRUCT_CONVENTION): Remove prototype. * i386bsd-nat.c (i386bsd_sigcontext_pc_offset): Remove declaration. (_initialize_i386bsd_nat): Revise logic to determine some constants at compile time when compiling a native GDB. Warn if things don't match up with what we expect. * i386bsd-tdep.c (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove variables. (i386bsd_in_sigtramp): Rename tp i386bsd_pc_in_sigtramp. Rewrite to use date stored in `struct gdbarch_tdep'. (i386bsd_sigcontext_offset): Remove varaible. (i386bsd_sigtramp_saved_pc): Make public. Rewrite to use data stored in `struct gdbarch_tdep'. (i386bsd_frame_saved_pc): Make static. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): New functions. (i386bsd_sc_pc_offset, i386nbsd_sc_pc_offset, i386fbsd_sigtramp_start, i386fbsd_sigtramp_end, i386fbsd4_sc_pc_offset): New variables. (i386bsd_init_abi, i386nbsd_init_abi, i386nbsdelf_init_abi, i386fbsdaout_init_abi, i386fbsd_init_abi, i386fbsd4_init_abi): New functions. (i386bsd_aout_osabi_sniffer, _initialize_i386bsd_tdep): New functions. * i386fbsd-nat.c (_initialize_i386fbsd_nat): Fix type in comment. Modify the value of i386fbsd_sigtramp_start and i386fbsd_sigtramp_end instead of i386bsd_sigtramp_start and i386fbsd_sigtramp_end. * i386nbsd-tdep.c: (i386nbsd_aout_use_struct_convention): Remove function. * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Move define to i386-linux-tdep.h. (NUM_REGS, MAX_NUM_REGS, REGISTER_BYTES, REGISTER_NAME, REGISTER_BYTE, REGISTER_RAW_SIZE, STAB_REG_TO_REGNUM): Remove defines. (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size): Remove prototypes. (i386_linux_svr4_fetch_link_map_offsets): Remove prototype. (SVR4_FETCH_LINK_MAP_OFFSETS): Remove define. (IN_SIGTRAMP, FRAME_CHAIN, FRAME_SAVED_PC, SAVED_PC_AFTER_CALL, TARGET_WRITE_PC): Remove defines. (i386_linux_in_sigtramp, i386_linux_frame_chain, i386_linux_frame_saved_pc, i386_linux_saved_pc_after_call, i386_linux_write_pc): Remove prototypes. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-linux-tdep.h: New file. * i386-linux-nat.c: Include "i386-linux-tdep.h". * i386-linux-tdep.c: Include "i386-tdep.h" and "i386-linux-tdep.h". (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size, i386_linux_in_sigtramp, i386_linux_write_pc, i386_linux_svr4_fetch_link_map_offsets): Make static. (i386_linux_init_abi): New function. (_initialize_i386_linux_tdep): New function. * config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Remove define. (i386_saved_pc_after_call): Remove prototype. (MAX_NUM_REGS): Increase to deal with Linux's orig_eax "register". (REGISTER_NAME, STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Remove defines. (i386_register_name, i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum): Remove prototypes. (SIZEOF_GREGS, SIZEOF_FPU_REGS, SIZEOF_FPU_CTL_REGS, SIZEOF_SSE_REGS): Remove defines. (REGISTER_BYTES): Remove define. (REGISTER_BYTE, REGISTER_RAW_SIZE): Remove defines. (i386_register_byte, i386_register_raw_size): Remove prototypes. (FRAME_CHAIN, FRAME_SAVED_PC): Remove defines. (i386_frame_chain, i386_frame_saved_pc): Remove prototypes. * config/i386/tm-i386v4.h (FRAME_CHAIN_VALID): Remove define. (JB_ELEMENT_SIZE, JB_PC, JB_EBX, JB_ESI, JB_EDI, JB_EBP, JB_ESP, JB_EDX, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP): Remove defines. (sigtramp_saved_pc): Remove define. (i386v4_sigtramp_saved_pc): Remove prototype. * config/i386/tm-go32.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): Remove defines. (i386go32_frame_saved_pc): Remove prototype. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-tdep.h: Include "osabi.h". (enum i386_abi): Removed. (enum struct_return): New enum. (struct gdbarch_tdep): Remove abi member, add osabi, jb_pc_offset, struct_return, sigtramp_saved_pc, sigtramp_start, sigtramp_end and sc_pc_offset members. (i386_gdbarch_register_os_abi): Remove prototype. (I386_NUM_GREGS, I386_NUM_FREGS, I386_NUM_XREGS, I386_SSE_NUM_REGS): New defines. (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS, I386_SSE_SIZEOF_REGS): New defines. (i386_register_name, i386_register_byte, i386_register_raw_size): New prototypes. (i386_elf_init_abi, i386_svr4_init_abi): New prototypes. (i386bsd_sigtramp_saved_pc): New prototype. * i386-tdep.c: Don't include "elf-bfd.h". (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum, i386_frame_chain, i386_saved_pc_after_call): Make static. (i386_frame_saved_pc): Rewrite to call architecture dependent function to deal with signal handlers. Make static. (i386go32_frame_saved_pc): Removed. [GET_LONGJMP_TARGET] (JB_PC, JB_ELEMENT_SIZE, get_longjmp_target): Removed. (i386_get_longjmp_target): New function. (default_struct_convention, pcc_struct_convention, reg_struct_convention, valid_conventions, struct_convention): New variables. (i386_use_struct_convention): New function. (i386v4_sigtramp_saved_pc): Renamed to i386_svr4_sigtramp_saved_pc. Made static. Moved. (i386_pc_in_sigtramp): New function. (i386_abi_names): Removed. (ABI_TAG_OS_GNU_LINUX, ABI_TAG_OS_GNU_HURD, ABI_TAG_OS_GNU_SOLARIS, ABI_TAG_OS_FREEBSD, ABI_TAG_OS_NETBSD): Removed. (process_note_sections, i386_elf_abi_from_note, i386_elf_abi, i386_gdbarch_register_os_abi): Removed. (struct i386_abi_handler): Removed. (i386_abi_handler_list): Removed. (i386_svr4_pc_in_sigtramp, i386_go32_pc_in_sigtramp): New functions. (i386_elf_init_abi, i386_svr4_init_abi, i386_go32_init_abi, i386_nw_init_abi): New functions. (i386_gdbarch_init): Rewritten to use generic OS ABI framework. Use set_gdbarch_xxx() calls instead of relying on macros for a number of calls. (i386_coff_osabi_sniffer, i386_nlm_osabi_sniffer): New functions. (_initialize_i386_tdep): Add new 'struct-convcention' command. Register the various architecture variants defined in this file.
2002-06-14 21:42:20 +02:00
/* Provide a prototype to silence -Wmissing-prototypes. */
void _initialize_i386_sol2_tdep (void);
void
_initialize_i386_sol2_tdep (void)
{
/* Register an ELF OS ABI sniffer for Solaris 2 binaries. */
gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_elf_flavour,
i386_sol2_osabi_sniffer);
* osabi.c: Include "gdb_assert.h" and "gdb_string.h". (struct gdb_osabi_handler): Remove member `arch'. Add member `arch_info'. (gdbarch_register_osabi): Add new argument `machine'. Use ot to construct a `struct bfd_arch_info' and store it in the `struct gdb_osabi_handler' that is created. (gdbarch_init_osabi): Check for compatibility based on machine type and architecture. * osabi.h (gdbarch_register_osabi): Adjust prototype and update comment. * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add 0 as second argument in call to gdbarch_register_osabi. * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Likewise. * alphafbsd-tdep.c (_initialize_alphafbsd_tdep): Likewise. * alphanbsd-tdep.c (_initialize_alphanbsd_tdep): Likewise. * arm-linux-tdep.c (_initialize_arm_linux_tdep): Likewise. * arm-tdep.c (_initialize_arm_tdep): Likewise. * armnbsd-tdep.c (_initialize_armnbsd_tdep): Likewise. * hppa-hpux-tdep.c (_initialize_hppa_hpux_tdep): Likewise. * i386-interix-tdep.c (_initialize_i386_interix_tdep): Likewise. * i386-linux-tdep.c (_initialize_i386_linux_tdep): Likewise. * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Likewise. * i386-tdep.c (_initialize_i386_tdep): Likewise. * i386bsd-tdep.c (_initialize_i386bsd_tdep): Likewise. * i386gnu-tdep.c (_initialize_i386gnu_tdep): Likewise. * i386ly-tdep.c (_initialize_i386lynx_tdep): Renamed from _initialize_i386bsd_tdep and updated likewise. * i386nbsd-tdep.c (_initialize_i386nbsd_tdep): Likewise. * i386obsd-tdep.c (_initialize_i386obsd_tdep): Likewise. * mips-irix-tdep.c (_initialize_mips_irix_tdep): Likewise. * mips-linux-tdep.c (_initialize_mips_linux_tdep): Likewise. * mipsnbsd-tdep.c (_initialize_mipsnbsd__tdep): Likewise. * ns32knbsd-tdep.c (_initialize_ns32kmnsd_tdep): Likewise. * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Likewise. * ppcnbsd-tdep.c (_initialize_ppcnbsd_tdep): Likewise. * shnbsd-tdep.c (_initialize_shnbsd_tdep): Likewise. * sparcnbsd-tdep.c (_initialize_sparcnbsd_tdep): Likewise.
2002-12-21 20:58:07 +01:00
gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_SOLARIS,
* config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and i386bsd-tdep.o. Remove solib.o, solib-svr4.o and solib-legacy.o. Move these to ... * config/i386/i386sol2.mh: ... here. * config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Remove define. (sigtramp_saved_pc, I386V4_SIGTRAMP_SAVED_PC): Don't #undef. (SIGCONTEXT_PC_OFFSET): Remove define. (IN_SIGTRAMP): Remove define. * i386-sol2-tdep.c: New file. * config/i386/i386nw.mt (TM_FILE): Change to tm-i386.h. * config/i386/tm-i386nw.h: Removed. * config/i386/tm-fbsd.h (STAB_REG_TO_REGNUM, USE_STRUCT_CONVENTION): Remove defines. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (IN_SIGTRAMP): Remove define. (i386bsd_in_sigtramp): Remove prototype. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a function. Update comment accordingly (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly. (FRAME_SAVED_PC): Remove define. (i386bsd_frame_saved_pc): Remove prototype. * config/i386/tm-nbsdaout.h (i386nbsd_aout_use_struct_convention): Remove prototype. (USE_STRUCT_CONVENTION): Remove prototype. * i386bsd-nat.c (i386bsd_sigcontext_pc_offset): Remove declaration. (_initialize_i386bsd_nat): Revise logic to determine some constants at compile time when compiling a native GDB. Warn if things don't match up with what we expect. * i386bsd-tdep.c (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove variables. (i386bsd_in_sigtramp): Rename tp i386bsd_pc_in_sigtramp. Rewrite to use date stored in `struct gdbarch_tdep'. (i386bsd_sigcontext_offset): Remove varaible. (i386bsd_sigtramp_saved_pc): Make public. Rewrite to use data stored in `struct gdbarch_tdep'. (i386bsd_frame_saved_pc): Make static. (i386bsd_sigtramp_start, i386bsd_sigtramp_end): New functions. (i386bsd_sc_pc_offset, i386nbsd_sc_pc_offset, i386fbsd_sigtramp_start, i386fbsd_sigtramp_end, i386fbsd4_sc_pc_offset): New variables. (i386bsd_init_abi, i386nbsd_init_abi, i386nbsdelf_init_abi, i386fbsdaout_init_abi, i386fbsd_init_abi, i386fbsd4_init_abi): New functions. (i386bsd_aout_osabi_sniffer, _initialize_i386bsd_tdep): New functions. * i386fbsd-nat.c (_initialize_i386fbsd_nat): Fix type in comment. Modify the value of i386fbsd_sigtramp_start and i386fbsd_sigtramp_end instead of i386bsd_sigtramp_start and i386fbsd_sigtramp_end. * i386nbsd-tdep.c: (i386nbsd_aout_use_struct_convention): Remove function. * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Move define to i386-linux-tdep.h. (NUM_REGS, MAX_NUM_REGS, REGISTER_BYTES, REGISTER_NAME, REGISTER_BYTE, REGISTER_RAW_SIZE, STAB_REG_TO_REGNUM): Remove defines. (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size): Remove prototypes. (i386_linux_svr4_fetch_link_map_offsets): Remove prototype. (SVR4_FETCH_LINK_MAP_OFFSETS): Remove define. (IN_SIGTRAMP, FRAME_CHAIN, FRAME_SAVED_PC, SAVED_PC_AFTER_CALL, TARGET_WRITE_PC): Remove defines. (i386_linux_in_sigtramp, i386_linux_frame_chain, i386_linux_frame_saved_pc, i386_linux_saved_pc_after_call, i386_linux_write_pc): Remove prototypes. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-linux-tdep.h: New file. * i386-linux-nat.c: Include "i386-linux-tdep.h". * i386-linux-tdep.c: Include "i386-tdep.h" and "i386-linux-tdep.h". (i386_linux_register_name, i386_linux_register_byte, i386_linux_register_raw_size, i386_linux_in_sigtramp, i386_linux_write_pc, i386_linux_svr4_fetch_link_map_offsets): Make static. (i386_linux_init_abi): New function. (_initialize_i386_linux_tdep): New function. * config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Remove define. (i386_saved_pc_after_call): Remove prototype. (MAX_NUM_REGS): Increase to deal with Linux's orig_eax "register". (REGISTER_NAME, STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Remove defines. (i386_register_name, i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum): Remove prototypes. (SIZEOF_GREGS, SIZEOF_FPU_REGS, SIZEOF_FPU_CTL_REGS, SIZEOF_SSE_REGS): Remove defines. (REGISTER_BYTES): Remove define. (REGISTER_BYTE, REGISTER_RAW_SIZE): Remove defines. (i386_register_byte, i386_register_raw_size): Remove prototypes. (FRAME_CHAIN, FRAME_SAVED_PC): Remove defines. (i386_frame_chain, i386_frame_saved_pc): Remove prototypes. * config/i386/tm-i386v4.h (FRAME_CHAIN_VALID): Remove define. (JB_ELEMENT_SIZE, JB_PC, JB_EBX, JB_ESI, JB_EDI, JB_EBP, JB_ESP, JB_EDX, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. (I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP): Remove defines. (sigtramp_saved_pc): Remove define. (i386v4_sigtramp_saved_pc): Remove prototype. * config/i386/tm-go32.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): Remove defines. (i386go32_frame_saved_pc): Remove prototype. (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines. (get_longjmp_target): Remove prototype. * i386-tdep.h: Include "osabi.h". (enum i386_abi): Removed. (enum struct_return): New enum. (struct gdbarch_tdep): Remove abi member, add osabi, jb_pc_offset, struct_return, sigtramp_saved_pc, sigtramp_start, sigtramp_end and sc_pc_offset members. (i386_gdbarch_register_os_abi): Remove prototype. (I386_NUM_GREGS, I386_NUM_FREGS, I386_NUM_XREGS, I386_SSE_NUM_REGS): New defines. (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS, I386_SSE_SIZEOF_REGS): New defines. (i386_register_name, i386_register_byte, i386_register_raw_size): New prototypes. (i386_elf_init_abi, i386_svr4_init_abi): New prototypes. (i386bsd_sigtramp_saved_pc): New prototype. * i386-tdep.c: Don't include "elf-bfd.h". (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum, i386_frame_chain, i386_saved_pc_after_call): Make static. (i386_frame_saved_pc): Rewrite to call architecture dependent function to deal with signal handlers. Make static. (i386go32_frame_saved_pc): Removed. [GET_LONGJMP_TARGET] (JB_PC, JB_ELEMENT_SIZE, get_longjmp_target): Removed. (i386_get_longjmp_target): New function. (default_struct_convention, pcc_struct_convention, reg_struct_convention, valid_conventions, struct_convention): New variables. (i386_use_struct_convention): New function. (i386v4_sigtramp_saved_pc): Renamed to i386_svr4_sigtramp_saved_pc. Made static. Moved. (i386_pc_in_sigtramp): New function. (i386_abi_names): Removed. (ABI_TAG_OS_GNU_LINUX, ABI_TAG_OS_GNU_HURD, ABI_TAG_OS_GNU_SOLARIS, ABI_TAG_OS_FREEBSD, ABI_TAG_OS_NETBSD): Removed. (process_note_sections, i386_elf_abi_from_note, i386_elf_abi, i386_gdbarch_register_os_abi): Removed. (struct i386_abi_handler): Removed. (i386_abi_handler_list): Removed. (i386_svr4_pc_in_sigtramp, i386_go32_pc_in_sigtramp): New functions. (i386_elf_init_abi, i386_svr4_init_abi, i386_go32_init_abi, i386_nw_init_abi): New functions. (i386_gdbarch_init): Rewritten to use generic OS ABI framework. Use set_gdbarch_xxx() calls instead of relying on macros for a number of calls. (i386_coff_osabi_sniffer, i386_nlm_osabi_sniffer): New functions. (_initialize_i386_tdep): Add new 'struct-convcention' command. Register the various architecture variants defined in this file.
2002-06-14 21:42:20 +02:00
i386_sol2_init_abi);
}