aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
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
commit42efa47a82619e10851af335d38a8b8d75f12aab (patch)
tree1512f9dc8755b7ec54c6c1d62f89ec7e738f7670 /gdb/gdbarch.c
parent8ffd9b1b7af892a9ac5ea57160d602be1dea57d2 (diff)
downloadgdb-42efa47a82619e10851af335d38a8b8d75f12aab.zip
gdb-42efa47a82619e10851af335d38a8b8d75f12aab.tar.gz
gdb-42efa47a82619e10851af335d38a8b8d75f12aab.tar.bz2
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.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c126
1 files changed, 80 insertions, 46 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 7918b0c..87585dd 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