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 2a47add3aae250f83c4f0aa84c00bbb2293f463b..e4d7524a4953e3cd0e984b89c2b99e07e74ac01c 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 ce66f3071282e001bff3a81c60d6825f8ad07085..44b85d1c300bfa3ff082b0e3a1f41d8d0ea5ff95 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 09fc52cf13f008b7f447b7de8d2fc1716e08147e..94ba59be853ab668faadd4af1251a8765f69d311 100644 (file)
@@ -84,12 +84,6 @@ legacy_register_sim_regno (int regnum)
     return LEGACY_SIM_REGNO_IGNORE;
 }
 
-int
-generic_frameless_function_invocation_not (struct frame_info *fi)
-{
-  return 0;
-}
-
 int
 generic_return_value_on_stack_not (struct type *type)
 {
index 158868ff5f2828aed24b55b167b31f2c706c3860..0f7a23d517bbedece378e8d307ac015385efb767 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 86c1ec5aa8a7bcd758e9175f68e93c924e66a8ac..9d53facf1241dce5c4bb5b894106da5869c96341 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 108732b4081caed485b16a3d0ab42e977a035dd8..d9c16a55aa846765f2a416c673cfc5dc0726a0f3 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 7d240b4e53f854bc12adcfdc8a5c581d07be3f86..265bd2e82f131ceaf10a27f8189d9c27a74943f2 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 731d51601310abc88af864d207d0ecf3862987e0..7558f2db00ec376d6cd1698adfbf4888959f8075 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 90936f6a39d9eb7e17f328bd1808f64e4c3154cc..4b977c6877190df7df0f283f7b8480cb03064db1 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 4f8998802f1ce7d01326ba652d1559ef8f4ccecb..793da9198c8810a9a8ef696b37d422e5cc230219 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 76c95e4f8f92639671f5813bdbd1f92047c74b87..6cf794d1b269e4cee61ba891de114fe6a5f18ffa 100644 (file)
@@ -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 6b0ed77303d1f0e81dd96cf9d0ac2af9d59deaac..a032c47e92b1437dc33550c2128d5ea648e4dd4d 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 5d2a10662dea841039f63ffbd560518710763bfd..0cdae6d31dc983e2d768471e296968fd8c1049d3 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 4e0c76bd9b37b5fcfbab3937803d14cabe067199..621848e4d46c7890b717ff0d1fde8da359593ac9 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 0f6e41535e7502ce9c765e7db01d0f36242f06b9..1ee401f7d81c9d973c18d65e43c7383b1ceb4243 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 4de86546bbc97cbfc541c2c7f688bbc8672785ae..3f01249ad3dd5543a3dd835293e970661616f5ab 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 6c9ce48ac3df4656bdddfd9d42760ac0eebfea00..df3b10265cc212e7578db36a5f3ee38d5d6e18ae 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 3ec6d514c5dedfadfea17a522a1b2aa713e60fe3..d15c43582be52898a7c8835bbcd4207ba2e53d10 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 9ca22a93a0dfaa1af0f811a42ea57f57a7c21c21..06aa5a9896f387ec482225ddbb1e9913f41bfc3e 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 700bfb2570673c97835e42de71283543f34f800d..1cc522c5a5ac5dcb1c5e9b768159fbf36fcffe84 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 f6284ee9aa88212b268e48aaa55ce8ad82880f21..a499005ac75e15c79d38c739a854bcc2640a1112 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 ecd3864d995bcf2d618e5b7782dcc1d25502a411..95475a894caaa8d520b8370f8b6136a3a8b7e63e 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 a0bb7607f06dff63340d9e6de638c794fbf23232..84eb742d8e27e2d58fa66fecbef8bd28301cda48 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 6d487ab0b080b001da159f212cebd86230f1f08b..32cedc048fe749025318ef29e4bf6e7e31b4b145 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 c97f8c5f7e03ace99a39b9592b7c60a7c5d275c2..2d3f3ad81616e55b1ce49ecf790ac449da7cb607 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 ca29710b5ab53857d65a1a41d89bae096d20464d..2e2b08ee00222eb6c7d94f67c2c91b9ae0a486cf 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 b02aff1aa810560f2f1c63238315f76569fd0e4c..f0fba0dc63d707d4937f2a909630bbaacc9c2d59 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 0a9052f323b5e1022aec883592a88e079903c070..18d9a7c303e5492312865e2c04945ae20973770d 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 809330eba09c4a40f65039b58b9187345020d4cb..a0eac7dbcda0cd2656b5a2c9b00bd1a1a250645c 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);