aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-12-09 02:04:17 +0000
committerAndrew Cagney <cagney@redhat.com>2002-12-09 02:04:17 +0000
commit97f46953947f21e2b8f1cac99546b7d6b51a84cc (patch)
tree9409aa3739d8d7a303f9af4fa77ed6b7e22648cc /gdb/gdbarch.c
parent8b36eed86d2784688816eb8bf25bf50b188e2c23 (diff)
downloadgdb-97f46953947f21e2b8f1cac99546b7d6b51a84cc.zip
gdb-97f46953947f21e2b8f1cac99546b7d6b51a84cc.tar.gz
gdb-97f46953947f21e2b8f1cac99546b7d6b51a84cc.tar.bz2
2002-12-08 Andrew Cagney <ac131313@redhat.com>
* gdbarch.sh (INIT_FRAME_PC_FIRST, INIT_FRAME_PC_DEFAULT): Convert to pure functions. * gdbarch.h, gdbarch.c: Re-generate. * frame.c (get_prev_frame): Explictly assign prev's pc with value returned by INIT_FRAME_PC_FIRST and INIT_EXTRA_FRAME_INFO. * arch-utils.h (init_frame_pc_default, init_frame_pc_noop): Change declaration to a function returning a CORE_ADDR. * x86-64-tdep.h (x86_64_init_frame_pc): Ditto. * arch-utils.c (init_frame_pc_noop): Return the PC value. (init_frame_pc_default): Ditto. * x86-64-linux-tdep.c (x86_64_init_frame_pc): Ditto. * s390-tdep.c (s390_init_frame_pc_first): Ditto. * mips-tdep.c (mips_init_frame_pc_first): Ditto. * dwarf2cfi.h (cfi_init_frame_pc): Ditto. * dwarf2cfi.c (cfi_init_frame_pc): Ditto. * alpha-tdep.c (alpha_init_frame_pc_first): Ditto. * i386-interix-tdep.c (i386_interix_init_abi): Set init_frame_pc to init_frame_pc_noop. (i386_interix_init_frame_pc): Delete function. * z8k-tdep.c (init_frame_pc): Delete function. * config/z8k/tm-z8k.h (INIT_FRAME_PC): Define as init_frame_pc_noop. (INIT_FRAME_PC_FIRST): Ditto. * config/mn10200/tm-mn10200.h (INIT_FRAME_PC): Ditto. (INIT_FRAME_PC_FIRST): Ditto. * config/sparc/tm-sparc.h (INIT_FRAME_PC): Ditto. * config/rs6000/tm-rs6000.h (INIT_FRAME_PC): Redefine as init_frame_pc_noop. (INIT_FRAME_PC_FIRST): Convert to an expression. * config/sparc/tm-sparc.h (INIT_FRAME_PC_FIRST): Ditto.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 9523abc..9126a03 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -1202,13 +1202,10 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
DEPRECATED_INIT_FRAME_PC_FIRST_P ());
#endif
#ifdef DEPRECATED_INIT_FRAME_PC_FIRST
-#if GDB_MULTI_ARCH
- /* Macro might contain `[{}]' when not multi-arch */
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf, prev)));
-#endif
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
"gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = 0x%08lx\n",
@@ -1581,13 +1578,10 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
/*INIT_EXTRA_FRAME_INFO ()*/);
#endif
#ifdef INIT_FRAME_PC
-#if GDB_MULTI_ARCH
- /* Macro might contain `[{}]' when not multi-arch */
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"INIT_FRAME_PC(fromleaf, prev)",
XSTRING (INIT_FRAME_PC (fromleaf, prev)));
-#endif
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
"gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
@@ -3791,7 +3785,7 @@ gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch)
return gdbarch->deprecated_init_frame_pc_first != 0;
}
-void
+CORE_ADDR
gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
{
gdb_assert (gdbarch != NULL);
@@ -3800,7 +3794,7 @@ gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, s
"gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc_first called\n");
- gdbarch->deprecated_init_frame_pc_first (fromleaf, prev);
+ return gdbarch->deprecated_init_frame_pc_first (fromleaf, prev);
}
void
@@ -3810,7 +3804,7 @@ set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch,
gdbarch->deprecated_init_frame_pc_first = deprecated_init_frame_pc_first;
}
-void
+CORE_ADDR
gdbarch_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
{
gdb_assert (gdbarch != NULL);
@@ -3819,7 +3813,7 @@ gdbarch_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info
"gdbarch: gdbarch_init_frame_pc invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc called\n");
- gdbarch->init_frame_pc (fromleaf, prev);
+ return gdbarch->init_frame_pc (fromleaf, prev);
}
void