* elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
[deliverable/binutils-gdb.git] / gdb / gdbarch.h
index 021ab36363984041d115a98698745c36dabc3bfb..0ba782c2b3b8f0067c9402d0161c74eb38db16cd 100644 (file)
@@ -1,7 +1,9 @@
 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
 
 /* Dynamic architecture support for GDB, the GNU debugger.
-   Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+   Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free
+   Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -46,6 +48,7 @@ struct reggroup;
 struct regset;
 struct disassemble_info;
 struct target_ops;
+struct obstack;
 
 extern struct gdbarch *current_gdbarch;
 
@@ -376,18 +379,6 @@ extern void set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, int fp0_regnum);
 #define FP0_REGNUM (gdbarch_fp0_regnum (current_gdbarch))
 #endif
 
-/* Replace DEPRECATED_NPC_REGNUM with an implementation of WRITE_PC
-   that updates PC, NPC and even NNPC. */
-
-extern int gdbarch_deprecated_npc_regnum (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_npc_regnum (struct gdbarch *gdbarch, int deprecated_npc_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_NPC_REGNUM)
-#error "Non multi-arch definition of DEPRECATED_NPC_REGNUM"
-#endif
-#if !defined (DEPRECATED_NPC_REGNUM)
-#define DEPRECATED_NPC_REGNUM (gdbarch_deprecated_npc_regnum (current_gdbarch))
-#endif
-
 /* Convert stab register number (from `r' declaration) to a gdb REGNUM. */
 
 typedef int (gdbarch_stab_reg_to_regnum_ftype) (int stab_regnr);
@@ -848,31 +839,6 @@ extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_d
 #define CALL_DUMMY_LOCATION (gdbarch_call_dummy_location (current_gdbarch))
 #endif
 
-#if defined (DEPRECATED_CALL_DUMMY_ADDRESS)
-/* Legacy for systems yet to multi-arch DEPRECATED_CALL_DUMMY_ADDRESS */
-#if !defined (DEPRECATED_CALL_DUMMY_ADDRESS_P)
-#define DEPRECATED_CALL_DUMMY_ADDRESS_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_call_dummy_address_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_ADDRESS_P)
-#error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_ADDRESS"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_CALL_DUMMY_ADDRESS_P)
-#define DEPRECATED_CALL_DUMMY_ADDRESS_P() (gdbarch_deprecated_call_dummy_address_p (current_gdbarch))
-#endif
-
-typedef CORE_ADDR (gdbarch_deprecated_call_dummy_address_ftype) (void);
-extern CORE_ADDR gdbarch_deprecated_call_dummy_address (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_call_dummy_address (struct gdbarch *gdbarch, gdbarch_deprecated_call_dummy_address_ftype *deprecated_call_dummy_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_ADDRESS)
-#error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_ADDRESS"
-#endif
-#if !defined (DEPRECATED_CALL_DUMMY_ADDRESS)
-#define DEPRECATED_CALL_DUMMY_ADDRESS() (gdbarch_deprecated_call_dummy_address (current_gdbarch))
-#endif
-
 /* DEPRECATED_CALL_DUMMY_START_OFFSET can be deleted. */
 
 extern CORE_ADDR gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch);
@@ -895,17 +861,6 @@ extern void set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch
 #define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_deprecated_call_dummy_breakpoint_offset (current_gdbarch))
 #endif
 
-/* DEPRECATED_CALL_DUMMY_LENGTH can be deleted. */
-
-extern int gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch, int deprecated_call_dummy_length);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_LENGTH)
-#error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_LENGTH"
-#endif
-#if !defined (DEPRECATED_CALL_DUMMY_LENGTH)
-#define DEPRECATED_CALL_DUMMY_LENGTH (gdbarch_deprecated_call_dummy_length (current_gdbarch))
-#endif
-
 /* DEPRECATED_CALL_DUMMY_WORDS can be deleted. */
 
 extern LONGEST * gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch);
@@ -928,32 +883,6 @@ extern void set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdba
 #define DEPRECATED_SIZEOF_CALL_DUMMY_WORDS (gdbarch_deprecated_sizeof_call_dummy_words (current_gdbarch))
 #endif
 
-/* Implement PUSH_DUMMY_CALL, then delete DEPRECATED_CALL_DUMMY_STACK_ADJUST. */
-
-#if defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
-/* Legacy for systems yet to multi-arch DEPRECATED_CALL_DUMMY_STACK_ADJUST */
-#if !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P)
-#define DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P)
-#error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_STACK_ADJUST"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P)
-#define DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() (gdbarch_deprecated_call_dummy_stack_adjust_p (current_gdbarch))
-#endif
-
-extern int gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch, int deprecated_call_dummy_stack_adjust);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
-#error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_STACK_ADJUST"
-#endif
-#if !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
-#define DEPRECATED_CALL_DUMMY_STACK_ADJUST (gdbarch_deprecated_call_dummy_stack_adjust (current_gdbarch))
-#endif
-
 /* DEPRECATED_FIX_CALL_DUMMY can be deleted.  For the SPARC, implement
    PUSH_DUMMY_CODE and set CALL_DUMMY_LOCATION to ON_STACK. */
 
@@ -1017,18 +946,6 @@ extern void set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch, gd
 #define DEPRECATED_PUSH_DUMMY_FRAME (gdbarch_deprecated_push_dummy_frame (current_gdbarch))
 #endif
 
-/* Implement PUSH_DUMMY_CALL, then delete
-   DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED. */
-
-extern int gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch, int deprecated_extra_stack_alignment_needed);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
-#error "Non multi-arch definition of DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED"
-#endif
-#if !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
-#define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED (gdbarch_deprecated_extra_stack_alignment_needed (current_gdbarch))
-#endif
-
 #if defined (DEPRECATED_DO_REGISTERS_INFO)
 /* Legacy for systems yet to multi-arch DEPRECATED_DO_REGISTERS_INFO */
 #if !defined (DEPRECATED_DO_REGISTERS_INFO_P)
@@ -1186,31 +1103,6 @@ extern void set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, gd
 #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (gdbarch_deprecated_pc_in_call_dummy (current_gdbarch, pc, sp, frame_address))
 #endif
 
-#if defined (DEPRECATED_INIT_FRAME_PC_FIRST)
-/* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC_FIRST */
-#if !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
-#define DEPRECATED_INIT_FRAME_PC_FIRST_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
-#error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC_FIRST"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
-#define DEPRECATED_INIT_FRAME_PC_FIRST_P() (gdbarch_deprecated_init_frame_pc_first_p (current_gdbarch))
-#endif
-
-typedef CORE_ADDR (gdbarch_deprecated_init_frame_pc_first_ftype) (int fromleaf, struct frame_info *prev);
-extern CORE_ADDR gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev);
-extern void set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_FIRST)
-#error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC_FIRST"
-#endif
-#if !defined (DEPRECATED_INIT_FRAME_PC_FIRST)
-#define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) (gdbarch_deprecated_init_frame_pc_first (current_gdbarch, fromleaf, prev))
-#endif
-
 #if defined (DEPRECATED_INIT_FRAME_PC)
 /* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC */
 #if !defined (DEPRECATED_INIT_FRAME_PC_P)
@@ -1245,15 +1137,6 @@ extern void set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, int beli
 #define BELIEVE_PCC_PROMOTION (gdbarch_believe_pcc_promotion (current_gdbarch))
 #endif
 
-extern int gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch);
-extern void set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, int believe_pcc_promotion_type);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION_TYPE)
-#error "Non multi-arch definition of BELIEVE_PCC_PROMOTION_TYPE"
-#endif
-#if !defined (BELIEVE_PCC_PROMOTION_TYPE)
-#define BELIEVE_PCC_PROMOTION_TYPE (gdbarch_believe_pcc_promotion_type (current_gdbarch))
-#endif
-
 #if defined (DEPRECATED_GET_SAVED_REGISTER)
 /* Legacy for systems yet to multi-arch DEPRECATED_GET_SAVED_REGISTER */
 #if !defined (DEPRECATED_GET_SAVED_REGISTER_P)
@@ -1282,6 +1165,21 @@ extern void set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
 /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
    For raw <-> cooked register conversions, replaced by pseudo registers. */
 
+#if defined (DEPRECATED_REGISTER_CONVERTIBLE)
+/* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_CONVERTIBLE */
+#if !defined (DEPRECATED_REGISTER_CONVERTIBLE_P)
+#define DEPRECATED_REGISTER_CONVERTIBLE_P() (1)
+#endif
+#endif
+
+extern int gdbarch_deprecated_register_convertible_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERTIBLE_P)
+#error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERTIBLE"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REGISTER_CONVERTIBLE_P)
+#define DEPRECATED_REGISTER_CONVERTIBLE_P() (gdbarch_deprecated_register_convertible_p (current_gdbarch))
+#endif
+
 typedef int (gdbarch_deprecated_register_convertible_ftype) (int nr);
 extern int gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr);
 extern void set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible);
@@ -1451,17 +1349,13 @@ extern void set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
 
 extern int gdbarch_return_value_p (struct gdbarch *gdbarch);
 
-typedef enum return_value_convention (gdbarch_return_value_ftype) (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, const void *inval, void *outval);
-extern enum return_value_convention gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, const void *inval, void *outval);
+typedef enum return_value_convention (gdbarch_return_value_ftype) (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf);
+extern enum return_value_convention gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf);
 extern void set_gdbarch_return_value (struct gdbarch *gdbarch, gdbarch_return_value_ftype *return_value);
 
 /* The deprecated methods RETURN_VALUE_ON_STACK, EXTRACT_RETURN_VALUE,
    STORE_RETURN_VALUE and USE_STRUCT_CONVENTION have all been folded
-   into RETURN_VALUE.  For the moment do not try to fold in
-   EXTRACT_STRUCT_VALUE_ADDRESS as, dependant on the ABI, the debug
-   info, and the level of effort, it may well be possible to find the
-   address of a structure being return on the stack.  Someone else can
-   make that change. */
+   into RETURN_VALUE. */
 
 typedef int (gdbarch_return_value_on_stack_ftype) (struct type *type);
 extern int gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type);
@@ -1523,30 +1417,23 @@ extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_
 #define USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_use_struct_convention (current_gdbarch, gcc_p, value_type))
 #endif
 
-#if defined (EXTRACT_STRUCT_VALUE_ADDRESS)
-/* Legacy for systems yet to multi-arch EXTRACT_STRUCT_VALUE_ADDRESS */
-#if !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
-#define EXTRACT_STRUCT_VALUE_ADDRESS_P() (1)
-#endif
-#endif
-
-extern int gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
-#error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
-#define EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_extract_struct_value_address_p (current_gdbarch))
-#endif
-
-typedef CORE_ADDR (gdbarch_extract_struct_value_address_ftype) (struct regcache *regcache);
-extern CORE_ADDR gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache);
-extern void set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_extract_struct_value_address_ftype *extract_struct_value_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS)
-#error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
-#endif
-#if !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
-#define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (gdbarch_extract_struct_value_address (current_gdbarch, regcache))
-#endif
+/* As of 2004-01-17 only the 32-bit SPARC ABI has been identified as an
+   ABI suitable for the implementation of a robust extract
+   struct-convention return-value address method (the sparc saves the
+   address in the callers frame).  All the other cases so far examined,
+   the DEPRECATED_EXTRACT_STRUCT_VALUE implementation has been
+   erreneous - the code was incorrectly assuming that the return-value
+   address, stored in a register, was preserved across the entire
+   function call.
+   For the moment retain DEPRECATED_EXTRACT_STRUCT_VALUE as a marker of
+   the ABIs that are still to be analyzed - perhaps this should simply
+   be deleted.  The commented out extract_returned_value_address method
+   is provided as a starting point for the 32-bit SPARC.  It, or
+   something like it, along with changes to both infcmd.c and stack.c
+   will be needed for that case to work.  NB: It is passed the callers
+   frame since it is only after the callee has returned that this
+   function is used.
+  M:::CORE_ADDR:extract_returned_value_address:struct frame_info *caller_frame:caller_frame */
 
 #if defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
 /* Legacy for systems yet to multi-arch DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS */
@@ -1563,14 +1450,14 @@ extern int gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gd
 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch))
 #endif
 
-typedef CORE_ADDR (gdbarch_deprecated_extract_struct_value_address_ftype) (char *regbuf);
-extern CORE_ADDR gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf);
+typedef CORE_ADDR (gdbarch_deprecated_extract_struct_value_address_ftype) (struct regcache *regcache);
+extern CORE_ADDR gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache);
 extern void set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address);
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
 #error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
 #endif
 #if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
-#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regbuf))
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regcache))
 #endif
 
 #if defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
@@ -1633,16 +1520,6 @@ extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_pro
 #define SKIP_PROLOGUE(ip) (gdbarch_skip_prologue (current_gdbarch, ip))
 #endif
 
-typedef int (gdbarch_prologue_frameless_p_ftype) (CORE_ADDR ip);
-extern int gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip);
-extern void set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, gdbarch_prologue_frameless_p_ftype *prologue_frameless_p);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PROLOGUE_FRAMELESS_P)
-#error "Non multi-arch definition of PROLOGUE_FRAMELESS_P"
-#endif
-#if !defined (PROLOGUE_FRAMELESS_P)
-#define PROLOGUE_FRAMELESS_P(ip) (gdbarch_prologue_frameless_p (current_gdbarch, ip))
-#endif
-
 typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs);
 extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs);
 extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than);
@@ -1720,14 +1597,33 @@ extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR fram
 #define FRAME_ARGS_SKIP (gdbarch_frame_args_skip (current_gdbarch))
 #endif
 
-typedef int (gdbarch_frameless_function_invocation_ftype) (struct frame_info *fi);
-extern int gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi);
-extern void set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, gdbarch_frameless_function_invocation_ftype *frameless_function_invocation);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAMELESS_FUNCTION_INVOCATION)
-#error "Non multi-arch definition of FRAMELESS_FUNCTION_INVOCATION"
+/* DEPRECATED_FRAMELESS_FUNCTION_INVOCATION is not needed.  The new
+   frame code works regardless of the type of frame - frameless,
+   stackless, or normal. */
+
+#if defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION)
+/* Legacy for systems yet to multi-arch DEPRECATED_FRAMELESS_FUNCTION_INVOCATION */
+#if !defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P)
+#define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() (1)
+#endif
+#endif
+
+extern int gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P)
+#error "Non multi-arch definition of DEPRECATED_FRAMELESS_FUNCTION_INVOCATION"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P)
+#define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() (gdbarch_deprecated_frameless_function_invocation_p (current_gdbarch))
+#endif
+
+typedef int (gdbarch_deprecated_frameless_function_invocation_ftype) (struct frame_info *fi);
+extern int gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi);
+extern void set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, gdbarch_deprecated_frameless_function_invocation_ftype *deprecated_frameless_function_invocation);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION)
+#error "Non multi-arch definition of DEPRECATED_FRAMELESS_FUNCTION_INVOCATION"
 #endif
-#if !defined (FRAMELESS_FUNCTION_INVOCATION)
-#define FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_frameless_function_invocation (current_gdbarch, fi))
+#if !defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION)
+#define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_deprecated_frameless_function_invocation (current_gdbarch, fi))
 #endif
 
 #if defined (DEPRECATED_FRAME_CHAIN)
@@ -2138,15 +2034,9 @@ extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_s
    evaluates non-zero, this is the address where the debugger will place
    a step-resume breakpoint to get us past the dynamic linker. */
 
-typedef CORE_ADDR (gdbarch_skip_solib_resolver_ftype) (CORE_ADDR pc);
+typedef CORE_ADDR (gdbarch_skip_solib_resolver_ftype) (struct gdbarch *gdbarch, CORE_ADDR pc);
 extern CORE_ADDR gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc);
 extern void set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, gdbarch_skip_solib_resolver_ftype *skip_solib_resolver);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_SOLIB_RESOLVER)
-#error "Non multi-arch definition of SKIP_SOLIB_RESOLVER"
-#endif
-#if !defined (SKIP_SOLIB_RESOLVER)
-#define SKIP_SOLIB_RESOLVER(pc) (gdbarch_skip_solib_resolver (current_gdbarch, pc))
-#endif
 
 /* For SVR4 shared libraries, each call goes through a small piece of
    trampoline code in the ".plt" section.  IN_SOLIB_CALL_TRAMPOLINE evaluates
@@ -2174,87 +2064,6 @@ extern void set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdb
 #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (gdbarch_in_solib_return_trampoline (current_gdbarch, pc, name))
 #endif
 
-/* Sigtramp is a routine that the kernel calls (which then calls the
-   signal handler).  On most machines it is a library routine that is
-   linked into the executable.
-  
-   This macro, given a program counter value and the name of the
-   function in which that PC resides (which can be null if the name is
-   not known), returns nonzero if the PC and name show that we are in
-   sigtramp.
-  
-   On most machines just see if the name is sigtramp (and if we have
-   no name, assume we are not in sigtramp).
-  
-   FIXME: cagney/2002-04-21: The function find_pc_partial_function
-   calls find_pc_sect_partial_function() which calls PC_IN_SIGTRAMP.
-   This means PC_IN_SIGTRAMP function can't be implemented by doing its
-   own local NAME lookup.
-  
-   FIXME: cagney/2002-04-21: PC_IN_SIGTRAMP is something of a mess.
-   Some code also depends on SIGTRAMP_START and SIGTRAMP_END but other
-   does not. */
-
-typedef int (gdbarch_pc_in_sigtramp_ftype) (CORE_ADDR pc, char *name);
-extern int gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
-extern void set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_SIGTRAMP)
-#error "Non multi-arch definition of PC_IN_SIGTRAMP"
-#endif
-#if !defined (PC_IN_SIGTRAMP)
-#define PC_IN_SIGTRAMP(pc, name) (gdbarch_pc_in_sigtramp (current_gdbarch, pc, name))
-#endif
-
-#if defined (SIGTRAMP_START)
-/* Legacy for systems yet to multi-arch SIGTRAMP_START */
-#if !defined (SIGTRAMP_START_P)
-#define SIGTRAMP_START_P() (1)
-#endif
-#endif
-
-extern int gdbarch_sigtramp_start_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START_P)
-#error "Non multi-arch definition of SIGTRAMP_START"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_START_P)
-#define SIGTRAMP_START_P() (gdbarch_sigtramp_start_p (current_gdbarch))
-#endif
-
-typedef CORE_ADDR (gdbarch_sigtramp_start_ftype) (CORE_ADDR pc);
-extern CORE_ADDR gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc);
-extern void set_gdbarch_sigtramp_start (struct gdbarch *gdbarch, gdbarch_sigtramp_start_ftype *sigtramp_start);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START)
-#error "Non multi-arch definition of SIGTRAMP_START"
-#endif
-#if !defined (SIGTRAMP_START)
-#define SIGTRAMP_START(pc) (gdbarch_sigtramp_start (current_gdbarch, pc))
-#endif
-
-#if defined (SIGTRAMP_END)
-/* Legacy for systems yet to multi-arch SIGTRAMP_END */
-#if !defined (SIGTRAMP_END_P)
-#define SIGTRAMP_END_P() (1)
-#endif
-#endif
-
-extern int gdbarch_sigtramp_end_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END_P)
-#error "Non multi-arch definition of SIGTRAMP_END"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_END_P)
-#define SIGTRAMP_END_P() (gdbarch_sigtramp_end_p (current_gdbarch))
-#endif
-
-typedef CORE_ADDR (gdbarch_sigtramp_end_ftype) (CORE_ADDR pc);
-extern CORE_ADDR gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc);
-extern void set_gdbarch_sigtramp_end (struct gdbarch *gdbarch, gdbarch_sigtramp_end_ftype *sigtramp_end);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END)
-#error "Non multi-arch definition of SIGTRAMP_END"
-#endif
-#if !defined (SIGTRAMP_END)
-#define SIGTRAMP_END(pc) (gdbarch_sigtramp_end (current_gdbarch, pc))
-#endif
-
 /* A target might have problems with watchpoints as soon as the stack
    frame of the current function has been destroyed.  This mostly happens
    as the first action in a funtion's epilogue.  in_function_epilogue_p()
@@ -2555,6 +2364,27 @@ extern void *gdbarch_obstack_zalloc (struct gdbarch *gdbarch, long size);
 extern int gdbarch_update_p (struct gdbarch_info info);
 
 
+/* Helper function.  Find an architecture matching info.
+
+   INFO should be initialized using gdbarch_info_init, relevant fields
+   set, and then finished using gdbarch_info_fill.
+
+   Returns the corresponding architecture, or NULL if no matching
+   architecture was found.  "current_gdbarch" is not updated.  */
+
+extern struct gdbarch *gdbarch_find_by_info (struct gdbarch_info info);
+
+
+/* Helper function.  Set the global "current_gdbarch" to "gdbarch".
+
+   FIXME: kettenis/20031124: Of the functions that follow, only
+   gdbarch_from_bfd is supposed to survive.  The others will
+   dissappear since in the future GDB will (hopefully) be truly
+   multi-arch.  However, for now we're still stuck with the concept of
+   a single active architecture.  */
+
+extern void deprecated_current_gdbarch_select_hack (struct gdbarch *gdbarch);
+
 
 /* Register per-architecture data-pointer.
 
@@ -2562,10 +2392,6 @@ extern int gdbarch_update_p (struct gdbarch_info info);
    for the reserved data-pointer is returned.  That identifer should
    be saved in a local static variable.
 
-   The per-architecture data-pointer is either initialized explicitly
-   (set_gdbarch_data()) or implicitly (by INIT() via a call to
-   gdbarch_data()).
-
    Memory for the per-architecture data shall be allocated using
    gdbarch_obstack_zalloc.  That memory will be deleted when the
    corresponding architecture object is deleted.
@@ -2579,15 +2405,18 @@ extern int gdbarch_update_p (struct gdbarch_info info);
 
 struct gdbarch_data;
 
-typedef void *(gdbarch_data_init_ftype) (struct gdbarch *gdbarch);
-extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init);
-extern void set_gdbarch_data (struct gdbarch *gdbarch,
-                             struct gdbarch_data *data,
-                             void *pointer);
+typedef void *(gdbarch_data_pre_init_ftype) (struct obstack *obstack);
+extern struct gdbarch_data *gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *init);
+typedef void *(gdbarch_data_post_init_ftype) (struct gdbarch *gdbarch);
+extern struct gdbarch_data *gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *init);
+extern void deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
+                                         struct gdbarch_data *data,
+                                        void *pointer);
 
 extern void *gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *);
 
 
+
 /* Register per-architecture memory region.
 
    Provide a memory-region swap mechanism.  Per-architecture memory
@@ -2598,41 +2427,14 @@ extern void *gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *);
    Memory regions are swapped / initialized in the order that they are
    registered.  NULL DATA and/or INIT values can be specified.
 
-   New code should use register_gdbarch_data(). */
+   New code should use gdbarch_data_register_*(). */
 
 typedef void (gdbarch_swap_ftype) (void);
-extern void register_gdbarch_swap (void *data, unsigned long size, gdbarch_swap_ftype *init);
-#define REGISTER_GDBARCH_SWAP(VAR) register_gdbarch_swap (&(VAR), sizeof ((VAR)), NULL)
-
-
-
-/* The target-system-dependent byte order is dynamic */
-
-extern int target_byte_order;
-#ifndef TARGET_BYTE_ORDER
-#define TARGET_BYTE_ORDER (target_byte_order + 0)
-#endif
-
-extern int target_byte_order_auto;
-#ifndef TARGET_BYTE_ORDER_AUTO
-#define TARGET_BYTE_ORDER_AUTO (target_byte_order_auto + 0)
-#endif
+extern void deprecated_register_gdbarch_swap (void *data, unsigned long size, gdbarch_swap_ftype *init);
+#define DEPRECATED_REGISTER_GDBARCH_SWAP(VAR) deprecated_register_gdbarch_swap (&(VAR), sizeof ((VAR)), NULL)
 
 
 
-/* The target-system-dependent BFD architecture is dynamic */
-
-extern int target_architecture_auto;
-#ifndef TARGET_ARCHITECTURE_AUTO
-#define TARGET_ARCHITECTURE_AUTO (target_architecture_auto + 0)
-#endif
-
-extern const struct bfd_arch_info *target_architecture;
-#ifndef TARGET_ARCHITECTURE
-#define TARGET_ARCHITECTURE (target_architecture + 0)
-#endif
-
-
 /* Set the dynamic target-system-dependent parameters (architecture,
    byte-order, ...) using information found in the BFD */
 
@@ -2644,11 +2446,6 @@ extern void set_gdbarch_from_file (bfd *);
 
 extern void initialize_current_architecture (void);
 
-/* For non-multiarched targets, do any initialization of the default
-   gdbarch object necessary after the _initialize_MODULE functions
-   have run.  */
-extern void initialize_non_multiarch (void);
-
 /* gdbarch trace variable */
 extern int gdbarch_debug;
 
This page took 0.030239 seconds and 4 git commands to generate.