aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-02-16 21:49:22 +0000
committerAndrew Cagney <cagney@redhat.com>2004-02-16 21:49:22 +0000
commit19772a2ce262d4dfd45428ec7b96c76b46c508e3 (patch)
treed02b4d60cda8b3d98099268d65e182e935525183
parent2be8b3c13270e97d0bdc3247a739bc735782bb92 (diff)
downloadgdb-19772a2ce262d4dfd45428ec7b96c76b46c508e3.zip
gdb-19772a2ce262d4dfd45428ec7b96c76b46c508e3.tar.gz
gdb-19772a2ce262d4dfd45428ec7b96c76b46c508e3.tar.bz2
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.
-rw-r--r--gdb/ChangeLog36
-rw-r--r--gdb/alpha-tdep.c2
-rw-r--r--gdb/arch-utils.c6
-rw-r--r--gdb/arch-utils.h3
-rw-r--r--gdb/arm-tdep.c3
-rw-r--r--gdb/avr-tdep.c3
-rw-r--r--gdb/blockframe.c8
-rw-r--r--gdb/cris-tdep.c5
-rw-r--r--gdb/d10v-tdep.c3
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdbint.texinfo4
-rw-r--r--gdb/frame.c3
-rw-r--r--gdb/frame.h2
-rw-r--r--gdb/frv-tdep.c5
-rw-r--r--gdb/gdbarch.c57
-rw-r--r--gdb/gdbarch.h35
-rwxr-xr-xgdb/gdbarch.sh5
-rw-r--r--gdb/h8300-tdep.c4
-rw-r--r--gdb/hppa-tdep.c3
-rw-r--r--gdb/m32r-tdep.c3
-rw-r--r--gdb/m68k-tdep.c7
-rw-r--r--gdb/ns32k-tdep.c2
-rw-r--r--gdb/ppc-linux-tdep.c3
-rw-r--r--gdb/rs6000-tdep.c6
-rw-r--r--gdb/s390-tdep.c3
-rw-r--r--gdb/sh-tdep.c3
-rw-r--r--gdb/sh64-tdep.c2
-rw-r--r--gdb/stack.c3
-rw-r--r--gdb/vax-tdep.c2
29 files changed, 137 insertions, 89 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2a47add..e4d7524 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index ce66f30..44b85d1 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -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);
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 09fc52c..94ba59b 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -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;
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
index 158868f..0f7a23d 100644
--- a/gdb/arch-utils.h
+++ b/gdb/arch-utils.h
@@ -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. */
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 86c1ec5..9d53fac 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -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);
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 108732b..d9c16a5 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -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);
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 7d240b4..265bd2e 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -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;
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 731d516..7558f2d 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -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);
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index 90936f6..4b977c6 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -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);
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 4f89988..793da91 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -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>
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 76c95e4..6cf794d 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -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.
diff --git a/gdb/frame.c b/gdb/frame.c
index 6b0ed77..a032c47 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -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;
diff --git a/gdb/frame.h b/gdb/frame.h
index 5d2a106..0cdae6d 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -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 *);
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index 4e0c76b..621848e 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -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);
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 0f6e415..1ee401f 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -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
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 4de8654..3f01249 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -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)
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 6c9ce48..df3b102 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -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
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index 3ec6d51..d15c435 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -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);
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 9ca22a9..06aa5a9 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -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
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index 700bfb2..1cc522c 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -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);
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index f6284ee..a499005 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -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);
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index ecd3864..95475a8 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -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);
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index a0bb760..84eb742 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -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);
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 6d487ab..32cedc0 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -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);
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index c97f8c5..2d3f3ad 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -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
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index ca29710..2e2b08e 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -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);
diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c
index b02aff1..f0fba0d 100644
--- a/gdb/sh64-tdep.c
+++ b/gdb/sh64-tdep.c
@@ -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);
diff --git a/gdb/stack.c b/gdb/stack.c
index 0a9052f..18d9a7c 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -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),");
}
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 809330e..a0eac7d 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -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);