summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-06-26 17:18:43 +0000
committerAndrew Cagney <cagney@redhat.com>2003-06-26 17:18:43 +0000
commit548c5b9a72226fe056c082ada66926eb395b6063 (patch)
tree515317934b6f9c0c5838ffd773198da2a553639d
parent4227afed0c704f68995b4d6a186b6fc81a529bae (diff)
downloadgdb-548c5b9a72226fe056c082ada66926eb395b6063.tar.gz
2003-06-26 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (FRAME_ARGS_ADDRESS): Add predicate. Deprecate. (FRAME_LOCALS_ADDRESS): Add predicate. Deprecate. * gdbarch.h, gdbarch.c: Re-generate. * frame-base.c (default_frame_args_address): Update. Use default_frame_base_address when DEPRECATED_FRAME_ARGS_ADDRESS is not available. (default_frame_locals_address): Ditto for DEPRECATED_FRAME_LOCALS_ADDRESS. * vax-tdep.c (vax_sigtramp_saved_pc): Update. (vax_frame_num_args): Update. (vax_gdbarch_init): Update. * rs6000-tdep.c (rs6000_gdbarch_init): Update. * ns32k-tdep.c (ns32k_gdbarch_init): Update. * mcore-tdep.c (mcore_gdbarch_init): Update. * m68hc11-tdep.c (m68hc11_gdbarch_init): Update. * ia64-tdep.c (ia64_gdbarch_init): Update. * symtab.h (address_class): Update comments. * ns32k-tdep.c (ns32k_sigtramp_saved_pc): Update. * config/sparc/tm-sparc.h (DEPRECATED_FRAME_ARGS_ADDRESS): Update. (DEPRECATED_FRAME_LOCALS_ADDRESS): Update. * config/pa/tm-hppa64.h (DEPRECATED_FRAME_ARGS_ADDRESS): Update. (DEPRECATED_FRAME_LOCALS_ADDRESS): Update. (DEPRECATED_FRAME_LOCALS_ADDRESS): Update. * config/m68k/tm-delta68.h (DEPRECATED_FRAME_ARGS_ADDRESS): Update. * alpha-mdebug-tdep.c: Update. * ada-lang.c (add_symbols_from_enclosing_procs): Update.
-rw-r--r--gdb/ChangeLog29
-rw-r--r--gdb/ada-lang.c2
-rw-r--r--gdb/alpha-mdebug-tdep.c2
-rw-r--r--gdb/config/m68k/tm-delta68.h4
-rw-r--r--gdb/config/pa/tm-hppa64.h8
-rw-r--r--gdb/config/sparc/tm-sparc.h4
-rw-r--r--gdb/frame-base.c24
-rw-r--r--gdb/gdbarch.c126
-rw-r--r--gdb/gdbarch.h82
-rwxr-xr-xgdb/gdbarch.sh8
-rw-r--r--gdb/ia64-tdep.c4
-rw-r--r--gdb/m68hc11-tdep.c2
-rw-r--r--gdb/mcore-tdep.c4
-rw-r--r--gdb/ns32k-tdep.c4
-rw-r--r--gdb/rs6000-tdep.c4
-rw-r--r--gdb/symtab.h11
-rw-r--r--gdb/vax-tdep.c8
17 files changed, 224 insertions, 102 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index faf1188341b..b936105c201 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,32 @@
+2003-06-26 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (FRAME_ARGS_ADDRESS): Add predicate. Deprecate.
+ (FRAME_LOCALS_ADDRESS): Add predicate. Deprecate.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * frame-base.c (default_frame_args_address): Update. Use
+ default_frame_base_address when DEPRECATED_FRAME_ARGS_ADDRESS is
+ not available.
+ (default_frame_locals_address): Ditto for
+ DEPRECATED_FRAME_LOCALS_ADDRESS.
+ * vax-tdep.c (vax_sigtramp_saved_pc): Update.
+ (vax_frame_num_args): Update.
+ (vax_gdbarch_init): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Update.
+ * mcore-tdep.c (mcore_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ * symtab.h (address_class): Update comments.
+ * ns32k-tdep.c (ns32k_sigtramp_saved_pc): Update.
+ * config/sparc/tm-sparc.h (DEPRECATED_FRAME_ARGS_ADDRESS): Update.
+ (DEPRECATED_FRAME_LOCALS_ADDRESS): Update.
+ * config/pa/tm-hppa64.h (DEPRECATED_FRAME_ARGS_ADDRESS): Update.
+ (DEPRECATED_FRAME_LOCALS_ADDRESS): Update.
+ (DEPRECATED_FRAME_LOCALS_ADDRESS): Update.
+ * config/m68k/tm-delta68.h (DEPRECATED_FRAME_ARGS_ADDRESS): Update.
+ * alpha-mdebug-tdep.c: Update.
+ * ada-lang.c (add_symbols_from_enclosing_procs): Update.
+
2003-06-26 Andreas Jaeger <aj@suse.de>
* x86-64-tdep.c (x86_64_push_arguments): Always set %rax to number
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 26780e305f0..cc204d6fefd 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -3559,7 +3559,7 @@ add_symbols_from_enclosing_procs (const char *name, domain_enum domain,
QUIT;
frame = get_prev_frame (frame);
}
- while (frame != NULL && FRAME_LOCALS_ADDRESS (frame) != target_link);
+ while (frame != NULL && DEPRECATED_FRAME_LOCALS_ADDRESS (frame) != target_link);
if (frame == NULL)
break;
diff --git a/gdb/alpha-mdebug-tdep.c b/gdb/alpha-mdebug-tdep.c
index d481986b8c3..9eb9c62c7da 100644
--- a/gdb/alpha-mdebug-tdep.c
+++ b/gdb/alpha-mdebug-tdep.c
@@ -45,7 +45,7 @@
| |localoff | Copies of 1st .. 6th |
| | | | | argument if necessary. |
| | | v | |
- | | | --- |-------------------------------|<-- FRAME_LOCALS_ADDRESS
+ | | | --- |-------------------------------|<-- LOCALS_ADDRESS
| | | | |
| | | | Locals and temporaries. |
| | | | |
diff --git a/gdb/config/m68k/tm-delta68.h b/gdb/config/m68k/tm-delta68.h
index 014fc6381e1..25b747ec8eb 100644
--- a/gdb/config/m68k/tm-delta68.h
+++ b/gdb/config/m68k/tm-delta68.h
@@ -105,5 +105,5 @@ extern CORE_ADDR delta68_frame_saved_pc (struct frame_info *fi);
#define DEPRECATED_FRAME_SAVED_PC(fi) delta68_frame_saved_pc (fi)
extern CORE_ADDR delta68_frame_args_address (struct frame_info *fi);
-#undef FRAME_ARGS_ADDRESS
-#define FRAME_ARGS_ADDRESS(fi) delta68_frame_args_address (fi)
+#undef DEPRECATED_FRAME_ARGS_ADDRESS
+#define DEPRECATED_FRAME_ARGS_ADDRESS(fi) delta68_frame_args_address (fi)
diff --git a/gdb/config/pa/tm-hppa64.h b/gdb/config/pa/tm-hppa64.h
index a8d414e0551..2e5e039d7f3 100644
--- a/gdb/config/pa/tm-hppa64.h
+++ b/gdb/config/pa/tm-hppa64.h
@@ -283,12 +283,12 @@ extern CORE_ADDR hppa_frame_saved_pc (struct frame_info *frame);
#if !GDB_MULTI_ARCH
extern CORE_ADDR hppa_frame_args_address (struct frame_info *fi);
-#define FRAME_ARGS_ADDRESS(fi) hppa_frame_args_address (fi)
+#define DEPRECATED_FRAME_ARGS_ADDRESS(fi) hppa_frame_args_address (fi)
#endif
#if !GDB_MULTI_ARCH
extern CORE_ADDR hppa_frame_locals_address (struct frame_info *fi);
-#define FRAME_LOCALS_ADDRESS(fi) hppa_frame_locals_address (fi)
+#define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) hppa_frame_locals_address (fi)
#endif
#if !GDB_MULTI_ARCH
@@ -445,8 +445,8 @@ extern CORE_ADDR hppa_target_read_fp (void);
/* We access locals from SP. This may not work for frames which call
alloca; for those, we may need to consult unwind tables.
jimb: FIXME. */
-#undef FRAME_LOCALS_ADDRESS
-#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
+#undef DEPRECATED_FRAME_LOCALS_ADDRESS
+#define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
/* For a number of horrible reasons we may have to adjust the location
of variables on the stack. Ugh. jimb: why? */
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
index 4f8acaf4448..64ce5c72cbd 100644
--- a/gdb/config/sparc/tm-sparc.h
+++ b/gdb/config/sparc/tm-sparc.h
@@ -441,9 +441,9 @@ extern CORE_ADDR sparc_frame_chain (struct frame_info *);
extern CORE_ADDR sparc_frame_saved_pc (struct frame_info *);
/* If the argument is on the stack, it will be here. */
-#define FRAME_ARGS_ADDRESS(FI) (get_frame_base (FI))
+#define DEPRECATED_FRAME_ARGS_ADDRESS(FI) (get_frame_base (FI))
-#define FRAME_LOCALS_ADDRESS(FI) (get_frame_base (FI))
+#define DEPRECATED_FRAME_LOCALS_ADDRESS(FI) (get_frame_base (FI))
/* Set VAL to the number of args passed to frame described by FI.
Can set VAL to -1, meaning no way to tell. */
diff --git a/gdb/frame-base.c b/gdb/frame-base.c
index 6f666a77b59..0865a0ce6c9 100644
--- a/gdb/frame-base.c
+++ b/gdb/frame-base.c
@@ -24,9 +24,9 @@
#include "frame.h"
/* A default frame base implementations. If it wasn't for the old
- FRAME_LOCALS_ADDRESS and FRAME_ARGS_ADDRESS, these could be
- combined into a single function. All architectures really need to
- override this. */
+ DEPRECATED_FRAME_LOCALS_ADDRESS and DEPRECATED_FRAME_ARGS_ADDRESS,
+ these could be combined into a single function. All architectures
+ really need to override this. */
static CORE_ADDR
default_frame_base_address (struct frame_info *next_frame, void **this_cache)
@@ -38,15 +38,25 @@ default_frame_base_address (struct frame_info *next_frame, void **this_cache)
static CORE_ADDR
default_frame_locals_address (struct frame_info *next_frame, void **this_cache)
{
- struct frame_info *this_frame = get_prev_frame (next_frame);
- return FRAME_LOCALS_ADDRESS (this_frame);
+ if (DEPRECATED_FRAME_LOCALS_ADDRESS_P ())
+ {
+ /* This is bad. The computation of per-frame locals address
+ should use a per-frame frame-base. */
+ struct frame_info *this_frame = get_prev_frame (next_frame);
+ return DEPRECATED_FRAME_LOCALS_ADDRESS (this_frame);
+ }
+ return default_frame_base_address (next_frame, this_cache);
}
static CORE_ADDR
default_frame_args_address (struct frame_info *next_frame, void **this_cache)
{
- struct frame_info *this_frame = get_prev_frame (next_frame);
- return FRAME_ARGS_ADDRESS (this_frame);
+ if (DEPRECATED_FRAME_ARGS_ADDRESS_P ())
+ {
+ struct frame_info *this_frame = get_prev_frame (next_frame);
+ return DEPRECATED_FRAME_ARGS_ADDRESS (this_frame);
+ }
+ return default_frame_base_address (next_frame, this_cache);
}
const struct frame_base default_frame_base = {
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 7918b0c2f60..87585dd42c6 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -246,8 +246,8 @@ struct gdbarch
gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
gdbarch_unwind_pc_ftype *unwind_pc;
gdbarch_unwind_sp_ftype *unwind_sp;
- gdbarch_frame_args_address_ftype *frame_args_address;
- gdbarch_frame_locals_address_ftype *frame_locals_address;
+ gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address;
+ gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address;
gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
gdbarch_frame_num_args_ftype *frame_num_args;
gdbarch_stack_align_ftype *stack_align;
@@ -413,8 +413,8 @@ struct gdbarch startup_gdbarch =
0, /* deprecated_frame_saved_pc */
0, /* unwind_pc */
0, /* unwind_sp */
- 0, /* frame_args_address */
- 0, /* frame_locals_address */
+ get_frame_base, /* deprecated_frame_args_address */
+ get_frame_base, /* deprecated_frame_locals_address */
0, /* deprecated_saved_pc_after_call */
0, /* frame_num_args */
0, /* stack_align */
@@ -547,8 +547,8 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
current_gdbarch->frame_args_skip = -1;
current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
- current_gdbarch->frame_args_address = get_frame_base;
- current_gdbarch->frame_locals_address = get_frame_base;
+ current_gdbarch->deprecated_frame_args_address = get_frame_base;
+ current_gdbarch->deprecated_frame_locals_address = get_frame_base;
current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
current_gdbarch->addr_bits_remove = core_addr_identity;
current_gdbarch->smash_text_address = core_addr_identity;
@@ -723,8 +723,8 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of deprecated_frame_saved_pc, has predicate */
/* Skip verify of unwind_pc, has predicate */
/* Skip verify of unwind_sp, has predicate */
- /* Skip verify of frame_args_address, invalid_p == 0 */
- /* Skip verify of frame_locals_address, invalid_p == 0 */
+ /* Skip verify of deprecated_frame_args_address, has predicate */
+ /* Skip verify of deprecated_frame_locals_address, has predicate */
/* Skip verify of deprecated_saved_pc_after_call, has predicate */
/* Skip verify of frame_num_args, has predicate */
/* Skip verify of stack_align, has predicate */
@@ -1169,6 +1169,26 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
DEPRECATED_FP_REGNUM);
#endif
+#ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
+ XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS_P() = %d\n",
+ DEPRECATED_FRAME_ARGS_ADDRESS_P ());
+#endif
+#ifdef DEPRECATED_FRAME_ARGS_ADDRESS
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
+ XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi)));
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS = <0x%08lx>\n",
+ (long) current_gdbarch->deprecated_frame_args_address
+ /*DEPRECATED_FRAME_ARGS_ADDRESS ()*/);
+#endif
#ifdef DEPRECATED_FRAME_CHAIN_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -1232,6 +1252,26 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->deprecated_frame_init_saved_regs
/*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
#endif
+#ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
+ XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS_P() = %d\n",
+ DEPRECATED_FRAME_LOCALS_ADDRESS_P ());
+#endif
+#ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
+ XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi)));
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
+ (long) current_gdbarch->deprecated_frame_locals_address
+ /*DEPRECATED_FRAME_LOCALS_ADDRESS ()*/);
+#endif
#ifdef DEPRECATED_FRAME_SAVED_PC_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -1792,17 +1832,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->frameless_function_invocation
/*FRAMELESS_FUNCTION_INVOCATION ()*/);
#endif
-#ifdef FRAME_ARGS_ADDRESS
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "FRAME_ARGS_ADDRESS(fi)",
- XSTRING (FRAME_ARGS_ADDRESS (fi)));
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
- (long) current_gdbarch->frame_args_address
- /*FRAME_ARGS_ADDRESS ()*/);
-#endif
#ifdef FRAME_ARGS_SKIP
fprintf_unfiltered (file,
"gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
@@ -1811,17 +1840,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
(long) FRAME_ARGS_SKIP);
#endif
-#ifdef FRAME_LOCALS_ADDRESS
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "FRAME_LOCALS_ADDRESS(fi)",
- XSTRING (FRAME_LOCALS_ADDRESS (fi)));
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
- (long) current_gdbarch->frame_locals_address
- /*FRAME_LOCALS_ADDRESS ()*/);
-#endif
#ifdef FRAME_NUM_ARGS_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -5049,42 +5067,58 @@ set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
gdbarch->unwind_sp = unwind_sp;
}
+int
+gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_frame_args_address != get_frame_base;
+}
+
CORE_ADDR
-gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
+gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->frame_args_address == 0)
+ if (gdbarch->deprecated_frame_args_address == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_frame_args_address invalid");
+ "gdbarch: gdbarch_deprecated_frame_args_address invalid");
+ /* Ignore predicate (gdbarch->deprecated_frame_args_address != get_frame_base). */
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
- return gdbarch->frame_args_address (fi);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n");
+ return gdbarch->deprecated_frame_args_address (fi);
}
void
-set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
- gdbarch_frame_args_address_ftype frame_args_address)
+set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch,
+ gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address)
{
- gdbarch->frame_args_address = frame_args_address;
+ gdbarch->deprecated_frame_args_address = deprecated_frame_args_address;
+}
+
+int
+gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_frame_locals_address != get_frame_base;
}
CORE_ADDR
-gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
+gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->frame_locals_address == 0)
+ if (gdbarch->deprecated_frame_locals_address == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_frame_locals_address invalid");
+ "gdbarch: gdbarch_deprecated_frame_locals_address invalid");
+ /* Ignore predicate (gdbarch->deprecated_frame_locals_address != get_frame_base). */
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
- return gdbarch->frame_locals_address (fi);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n");
+ return gdbarch->deprecated_frame_locals_address (fi);
}
void
-set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
- gdbarch_frame_locals_address_ftype frame_locals_address)
+set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch,
+ gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address)
{
- gdbarch->frame_locals_address = frame_locals_address;
+ gdbarch->deprecated_frame_locals_address = deprecated_frame_locals_address;
}
int
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index a0e09b29fff..4dd7cfa9d7f 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -2330,34 +2330,80 @@ typedef CORE_ADDR (gdbarch_unwind_sp_ftype) (struct gdbarch *gdbarch, struct fra
extern CORE_ADDR gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame);
extern void set_gdbarch_unwind_sp (struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype *unwind_sp);
+/* DEPRECATED_FRAME_ARGS_ADDRESS as been replaced by the per-frame
+ frame-base. Enable frame-base before frame-unwind. */
+
+#if defined (DEPRECATED_FRAME_ARGS_ADDRESS)
+/* Legacy for systems yet to multi-arch DEPRECATED_FRAME_ARGS_ADDRESS */
+#if !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
+#define DEPRECATED_FRAME_ARGS_ADDRESS_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
+#define DEPRECATED_FRAME_ARGS_ADDRESS_P() (0)
+#endif
+
+extern int gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
+#error "Non multi-arch definition of DEPRECATED_FRAME_ARGS_ADDRESS"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
+#define DEPRECATED_FRAME_ARGS_ADDRESS_P() (gdbarch_deprecated_frame_args_address_p (current_gdbarch))
+#endif
+
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (FRAME_ARGS_ADDRESS)
-#define FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi))
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_ARGS_ADDRESS)
+#define DEPRECATED_FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi))
+#endif
+
+typedef CORE_ADDR (gdbarch_deprecated_frame_args_address_ftype) (struct frame_info *fi);
+extern CORE_ADDR gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi);
+extern void set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_ARGS_ADDRESS)
+#error "Non multi-arch definition of DEPRECATED_FRAME_ARGS_ADDRESS"
+#endif
+#if !defined (DEPRECATED_FRAME_ARGS_ADDRESS)
+#define DEPRECATED_FRAME_ARGS_ADDRESS(fi) (gdbarch_deprecated_frame_args_address (current_gdbarch, fi))
+#endif
+
+/* DEPRECATED_FRAME_LOCALS_ADDRESS as been replaced by the per-frame
+ frame-base. Enable frame-base before frame-unwind. */
+
+#if defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
+/* Legacy for systems yet to multi-arch DEPRECATED_FRAME_LOCALS_ADDRESS */
+#if !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
+#define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
+#define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (0)
#endif
-typedef CORE_ADDR (gdbarch_frame_args_address_ftype) (struct frame_info *fi);
-extern CORE_ADDR gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi);
-extern void set_gdbarch_frame_args_address (struct gdbarch *gdbarch, gdbarch_frame_args_address_ftype *frame_args_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_ADDRESS)
-#error "Non multi-arch definition of FRAME_ARGS_ADDRESS"
+extern int gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
+#error "Non multi-arch definition of DEPRECATED_FRAME_LOCALS_ADDRESS"
#endif
-#if !defined (FRAME_ARGS_ADDRESS)
-#define FRAME_ARGS_ADDRESS(fi) (gdbarch_frame_args_address (current_gdbarch, fi))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
+#define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (gdbarch_deprecated_frame_locals_address_p (current_gdbarch))
#endif
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (FRAME_LOCALS_ADDRESS)
-#define FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi))
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
+#define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi))
#endif
-typedef CORE_ADDR (gdbarch_frame_locals_address_ftype) (struct frame_info *fi);
-extern CORE_ADDR gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi);
-extern void set_gdbarch_frame_locals_address (struct gdbarch *gdbarch, gdbarch_frame_locals_address_ftype *frame_locals_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_LOCALS_ADDRESS)
-#error "Non multi-arch definition of FRAME_LOCALS_ADDRESS"
+typedef CORE_ADDR (gdbarch_deprecated_frame_locals_address_ftype) (struct frame_info *fi);
+extern CORE_ADDR gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi);
+extern void set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
+#error "Non multi-arch definition of DEPRECATED_FRAME_LOCALS_ADDRESS"
#endif
-#if !defined (FRAME_LOCALS_ADDRESS)
-#define FRAME_LOCALS_ADDRESS(fi) (gdbarch_frame_locals_address (current_gdbarch, fi))
+#if !defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
+#define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) (gdbarch_deprecated_frame_locals_address (current_gdbarch, fi))
#endif
#if defined (DEPRECATED_SAVED_PC_AFTER_CALL)
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index a5b2bf96ec1..494b916ffe4 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -631,8 +631,12 @@ F:2:DEPRECATED_FRAME_CHAIN_VALID:int:deprecated_frame_chain_valid:CORE_ADDR chai
F:2:DEPRECATED_FRAME_SAVED_PC:CORE_ADDR:deprecated_frame_saved_pc:struct frame_info *fi:fi::0:0
M::UNWIND_PC:CORE_ADDR:unwind_pc:struct frame_info *next_frame:next_frame:
M::UNWIND_SP:CORE_ADDR:unwind_sp:struct frame_info *next_frame:next_frame:
-f:2:FRAME_ARGS_ADDRESS:CORE_ADDR:frame_args_address:struct frame_info *fi:fi::0:get_frame_base::0
-f:2:FRAME_LOCALS_ADDRESS:CORE_ADDR:frame_locals_address:struct frame_info *fi:fi::0:get_frame_base::0
+# DEPRECATED_FRAME_ARGS_ADDRESS as been replaced by the per-frame
+# frame-base. Enable frame-base before frame-unwind.
+F::DEPRECATED_FRAME_ARGS_ADDRESS:CORE_ADDR:deprecated_frame_args_address:struct frame_info *fi:fi::get_frame_base:get_frame_base
+# DEPRECATED_FRAME_LOCALS_ADDRESS as been replaced by the per-frame
+# frame-base. Enable frame-base before frame-unwind.
+F::DEPRECATED_FRAME_LOCALS_ADDRESS:CORE_ADDR:deprecated_frame_locals_address:struct frame_info *fi:fi::get_frame_base:get_frame_base
F::DEPRECATED_SAVED_PC_AFTER_CALL:CORE_ADDR:deprecated_saved_pc_after_call:struct frame_info *frame:frame
F:2:FRAME_NUM_ARGS:int:frame_num_args:struct frame_info *frame:frame
#
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index 63ebbeb38d6..0bc4dea0182 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -2296,8 +2296,8 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_call_dummy_words (gdbarch, ia64_call_dummy_words);
set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (ia64_call_dummy_words));
set_gdbarch_deprecated_init_extra_frame_info (gdbarch, ia64_init_extra_frame_info);
- set_gdbarch_frame_args_address (gdbarch, ia64_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, ia64_frame_locals_address);
+ set_gdbarch_deprecated_frame_args_address (gdbarch, ia64_frame_args_address);
+ set_gdbarch_deprecated_frame_locals_address (gdbarch, ia64_frame_locals_address);
/* We won't necessarily have a frame pointer and even if we do, it
winds up being extraordinarly messy when attempting to find the
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 53a66b33988..f0f4ea59666 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -1389,7 +1389,7 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
set_gdbarch_deprecated_frame_chain (gdbarch, m68hc11_frame_chain);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, m68hc11_frame_saved_pc);
- set_gdbarch_frame_args_address (gdbarch, m68hc11_frame_args_address);
+ set_gdbarch_deprecated_frame_args_address (gdbarch, m68hc11_frame_args_address);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, m68hc11_saved_pc_after_call);
set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index 4b860e52d2b..3c4e7e7d97c 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -1101,8 +1101,8 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
mcore_extract_struct_value_address);
set_gdbarch_skip_prologue (gdbarch, mcore_skip_prologue);
set_gdbarch_frame_args_skip (gdbarch, 0);
- set_gdbarch_frame_args_address (gdbarch, mcore_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, mcore_frame_locals_address);
+ set_gdbarch_deprecated_frame_args_address (gdbarch, mcore_frame_args_address);
+ set_gdbarch_deprecated_frame_locals_address (gdbarch, mcore_frame_locals_address);
set_gdbarch_deprecated_pop_frame (gdbarch, mcore_pop_frame);
set_gdbarch_virtual_frame_pointer (gdbarch, mcore_virtual_frame_pointer);
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index a52f39f0833..7bad91dc3b0 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -327,7 +327,7 @@ ns32k_sigtramp_saved_pc (struct frame_info *frame)
/* Get sigcontext address, it is the third parameter on the stack. */
if (get_next_frame (frame))
sigcontext_addr = read_memory_typed_address
- (FRAME_ARGS_ADDRESS (get_next_frame (frame)) + FRAME_ARGS_SKIP + sigcontext_offs,
+ (DEPRECATED_FRAME_ARGS_ADDRESS (get_next_frame (frame)) + FRAME_ARGS_SKIP + sigcontext_offs,
builtin_type_void_data_ptr);
else
sigcontext_addr = read_memory_typed_address
@@ -569,7 +569,7 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_frame_chain (gdbarch, ns32k_frame_chain);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, ns32k_frame_saved_pc);
- set_gdbarch_frame_args_address (gdbarch, ns32k_frame_args_address);
+ set_gdbarch_deprecated_frame_args_address (gdbarch, ns32k_frame_args_address);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, ns32k_frame_init_saved_regs);
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index d384d42a820..9f3e9ea66b3 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -2999,8 +2999,8 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_convert_from_func_ptr_addr (gdbarch,
rs6000_convert_from_func_ptr_addr);
}
- set_gdbarch_frame_args_address (gdbarch, rs6000_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, rs6000_frame_args_address);
+ set_gdbarch_deprecated_frame_args_address (gdbarch, rs6000_frame_args_address);
+ set_gdbarch_deprecated_frame_locals_address (gdbarch, rs6000_frame_args_address);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, rs6000_saved_pc_after_call);
/* Helpers for function argument information. */
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 771675a7dc0..642b96014e2 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -394,8 +394,9 @@ enum address_class
/* Value is in register number SYMBOL_VALUE. Just like LOC_REGISTER
except this is an argument. Probably the cleaner way to handle
this would be to separate address_class (which would include
- separate ARG and LOCAL to deal with FRAME_ARGS_ADDRESS versus
- FRAME_LOCALS_ADDRESS), and an is_argument flag.
+ separate ARG and LOCAL to deal with the frame's arguments
+ (get_frame_args_address) versus the frame's locals
+ (get_frame_locals_address), and an is_argument flag.
For some symbol formats (stabs, for some compilers at least),
the compiler generates two symbols, an argument and a register.
@@ -439,9 +440,9 @@ enum address_class
/* Value is arg at SYMBOL_VALUE offset in stack frame. Differs from
LOC_LOCAL in that symbol is an argument; differs from LOC_ARG in
- that we find it in the frame (FRAME_LOCALS_ADDRESS), not in the
- arglist (FRAME_ARGS_ADDRESS). Added for i960, which passes args
- in regs then copies to frame. */
+ that we find it in the frame (get_frame_locals_address), not in
+ the arglist (get_frame_args_address). Added for i960, which
+ passes args in regs then copies to frame. */
LOC_LOCAL_ARG,
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 1b6f8cab9c3..c2a3fbb5033 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -38,8 +38,6 @@ static gdbarch_register_name_ftype vax_register_name;
static gdbarch_skip_prologue_ftype vax_skip_prologue;
static gdbarch_frame_num_args_ftype vax_frame_num_args;
static gdbarch_deprecated_frame_chain_ftype vax_frame_chain;
-static gdbarch_frame_args_address_ftype vax_frame_args_address;
-static gdbarch_frame_locals_address_ftype vax_frame_locals_address;
static gdbarch_deprecated_extract_return_value_ftype vax_extract_return_value;
static gdbarch_deprecated_extract_struct_value_address_ftype
@@ -136,7 +134,7 @@ vax_sigtramp_saved_pc (struct frame_info *frame)
/* Get sigcontext address, it is the third parameter on the stack. */
if (get_next_frame (frame))
sigcontext_addr = read_memory_typed_address
- (FRAME_ARGS_ADDRESS (get_next_frame (frame))
+ (DEPRECATED_FRAME_ARGS_ADDRESS (get_next_frame (frame))
+ FRAME_ARGS_SKIP + sigcontext_offs,
builtin_type_void_data_ptr);
else
@@ -181,7 +179,7 @@ vax_frame_args_address (struct frame_info *frame)
static int
vax_frame_num_args (struct frame_info *fi)
{
- return (0xff & read_memory_integer (FRAME_ARGS_ADDRESS (fi), 1));
+ return (0xff & read_memory_integer (DEPRECATED_FRAME_ARGS_ADDRESS (fi), 1));
}
static CORE_ADDR
@@ -380,7 +378,7 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_frame_chain (gdbarch, vax_frame_chain);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, vax_frame_saved_pc);
- set_gdbarch_frame_args_address (gdbarch, vax_frame_args_address);
+ set_gdbarch_deprecated_frame_args_address (gdbarch, vax_frame_args_address);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, vax_frame_init_saved_regs);