OSDN Git Service

2004-02-09 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Mon, 16 Feb 2004 21:49:22 +0000 (21:49 +0000)
committerAndrew Cagney <cagney@redhat.com>
Mon, 16 Feb 2004 21:49:22 +0000 (21:49 +0000)
* gdbarch.sh (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION): Predicate
and function replacing FRAMELESS_FUNCTION_INVOCATION.
* blockframe.c (legacy_frameless_look_for_prologue): Rename
frameless_look_for_prologue.
* frame.h (legacy_frameless_look_for_prologue): Rename
frameless_look_for_prologue.
* gdbarch.h, gdbarch.c: Re-generate.
* sh64-tdep.c (sh64_gdbarch_init): Update.
* sh-tdep.c (sh_gdbarch_init): Update.
* s390-tdep.c (s390_gdbarch_init): Update.
* rs6000-tdep.c (rs6000_gdbarch_init): Update.
* ppc-linux-tdep.c (ppc_linux_init_abi): Update.
* m68k-tdep.c (m68k_gdbarch_init): Update.
(delta68_frame_args_address): Update.
* m32r-tdep.c (m32r_gdbarch_init): Update.
* hppa-tdep.c (hppa_gdbarch_init): Update.
* h8300-tdep.c (h8300_gdbarch_init): Update.
* frv-tdep.c (frv_gdbarch_init): Update.
(frv_frameless_function_invocation): Update.
* cris-tdep.c (cris_gdbarch_init): Update.
(cris_frameless_function_invocation): Update.
* avr-tdep.c (avr_gdbarch_init): Update.
* arm-tdep.c (arm_gdbarch_init): Update.
* stack.c (frame_info): Update, call predicate.
* rs6000-tdep.c (rs6000_frame_chain): Update, call predicate..
* frame.c (legacy_get_prev_frame): Update, call predicate..
* arch-utils.c (generic_frameless_function_invocation_not): Delete.
* arch-utils.h (generic_frameless_function_invocation_not): Delete.
* alpha-tdep.c (alpha_gdbarch_init): Do not set frameless function
invocation.
* d10v-tdep.c (d10v_gdbarch_init): Ditto.
* ns32k-tdep.c (ns32k_gdbarch_init): Ditto.
* vax-tdep.c (vax_gdbarch_init): Ditto.

29 files changed:
gdb/ChangeLog
gdb/alpha-tdep.c
gdb/arch-utils.c
gdb/arch-utils.h
gdb/arm-tdep.c
gdb/avr-tdep.c
gdb/blockframe.c
gdb/cris-tdep.c
gdb/d10v-tdep.c
gdb/doc/ChangeLog
gdb/doc/gdbint.texinfo
gdb/frame.c
gdb/frame.h
gdb/frv-tdep.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/h8300-tdep.c
gdb/hppa-tdep.c
gdb/m32r-tdep.c
gdb/m68k-tdep.c
gdb/ns32k-tdep.c
gdb/ppc-linux-tdep.c
gdb/rs6000-tdep.c
gdb/s390-tdep.c
gdb/sh-tdep.c
gdb/sh64-tdep.c
gdb/stack.c
gdb/vax-tdep.c

index 2a47add..e4d7524 100644 (file)
@@ -1,4 +1,38 @@
-2004-02-16  Andrew Cagney  <cagney@redhat.com>
+2004-02-09  Andrew Cagney  <cagney@redhat.com>
+
+       * gdbarch.sh (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION): Predicate
+       and function replacing FRAMELESS_FUNCTION_INVOCATION.
+       * blockframe.c (legacy_frameless_look_for_prologue): Rename
+       frameless_look_for_prologue.
+       * frame.h (legacy_frameless_look_for_prologue): Rename
+       frameless_look_for_prologue.
+       * gdbarch.h, gdbarch.c: Re-generate.
+       * sh64-tdep.c (sh64_gdbarch_init): Update.
+       * sh-tdep.c (sh_gdbarch_init): Update.
+       * s390-tdep.c (s390_gdbarch_init): Update.
+       * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+       * ppc-linux-tdep.c (ppc_linux_init_abi): Update.
+       * m68k-tdep.c (m68k_gdbarch_init): Update.
+       (delta68_frame_args_address): Update.
+       * m32r-tdep.c (m32r_gdbarch_init): Update.
+       * hppa-tdep.c (hppa_gdbarch_init): Update.
+       * h8300-tdep.c (h8300_gdbarch_init): Update.
+       * frv-tdep.c (frv_gdbarch_init): Update.
+       (frv_frameless_function_invocation): Update.
+       * cris-tdep.c (cris_gdbarch_init): Update.
+       (cris_frameless_function_invocation): Update.
+       * avr-tdep.c (avr_gdbarch_init): Update.
+       * arm-tdep.c (arm_gdbarch_init): Update.
+       * stack.c (frame_info): Update, call predicate.
+       * rs6000-tdep.c (rs6000_frame_chain): Update, call predicate..
+       * frame.c (legacy_get_prev_frame): Update, call predicate..
+       * arch-utils.c (generic_frameless_function_invocation_not): Delete.
+       * arch-utils.h (generic_frameless_function_invocation_not): Delete.
+       * alpha-tdep.c (alpha_gdbarch_init): Do not set frameless function
+       invocation.
+       * d10v-tdep.c (d10v_gdbarch_init): Ditto.
+       * ns32k-tdep.c (ns32k_gdbarch_init): Ditto.
+       * vax-tdep.c (vax_gdbarch_init): Ditto.
 
        * arm-tdep.c (arm_set_call_dummy_breakpoint_offset): Delete unused
        function.
index ce66f30..44b85d1 100644 (file)
@@ -1531,8 +1531,6 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_print_insn (gdbarch, print_insn_alpha);
 
   /* Call info.  */
-  set_gdbarch_frameless_function_invocation (gdbarch,
-                                    generic_frameless_function_invocation_not);
 
   set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention);
   set_gdbarch_extract_return_value (gdbarch, alpha_extract_return_value);
index 09fc52c..94ba59b 100644 (file)
@@ -85,12 +85,6 @@ legacy_register_sim_regno (int regnum)
 }
 
 int
-generic_frameless_function_invocation_not (struct frame_info *fi)
-{
-  return 0;
-}
-
-int
 generic_return_value_on_stack_not (struct type *type)
 {
   return 0;
index 158868f..0f7a23d 100644 (file)
@@ -43,9 +43,6 @@ extern gdbarch_store_return_value_ftype legacy_store_return_value;
    address passed as an invisible first argument to the function.  */
 extern gdbarch_use_struct_convention_ftype always_use_struct_convention;
 
-/* Frameless functions not identifable. */
-extern gdbarch_frameless_function_invocation_ftype generic_frameless_function_invocation_not;
-
 /* Only structures, unions, and arrays are returned using the struct
    convention.  Note that arrays are never passed by value in the C
    language family, so that case is irrelevant for C.  */
index 86c1ec5..9d53fac 100644 (file)
@@ -2744,8 +2744,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_unwind_pc (gdbarch, arm_unwind_pc);
   set_gdbarch_unwind_sp (gdbarch, arm_unwind_sp);
 
-  set_gdbarch_frameless_function_invocation
-    (gdbarch, arm_frameless_function_invocation);
+  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, arm_frameless_function_invocation);
 
   frame_base_set_default (gdbarch, &arm_normal_base);
 
index 108732b..d9c16a5 100644 (file)
@@ -1309,8 +1309,7 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   set_gdbarch_breakpoint_from_pc (gdbarch, avr_breakpoint_from_pc);
 
-  set_gdbarch_frameless_function_invocation (gdbarch,
-                                             frameless_look_for_prologue);
+  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue);
 
   frame_unwind_append_sniffer (gdbarch, avr_frame_sniffer);
   frame_base_set_default (gdbarch, &avr_frame_base);
index 7d240b4..265bd2e 100644 (file)
@@ -185,12 +185,12 @@ legacy_inside_entry_func (CORE_ADDR pc)
          && symfile_objfile->ei.entry_func_highpc > pc);
 }
 
-/* Return nonzero if the function for this frame lacks a prologue.  Many
-   machines can define FRAMELESS_FUNCTION_INVOCATION to just call this
-   function.  */
+/* Return nonzero if the function for this frame lacks a prologue.
+   Many machines can define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
+   to just call this function.  */
 
 int
-frameless_look_for_prologue (struct frame_info *frame)
+legacy_frameless_look_for_prologue (struct frame_info *frame)
 {
   CORE_ADDR func_start;
 
index 731d516..7558f2d 100644 (file)
@@ -1083,7 +1083,7 @@ cris_frameless_function_invocation (struct frame_info *fi)
   if ((get_frame_type (fi) == SIGTRAMP_FRAME))
     return 0;
   else
-    return frameless_look_for_prologue (fi);
+    return legacy_frameless_look_for_prologue (fi);
 }
 
 /* See frame.h.  Determines the address of all registers in the
@@ -4174,8 +4174,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   set_gdbarch_breakpoint_from_pc (gdbarch, cris_breakpoint_from_pc);
   
-  set_gdbarch_frameless_function_invocation 
-    (gdbarch, cris_frameless_function_invocation);
+  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, cris_frameless_function_invocation);
   set_gdbarch_deprecated_frame_chain (gdbarch, cris_frame_chain);
 
   set_gdbarch_deprecated_frame_saved_pc (gdbarch, cris_frame_saved_pc);
index 90936f6..4b977c6 100644 (file)
@@ -1515,9 +1515,6 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_remote_translate_xfer_address (gdbarch, 
                                             remote_d10v_translate_xfer_address);
 
-  set_gdbarch_frameless_function_invocation (gdbarch, 
-                                            frameless_look_for_prologue);
-
   set_gdbarch_frame_align (gdbarch, d10v_frame_align);
 
   set_gdbarch_register_sim_regno (gdbarch, d10v_register_sim_regno);
index 4f89988..793da91 100644 (file)
@@ -1,5 +1,10 @@
 2004-02-16  Andrew Cagney  <cagney@redhat.com>
 
+       * gdbint.texinfo (Target Architecture Definition): Deprecate
+       FRAMELESS_FUNCTION_INVOCATION.
+
+2004-02-16  Andrew Cagney  <cagney@redhat.com>
+
        * gdbint.texinfo (Coding): Mention -Wunused-function.
 
 2004-02-14  Andrew Cagney  <cagney@redhat.com>
index c0bfe5a..301e358 100644 (file)
@@ -38,7 +38,7 @@ Free Documentation License''.
 @page
 @tex
 \def\$#1${{#1}}  % Kluge: collect RCS revision info without $...$
-\xdef\manvers{\$Revision: 1.187 $}  % For use in headers, footers too
+\xdef\manvers{\$Revision: 1.188 $}  % For use in headers, footers too
 {\parskip=0pt
 \hfill Cygnus Solutions\par
 \hfill \manvers\par
@@ -3189,8 +3189,8 @@ macro to be the number (greater than or equal to zero) of that register.
 This should only need to be defined if @code{DEPRECATED_TARGET_READ_FP}
 is not defined.
 
-@item FRAMELESS_FUNCTION_INVOCATION(@var{fi})
-@findex FRAMELESS_FUNCTION_INVOCATION
+@item DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(@var{fi})
+@findex DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
 Define this to an expression that returns 1 if the function invocation
 represented by @var{fi} does not have a stack frame associated with it.
 Otherwise return 0.
index 6b0ed77..a032c47 100644 (file)
@@ -1449,7 +1449,8 @@ legacy_get_prev_frame (struct frame_info *this_frame)
        the frame chain, not just the inner most frame!  The generic,
        per-architecture, frame code should handle this and the below
        should simply be removed.  */
-    fromleaf = FRAMELESS_FUNCTION_INVOCATION (this_frame);
+    fromleaf = (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()
+               && DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (this_frame));
   else
     fromleaf = 0;
 
index 5d2a106..0cdae6d 100644 (file)
@@ -544,7 +544,7 @@ extern struct symbol *get_frame_function (struct frame_info *);
 
 extern CORE_ADDR get_pc_function_start (CORE_ADDR);
 
-extern int frameless_look_for_prologue (struct frame_info *);
+extern int legacy_frameless_look_for_prologue (struct frame_info *);
 
 extern struct frame_info *find_relative_frame (struct frame_info *, int *);
 
index 4e0c76b..621848e 100644 (file)
@@ -42,7 +42,6 @@ static gdbarch_register_name_ftype frv_register_name;
 static gdbarch_breakpoint_from_pc_ftype frv_breakpoint_from_pc;
 static gdbarch_adjust_breakpoint_address_ftype frv_gdbarch_adjust_breakpoint_address;
 static gdbarch_skip_prologue_ftype frv_skip_prologue;
-static gdbarch_frameless_function_invocation_ftype frv_frameless_function_invocation;
 
 /* Register numbers.  The order in which these appear define the
    remote protocol, so take care in changing them.  */
@@ -1030,7 +1029,7 @@ frv_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
 static int
 frv_frameless_function_invocation (struct frame_info *frame)
 {
-  return frameless_look_for_prologue (frame);
+  return legacy_frameless_look_for_prologue (frame);
 }
 
 static CORE_ADDR
@@ -1391,7 +1390,7 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_breakpoint_from_pc (gdbarch, frv_breakpoint_from_pc);
   set_gdbarch_adjust_breakpoint_address (gdbarch, frv_gdbarch_adjust_breakpoint_address);
 
-  set_gdbarch_frameless_function_invocation (gdbarch, frv_frameless_function_invocation);
+  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, frv_frameless_function_invocation);
 
   set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention);
   set_gdbarch_extract_return_value (gdbarch, frv_extract_return_value);
index 0f6e415..1ee401f 100644 (file)
@@ -217,7 +217,7 @@ struct gdbarch
   CORE_ADDR function_start_offset;
   gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
   CORE_ADDR frame_args_skip;
-  gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
+  gdbarch_deprecated_frameless_function_invocation_ftype *deprecated_frameless_function_invocation;
   gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain;
   gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid;
   gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
@@ -384,7 +384,7 @@ struct gdbarch startup_gdbarch =
   0,  /* function_start_offset */
   generic_remote_translate_xfer_address,  /* remote_translate_xfer_address */
   0,  /* frame_args_skip */
-  0,  /* frameless_function_invocation */
+  0,  /* deprecated_frameless_function_invocation */
   0,  /* deprecated_frame_chain */
   0,  /* deprecated_frame_chain_valid */
   0,  /* deprecated_frame_saved_pc */
@@ -512,7 +512,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
   current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
   current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
   current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
-  current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
   current_gdbarch->deprecated_frame_args_address = get_frame_base;
   current_gdbarch->deprecated_frame_locals_address = get_frame_base;
   current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
@@ -690,7 +689,7 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
   /* Skip verify of function_start_offset, invalid_p == 0 */
   /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
   /* Skip verify of frame_args_skip, invalid_p == 0 */
-  /* Skip verify of frameless_function_invocation, invalid_p == 0 */
+  /* Skip verify of deprecated_frameless_function_invocation, has predicate */
   /* Skip verify of deprecated_frame_chain, has predicate */
   /* Skip verify of deprecated_frame_chain_valid, has predicate */
   /* Skip verify of deprecated_frame_saved_pc, has predicate */
@@ -1079,6 +1078,25 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
                       "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
                       DEPRECATED_FP_REGNUM);
 #endif
+#ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P()",
+                      XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()));
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() = %d\n",
+                      DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ());
+#endif
+#ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi)",
+                      XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi)));
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
+                      (long) current_gdbarch->deprecated_frameless_function_invocation
+                      /*DEPRECATED_FRAMELESS_FUNCTION_INVOCATION ()*/);
+#endif
 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
@@ -1746,16 +1764,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
                       "gdbarch_dump: FP0_REGNUM = %d\n",
                       FP0_REGNUM);
 #endif
-#ifdef FRAMELESS_FUNCTION_INVOCATION
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "FRAMELESS_FUNCTION_INVOCATION(fi)",
-                      XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
-                      (long) current_gdbarch->frameless_function_invocation
-                      /*FRAMELESS_FUNCTION_INVOCATION ()*/);
-#endif
 #ifdef FRAME_ARGS_SKIP
   fprintf_unfiltered (file,
                       "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
@@ -4475,20 +4483,27 @@ set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
 }
 
 int
-gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
+gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch)
+{
+  gdb_assert (gdbarch != NULL);
+  return gdbarch->deprecated_frameless_function_invocation != NULL;
+}
+
+int
+gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
 {
   gdb_assert (gdbarch != NULL);
-  gdb_assert (gdbarch->frameless_function_invocation != NULL);
+  gdb_assert (gdbarch->deprecated_frameless_function_invocation != NULL);
   if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
-  return gdbarch->frameless_function_invocation (fi);
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frameless_function_invocation called\n");
+  return gdbarch->deprecated_frameless_function_invocation (fi);
 }
 
 void
-set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
-                                           gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
+set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch,
+                                                      gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation)
 {
-  gdbarch->frameless_function_invocation = frameless_function_invocation;
+  gdbarch->deprecated_frameless_function_invocation = deprecated_frameless_function_invocation;
 }
 
 int
index 4de8654..3f01249 100644 (file)
@@ -1641,14 +1641,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"
-#endif
-#if !defined (FRAMELESS_FUNCTION_INVOCATION)
-#define FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_frameless_function_invocation (current_gdbarch, fi))
+/* 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 (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION)
+#define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_deprecated_frameless_function_invocation (current_gdbarch, fi))
 #endif
 
 #if defined (DEPRECATED_FRAME_CHAIN)
index 6c9ce48..df3b102 100755 (executable)
@@ -645,7 +645,10 @@ v:2:FUNCTION_START_OFFSET:CORE_ADDR:function_start_offset::::0:::0
 m::REMOTE_TRANSLATE_XFER_ADDRESS:void:remote_translate_xfer_address:struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len:regcache, gdb_addr, gdb_len, rem_addr, rem_len:::generic_remote_translate_xfer_address::0
 #
 v::FRAME_ARGS_SKIP:CORE_ADDR:frame_args_skip::::0:::0
-f:2:FRAMELESS_FUNCTION_INVOCATION:int:frameless_function_invocation:struct frame_info *fi:fi:::generic_frameless_function_invocation_not::0
+# DEPRECATED_FRAMELESS_FUNCTION_INVOCATION is not needed.  The new
+# frame code works regardless of the type of frame - frameless,
+# stackless, or normal.
+F::DEPRECATED_FRAMELESS_FUNCTION_INVOCATION:int:deprecated_frameless_function_invocation:struct frame_info *fi:fi
 F:2:DEPRECATED_FRAME_CHAIN:CORE_ADDR:deprecated_frame_chain:struct frame_info *frame:frame
 F:2:DEPRECATED_FRAME_CHAIN_VALID:int:deprecated_frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe
 # DEPRECATED_FRAME_SAVED_PC has been replaced by UNWIND_PC.  Please
index 3ec6d51..d15c435 100644 (file)
@@ -1323,9 +1323,7 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
    */
   /* Stack grows up. */
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
-  /* This value is almost never non-zero... */
-  set_gdbarch_frameless_function_invocation (gdbarch,
-                                            frameless_look_for_prologue);
+  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue);
 
   set_gdbarch_deprecated_extract_struct_value_address (gdbarch, h8300_extract_struct_value_address);
   set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention);
index 9ca22a9..06aa5a9 100644 (file)
@@ -5217,8 +5217,7 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_deprecated_init_extra_frame_info (gdbarch, hppa_init_extra_frame_info);
   set_gdbarch_deprecated_frame_chain (gdbarch, hppa_frame_chain);
   set_gdbarch_deprecated_frame_chain_valid (gdbarch, hppa_frame_chain_valid);
-  set_gdbarch_frameless_function_invocation
-    (gdbarch, hppa_frameless_function_invocation);
+  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, hppa_frameless_function_invocation);
   set_gdbarch_deprecated_frame_saved_pc (gdbarch, hppa_frame_saved_pc);
   set_gdbarch_deprecated_pop_frame (gdbarch, hppa_pop_frame);
 #endif
index 700bfb2..1cc522c 100644 (file)
@@ -950,8 +950,7 @@ m32r_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_memory_remove_breakpoint (gdbarch,
                                        m32r_memory_remove_breakpoint);
 
-  set_gdbarch_frameless_function_invocation (gdbarch,
-                                            frameless_look_for_prologue);
+  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue);
 
   set_gdbarch_frame_align (gdbarch, m32r_frame_align);
 
index f6284ee..a499005 100644 (file)
@@ -232,7 +232,7 @@ m68k_frameless_function_invocation (struct frame_info *fi)
   if (get_frame_type (fi) == SIGTRAMP_FRAME)
     return 0;
   else
-    return frameless_look_for_prologue (fi);
+    return legacy_frameless_look_for_prologue (fi);
 }
 
 int
@@ -251,7 +251,7 @@ delta68_frame_args_address (struct frame_info *frame_info)
      or other functions who do not put anything on the stack. */
   if (get_frame_type (frame_info) == SIGTRAMP_FRAME)
     return get_frame_base (frame_info) + 12;
-  else if (frameless_look_for_prologue (frame_info))
+  else if (legacy_frameless_look_for_prologue (frame_info))
     {
       /* Check for an interrupted system call */
       if (get_next_frame (frame_info) && (get_frame_type (get_next_frame (frame_info)) == SIGTRAMP_FRAME))
@@ -1073,8 +1073,7 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_deprecated_extract_struct_value_address (gdbarch, m68k_extract_struct_value_address);
   set_gdbarch_use_struct_convention (gdbarch, m68k_use_struct_convention);
 
-  set_gdbarch_frameless_function_invocation (gdbarch,
-                                            m68k_frameless_function_invocation);
+  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, m68k_frameless_function_invocation);
   set_gdbarch_frame_args_skip (gdbarch, 8);
 
   set_gdbarch_register_type (gdbarch, m68k_register_type);
index ecd3864..95475a8 100644 (file)
@@ -556,8 +556,6 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_deprecated_saved_pc_after_call (gdbarch, ns32k_saved_pc_after_call);
 
   set_gdbarch_frame_num_args (gdbarch, umax_frame_num_args);
-  set_gdbarch_frameless_function_invocation (gdbarch,
-                                   generic_frameless_function_invocation_not);
   
   set_gdbarch_deprecated_frame_chain (gdbarch, ns32k_frame_chain);
   set_gdbarch_deprecated_frame_saved_pc (gdbarch, ns32k_frame_saved_pc);
index a0bb760..84eb742 100644 (file)
@@ -1053,8 +1053,7 @@ ppc_linux_init_abi (struct gdbarch_info info,
 
       /* Note: kevinb/2002-04-12: See note in rs6000_gdbarch_init regarding
         *_push_arguments().  The same remarks hold for the methods below.  */
-      set_gdbarch_frameless_function_invocation (gdbarch,
-        ppc_linux_frameless_function_invocation);
+      set_gdbarch_deprecated_frameless_function_invocation (gdbarch, ppc_linux_frameless_function_invocation);
       set_gdbarch_deprecated_frame_chain (gdbarch, ppc_linux_frame_chain);
       set_gdbarch_deprecated_frame_saved_pc (gdbarch, ppc_linux_frame_saved_pc);
 
index 6d487ab..32cedc0 100644 (file)
@@ -1776,7 +1776,8 @@ rs6000_frame_chain (struct frame_info *thisframe)
                           wordsize);
   else if (get_next_frame (thisframe) != NULL
           && (get_frame_type (get_next_frame (thisframe)) == SIGTRAMP_FRAME)
-          && FRAMELESS_FUNCTION_INVOCATION (thisframe))
+          && (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()
+              && DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (thisframe)))
     /* A frameless function interrupted by a signal did not change the
        frame pointer.  */
     fp = get_frame_base (thisframe);
@@ -2903,8 +2904,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
     set_gdbarch_use_struct_convention (gdbarch,
                                       rs6000_use_struct_convention);
 
-  set_gdbarch_frameless_function_invocation (gdbarch,
-                                         rs6000_frameless_function_invocation);
+  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, rs6000_frameless_function_invocation);
   set_gdbarch_deprecated_frame_chain (gdbarch, rs6000_frame_chain);
   set_gdbarch_deprecated_frame_saved_pc (gdbarch, rs6000_frame_saved_pc);
 
index c97f8c5..2d3f3ad 100644 (file)
@@ -2589,8 +2589,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* This function that tells us whether the function invocation represented
      by FI does not have a frame on the stack associated with it.  If it
      does not, FRAMELESS is set to 1, else 0.  */
-  set_gdbarch_frameless_function_invocation (gdbarch,
-                                            s390_frameless_function_invocation);
+  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, s390_frameless_function_invocation);
   /* Return saved PC from a frame */
   set_gdbarch_deprecated_frame_saved_pc (gdbarch, s390_frame_saved_pc);
   /* DEPRECATED_FRAME_CHAIN takes a frame's nominal address and
index ca29710..2e2b08e 100644 (file)
@@ -2223,8 +2223,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_nofpu);
 
-  set_gdbarch_frameless_function_invocation (gdbarch,
-                                            frameless_look_for_prologue);
+  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue);
   set_gdbarch_believe_pcc_promotion (gdbarch, 1);
 
   set_gdbarch_frame_align (gdbarch, sh_frame_align);
index b02aff1..f0fba0d 100644 (file)
@@ -2847,7 +2847,7 @@ sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_skip_prologue (gdbarch, sh_skip_prologue);
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
 
-  set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue);
+  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue);
   set_gdbarch_believe_pcc_promotion (gdbarch, 1);
 
   set_gdbarch_deprecated_frame_saved_pc (gdbarch, sh_frame_saved_pc);
index 0a9052f..18d9a7c 100644 (file)
@@ -942,7 +942,8 @@ frame_info (char *addr_exp, int from_tty)
 
   {
     int frameless;
-    frameless = FRAMELESS_FUNCTION_INVOCATION (fi);
+    frameless = (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()
+                && DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi));
     if (frameless)
       printf_filtered (" (FRAMELESS),");
   }
index 809330e..a0eac7d 100644 (file)
@@ -363,8 +363,6 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_deprecated_saved_pc_after_call (gdbarch, vax_saved_pc_after_call);
 
   set_gdbarch_frame_num_args (gdbarch, vax_frame_num_args);
-  set_gdbarch_frameless_function_invocation (gdbarch,
-                                  generic_frameless_function_invocation_not);
 
   set_gdbarch_deprecated_frame_chain (gdbarch, vax_frame_chain);
   set_gdbarch_deprecated_frame_saved_pc (gdbarch, vax_frame_saved_pc);