aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-01-05 01:39:56 +0000
committerDaniel Jacobowitz <drow@false.org>2003-01-05 01:39:56 +0000
commit516034834f1bcade05e3dcd85e9c7c8b899adbd6 (patch)
tree7dfa0fc3ff5a3e7da16a50ff725fac9a561d7ec8 /gdb
parent * gdb.texinfo (Backtraces): Document "set backtrace-below-main". (diff)
downloadbinutils-gdb-516034834f1bcade05e3dcd85e9c7c8b899adbd6.tar.gz
binutils-gdb-516034834f1bcade05e3dcd85e9c7c8b899adbd6.tar.bz2
binutils-gdb-516034834f1bcade05e3dcd85e9c7c8b899adbd6.zip
* arm-tdep.c (arm_frame_chain_valid): Remove unnecessary test.
* d10v-tdep.c (d10v_frame_chain_valid): Remove unnecessary tests. * hppa-tdep.c (hppa_frame_chain_valid): Remove unnecessary test. * blockframe.c: Include "gdbcmd.h" and "command.h". (backtrace_below_main): New variable. (file_frame_chain_valid, func_frame_chain_valid) (nonnull_frame_chain_valid, generic_file_frame_chain_valid) (generic_func_frame_chain_valid): Remove functions. (frame_chain_valid, do_flush_frames_sfunc): New functions. (_initialize_blockframe): New function. * Makefile.in (blockframe.o): Update dependencies. * frame.c (frame_saved_regs_id_unwind, get_prev_frame): Remove FIXME comment. Call frame_chain_valid (). * frame.h: Remove old prototypes. Add prototype for frame_chain_valid and update comments to match. * gdbarch.sh: Change FRAME_CHAIN_VALID into a predicated function. Remove old comment. * gdbarch.h: Regenerated. * gdbarch.c: Regenerated. Plus updates to all other targets not to provide a FRAME_CHAIN_VALID.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog57
-rw-r--r--gdb/Makefile.in2
-rw-r--r--gdb/alpha-tdep.c1
-rw-r--r--gdb/arm-tdep.c2
-rw-r--r--gdb/avr-tdep.c3
-rw-r--r--gdb/blockframe.c133
-rw-r--r--gdb/config/m32r/tm-m32r.h2
-rw-r--r--gdb/config/m68k/tm-apollo68b.h4
-rw-r--r--gdb/config/m68k/tm-m68kv4.h6
-rw-r--r--gdb/config/m68k/tm-monitor.h7
-rw-r--r--gdb/config/m68k/tm-os68k.h10
-rw-r--r--gdb/config/m68k/tm-vx68.h11
-rw-r--r--gdb/config/mn10200/tm-mn10200.h3
-rw-r--r--gdb/config/sparc/tm-sparclite.h5
-rw-r--r--gdb/cris-tdep.c3
-rw-r--r--gdb/d10v-tdep.c11
-rw-r--r--gdb/frame.c22
-rw-r--r--gdb/frame.h17
-rw-r--r--gdb/frv-tdep.c1
-rw-r--r--gdb/gdbarch.c19
-rw-r--r--gdb/gdbarch.h28
-rwxr-xr-xgdb/gdbarch.sh9
-rw-r--r--gdb/h8300-tdep.c1
-rw-r--r--gdb/hppa-tdep.c3
-rw-r--r--gdb/i386-tdep.c7
-rw-r--r--gdb/ia64-tdep.c3
-rw-r--r--gdb/m68hc11-tdep.c4
-rw-r--r--gdb/m68k-tdep.c4
-rw-r--r--gdb/mcore-tdep.c3
-rw-r--r--gdb/mips-tdep.c1
-rw-r--r--gdb/mn10300-tdep.c4
-rw-r--r--gdb/ns32k-tdep.c1
-rw-r--r--gdb/ppcnbsd-tdep.c3
-rw-r--r--gdb/rs6000-tdep.c2
-rw-r--r--gdb/s390-tdep.c1
-rw-r--r--gdb/sh-tdep.c1
-rw-r--r--gdb/sparc-tdep.c8
-rw-r--r--gdb/v850-tdep.c1
-rw-r--r--gdb/vax-tdep.c1
-rw-r--r--gdb/x86-64-tdep.c5
40 files changed, 203 insertions, 206 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 63fbb552e7a..774ac880ead 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,60 @@
+2003-01-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * arm-tdep.c (arm_frame_chain_valid): Remove unnecessary test.
+ * d10v-tdep.c (d10v_frame_chain_valid): Remove unnecessary tests.
+ * hppa-tdep.c (hppa_frame_chain_valid): Remove unnecessary test.
+
+ * blockframe.c: Include "gdbcmd.h" and "command.h".
+ (backtrace_below_main): New variable.
+ (file_frame_chain_valid, func_frame_chain_valid)
+ (nonnull_frame_chain_valid, generic_file_frame_chain_valid)
+ (generic_func_frame_chain_valid): Remove functions.
+ (frame_chain_valid, do_flush_frames_sfunc): New functions.
+ (_initialize_blockframe): New function.
+ * Makefile.in (blockframe.o): Update dependencies.
+ * frame.c (frame_saved_regs_id_unwind, get_prev_frame): Remove FIXME
+ comment. Call frame_chain_valid ().
+ * frame.h: Remove old prototypes. Add prototype for
+ frame_chain_valid and update comments to match.
+ * gdbarch.sh: Change FRAME_CHAIN_VALID into a predicated function.
+ Remove old comment.
+ * gdbarch.h: Regenerated.
+ * gdbarch.c: Regenerated.
+
+ * alpha-tdep.c (alpha_gdbarch_init): Don't call
+ set_gdbarch_frame_chain_valid.
+ * avr-tdep.c (avr_gdbarch_init): Likewise.
+ * cris-tdep.c (cris_gdbarch_init): Likewise.
+ * frv-tdep.c (frv_gdbarch_init): Likewise.
+ * h8300-tdep.c (h8300_gdbarch_init): Likewise.
+ * i386-tdep.c (i386_svr4_init_abi): Likewise.
+ (i386_nw_init_abi): Likewise.
+ (i386_gdbarch_init): Likewise.
+ * ia64-tdep.c (ia64_gdbarch_init): Likewise.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
+ * m68k-tdep.c (m68k_gdbarch_init): Likewise.
+ * mcore-tdep.c (mcore_gdbarch_init): Likewise.
+ * mips-tdep.c (mips_gdbarch_init): Likewise.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Likewise.
+ * ppcnbsd-tdep.c (ppcnbsd_init_abi): Likewise.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
+ * s390-tdep.c (s390_gdbarch_init): Likewise.
+ * sh-tdep.c (sh_gdbarch_init): Likewise.
+ * sparc-tdep.c (sparc_gdbarch_init): Likewise.
+ * v850-tdep.c (v850_gdbarch_init): Likewise.
+ * vax-tdep.c (vax_gdbarch_init): Likewise.
+ * x86-64-tdep.c (x86_64_init_abi): Likewise.
+
+ * config/m32r/tm-m32r.h (FRAME_CHAIN_VALID): Don't define.
+ * config/m68k/tm-apollo68b.h (FRAME_CHAIN_VALID): Likewise.
+ * config/m68k/tm-m68kv4.h (FRAME_CHAIN_VALID): Likewise.
+ * config/m68k/tm-monitor.h (FRAME_CHAIN_VALID): Likewise.
+ * config/m68k/tm-os68k.h (FRAME_CHAIN_VALID): Likewise.
+ * config/m68k/tm-vx68.h (FRAME_CHAIN_VALID): Likewise.
+ * config/mn10200/tm-mn10200.h (FRAME_CHAIN_VALID): Likewise.
+ * config/sparc/tm-sparclite.h (FRAME_CHAIN_VALID): Likewise.
+
2002-01-04 Daniel Jacobowitz <drow@mvista.com>
* Makefile.in (acconfig_h): Remove incorrect macro.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index cf4b808251c..8bccf6e436e 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1537,7 +1537,7 @@ bcache.o: bcache.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(gdb_string_h)
blockframe.o: blockframe.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \
$(objfiles_h) $(frame_h) $(gdbcore_h) $(value_h) $(target_h) \
$(inferior_h) $(annotate_h) $(regcache_h) $(gdb_assert_h) \
- $(dummy_frame_h)
+ $(dummy_frame_h) $(command_h) $(gdbcmd_h)
breakpoint.o: breakpoint.c $(defs_h) $(symtab_h) $(frame_h) $(breakpoint_h) \
$(gdbtypes_h) $(expression_h) $(gdbcore_h) $(gdbcmd_h) $(value_h) \
$(command_h) $(inferior_h) $(gdbthread_h) $(target_h) $(language_h) \
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 86cb6255787..8894783a442 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -1842,7 +1842,6 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_saved_pc_after_call (gdbarch, alpha_saved_pc_after_call);
set_gdbarch_frame_chain (gdbarch, alpha_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, alpha_frame_saved_pc);
set_gdbarch_frame_init_saved_regs (gdbarch, alpha_frame_init_saved_regs);
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 4c3f7fbe93f..e988db41fc5 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -159,7 +159,7 @@ struct frame_extra_info
static int
arm_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
{
- return (chain != 0 && (FRAME_SAVED_PC (thisframe) >= LOWEST_PC));
+ return (FRAME_SAVED_PC (thisframe) >= LOWEST_PC);
}
/* Set to true if the 32-bit mode is in use. */
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index d1b14165db0..64f8822bc6a 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for Atmel AVR, for GDB.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -1262,7 +1262,6 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue); /* ??? */
set_gdbarch_frame_chain (gdbarch, avr_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, avr_frame_saved_pc);
set_gdbarch_frame_args_address (gdbarch, avr_frame_address);
set_gdbarch_frame_locals_address (gdbarch, avr_frame_address);
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 665b1bade58..35fc79860b4 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -2,7 +2,7 @@
functions and pc values.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
Foundation, Inc.
This file is part of GDB.
@@ -36,41 +36,16 @@
#include "regcache.h"
#include "gdb_assert.h"
#include "dummy-frame.h"
+#include "command.h"
+#include "gdbcmd.h"
-/* Prototypes for exported functions. */
-
-void _initialize_blockframe (void);
+/* Flag to indicate whether backtraces should stop at main. */
-/* A default FRAME_CHAIN_VALID, in the form that is suitable for most
- targets. If FRAME_CHAIN_VALID returns zero it means that the given
- frame is the outermost one and has no caller. */
-
-int
-file_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
-{
- return ((chain) != 0
- && !inside_entry_file (frame_pc_unwind (thisframe)));
-}
-
-/* Use the alternate method of avoiding running up off the end of the
- frame chain or following frames back into the startup code. See
- the comments in objfiles.h. */
-
-int
-func_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
-{
- return ((chain) != 0
- && !inside_main_func (get_frame_pc (thisframe))
- && !inside_entry_func (get_frame_pc (thisframe)));
-}
+static int backtrace_below_main;
-/* A very simple method of determining a valid frame */
+/* Prototypes for exported functions. */
-int
-nonnull_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
-{
- return ((chain) != 0);
-}
+void _initialize_blockframe (void);
/* Is ADDR inside the startup file? Note that if your machine
has a way to detect the bottom of the stack, there is no need
@@ -689,34 +664,86 @@ deprecated_pc_in_call_dummy_at_entry_point (CORE_ADDR pc, CORE_ADDR sp,
&& (pc) <= (CALL_DUMMY_ADDRESS () + DECR_PC_AFTER_BREAK));
}
-
/* Function: frame_chain_valid
Returns true for a user frame or a call_function_by_hand dummy frame,
- and false for the CRT0 start-up frame. Purpose is to terminate backtrace */
+ and false for the CRT0 start-up frame. Purpose is to terminate backtrace. */
int
-generic_file_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
+frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame_pc_unwind (fi), fp, fp))
- return 1; /* don't prune CALL_DUMMY frames */
- else /* fall back to default algorithm (see frame.h) */
- return (fp != 0
- && (INNER_THAN (get_frame_base (fi), fp)
- || get_frame_base (fi) == fp)
- && !inside_entry_file (frame_pc_unwind (fi)));
+ /* Don't prune CALL_DUMMY frames. */
+ if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
+ && DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0))
+ return 1;
+
+ /* If the new frame pointer is zero, then it isn't valid. */
+ if (fp == 0)
+ return 0;
+
+ /* If the new frame would be inside (younger than) the previous frame,
+ then it isn't valid. */
+ if (INNER_THAN (fp, get_frame_base (fi)))
+ return 0;
+
+ /* If we're already inside the entry function for the main objfile, then it
+ isn't valid. */
+ if (inside_entry_func (get_frame_pc (fi)))
+ return 0;
+
+ /* If we're inside the entry file, it isn't valid. */
+ /* NOTE/drow 2002-12-25: should there be a way to disable this check? It
+ assumes a single small entry file, and the way some debug readers (e.g.
+ dbxread) figure out which object is the entry file is somewhat hokey. */
+ if (inside_entry_file (frame_pc_unwind (fi)))
+ return 0;
+
+ /* If we want backtraces to stop at main, and we're inside main, then it
+ isn't valid. */
+ if (!backtrace_below_main && inside_main_func (get_frame_pc (fi)))
+ return 0;
+
+ /* If the architecture has a custom FRAME_CHAIN_VALID, call it now. */
+ if (FRAME_CHAIN_VALID_P ())
+ return FRAME_CHAIN_VALID (fp, fi);
+
+ return 1;
}
-int
-generic_func_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
+void
+do_flush_frames_sfunc (char *args, int from_tty, struct cmd_list_element *c)
{
- if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
- && DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0))
- return 1; /* don't prune CALL_DUMMY frames */
- else /* fall back to default algorithm (see frame.h) */
- return (fp != 0
- && (INNER_THAN (get_frame_base (fi), fp)
- || get_frame_base (fi) == fp)
- && !inside_main_func (get_frame_pc (fi))
- && !inside_entry_func (get_frame_pc (fi)));
+ int saved_level;
+ struct frame_info *cur_frame;
+
+ if (! target_has_stack)
+ return;
+
+ saved_level = frame_relative_level (get_selected_frame ());
+
+ flush_cached_frames ();
+
+ cur_frame = find_relative_frame (get_current_frame (), &saved_level);
+ select_frame (cur_frame);
+
+ /* If we were below main and backtrace-below-main was turned off,
+ SAVED_LEVEL will be non-zero. CUR_FRAME will point to main.
+ Accept this but print the new frame. */
+ if (saved_level != 0)
+ print_stack_frame (get_selected_frame (), -1, 0);
}
+void
+_initialize_blockframe (void)
+{
+ add_setshow_boolean_cmd ("backtrace-below-main", class_obscure,
+ &backtrace_below_main,
+ "Set whether backtraces should continue past \"main\".\n"
+ "Normally the caller of \"main\" is not of interest, so GDB will terminate\n"
+ "the backtrace at \"main\". Set this variable if you need to see the rest\n"
+ "of the stack trace.",
+ "Show whether backtraces should continue past \"main\".\n"
+ "Normally the caller of \"main\" is not of interest, so GDB will terminate\n"
+ "the backtrace at \"main\". Set this variable if you need to see the rest\n"
+ "of the stack trace.",
+ do_flush_frames_sfunc, NULL, &setlist, &showlist);
+}
diff --git a/gdb/config/m32r/tm-m32r.h b/gdb/config/m32r/tm-m32r.h
index 8dc86e4d680..aa9249996ab 100644
--- a/gdb/config/m32r/tm-m32r.h
+++ b/gdb/config/m32r/tm-m32r.h
@@ -131,8 +131,6 @@ extern CORE_ADDR m32r_frame_chain (struct frame_info *fi);
/* mvs_check FRAME_CHAIN */
#define FRAME_CHAIN(fi) m32r_frame_chain (fi)
-#define FRAME_CHAIN_VALID(fp, frame) generic_file_frame_chain_valid (fp, frame)
-
extern CORE_ADDR m32r_find_callers_reg (struct frame_info *fi, int regnum);
extern CORE_ADDR m32r_frame_saved_pc (struct frame_info *);
/* mvs_check FRAME_SAVED_PC */
diff --git a/gdb/config/m68k/tm-apollo68b.h b/gdb/config/m68k/tm-apollo68b.h
index d43eec9d6cf..f0b7488f2e0 100644
--- a/gdb/config/m68k/tm-apollo68b.h
+++ b/gdb/config/m68k/tm-apollo68b.h
@@ -1,5 +1,5 @@
/* Parameters for execution on Apollo 68k running BSD.
- Copyright 1986, 1987, 1989, 1991, 1993, 1994, 1998
+ Copyright 1986, 1987, 1989, 1991, 1993, 1994, 1998, 2003
Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -26,8 +26,6 @@
#include "m68k/tm-m68k.h"
-#define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
-
/* These are the jmp_buf registers I could guess. There are 13 registers
* in the buffer. There are 8 data registers, 6 general address registers,
* the Frame Pointer, the Stack Pointer, the PC and the SR in the chip. I would
diff --git a/gdb/config/m68k/tm-m68kv4.h b/gdb/config/m68k/tm-m68kv4.h
index 275ab62dd98..11bb122dfa4 100644
--- a/gdb/config/m68k/tm-m68kv4.h
+++ b/gdb/config/m68k/tm-m68kv4.h
@@ -1,6 +1,6 @@
/* Target definitions for GDB on a Motorola 680x0 running SVR4.
(Commodore Amiga with amix or Atari TT with ASV)
- Copyright 1991, 1994, 1995, 1996, 1998, 1999, 2000
+ Copyright 1991, 1994, 1995, 1996, 1998, 1999, 2000, 2003
Free Software Foundation, Inc.
Written by Fred Fish at Cygnus Support (fnf@cygint)
@@ -30,10 +30,6 @@
#define DECR_PC_AFTER_BREAK 0 /* No decrement required */
-/* Use the alternate method of determining valid frame chains. */
-
-#define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
-
#include "config/tm-sysv4.h"
#include "m68k/tm-m68k.h"
diff --git a/gdb/config/m68k/tm-monitor.h b/gdb/config/m68k/tm-monitor.h
index 6d38b5513b1..1b00a8f05de 100644
--- a/gdb/config/m68k/tm-monitor.h
+++ b/gdb/config/m68k/tm-monitor.h
@@ -1,5 +1,5 @@
/* Target machine definitions for a generic m68k monitor/emulator.
- Copyright 1986, 1987, 1989, 1993, 1994, 1995, 1996, 1998, 1999
+ Copyright 1986, 1987, 1989, 1993, 1994, 1995, 1996, 1998, 1999, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -38,9 +38,4 @@
#include "m68k/tm-m68k.h"
-/* Need to do this for ELF targets, where we can't figure out the boundaries of
- the entry file. This method stops the backtrace when we reach main. */
-
-#define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
-
/* FIXME, should do GET_LONGJMP_TARGET for newlib. */
diff --git a/gdb/config/m68k/tm-os68k.h b/gdb/config/m68k/tm-os68k.h
index ed1d5c89902..295457090cf 100644
--- a/gdb/config/m68k/tm-os68k.h
+++ b/gdb/config/m68k/tm-os68k.h
@@ -1,5 +1,5 @@
/* Parameters for execution on VxWorks m68k's, for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1991, 1998 Free Software Foundation, Inc.
+ Copyright 1986, 1987, 1989, 1991, 1998, 2003 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of GDB.
@@ -37,11 +37,3 @@
#undef FRAME_CHAIN
#define FRAME_CHAIN(thisframe) ((thisframe)->frame? read_memory_integer ((thisframe)->frame, 4): 0)
-
-/* If the chain pointer is zero (either because the saved value fetched
- by FRAME_CHAIN was zero, or because the current FP was zero so FRAME_CHAIN
- never fetched anything), we are at the top of the stack. */
-/* We are guaranteed to have a zero frame pointer at bottom of stack, too. */
-
-#undef FRAME_CHAIN_VALID
-#define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
diff --git a/gdb/config/m68k/tm-vx68.h b/gdb/config/m68k/tm-vx68.h
index ea27ac45d02..76ac6fd7303 100644
--- a/gdb/config/m68k/tm-vx68.h
+++ b/gdb/config/m68k/tm-vx68.h
@@ -1,5 +1,6 @@
/* Target machine description for VxWorks m68k's, for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1996, 1998, 1999, 2000
+ Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1996, 1998, 1999, 2000,
+ 2002, 2003
Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -41,14 +42,6 @@
#undef FRAME_CHAIN
#define FRAME_CHAIN(thisframe) ((thisframe)->frame? read_memory_integer ((thisframe)->frame, 4): 0)
-/* If the chain pointer is zero (either because the saved value fetched
- by FRAME_CHAIN was zero, or because the current FP was zero so FRAME_CHAIN
- never fetched anything), we are at the top of the stack. */
-/* We are guaranteed to have a zero frame pointer at bottom of stack, too. */
-
-#undef FRAME_CHAIN_VALID
-#define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
-
/* FIXME, Longjmp information stolen from Sun-3 config. Dunno if right. */
/* Offsets (in target ints) into jmp_buf. Not defined by Sun, but at least
documented in a comment in <machine/setjmp.h>! */
diff --git a/gdb/config/mn10200/tm-mn10200.h b/gdb/config/mn10200/tm-mn10200.h
index b2d03857c56..f25578ca582 100644
--- a/gdb/config/mn10200/tm-mn10200.h
+++ b/gdb/config/mn10200/tm-mn10200.h
@@ -1,6 +1,6 @@
/* Parameters for execution on a Matsushita mn10200 processor.
- Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
Foundation, Inc.
Contributed by Geoffrey Noer <noer@cygnus.com>
@@ -116,7 +116,6 @@ extern void mn10200_frame_find_saved_regs (struct frame_info *,
extern CORE_ADDR mn10200_frame_chain (struct frame_info *);
#define FRAME_CHAIN(fi) mn10200_frame_chain (fi)
-#define FRAME_CHAIN_VALID(FP, FI) generic_file_frame_chain_valid (FP, FI)
extern CORE_ADDR mn10200_find_callers_reg (struct frame_info *, int);
extern CORE_ADDR mn10200_frame_saved_pc (struct frame_info *);
diff --git a/gdb/config/sparc/tm-sparclite.h b/gdb/config/sparc/tm-sparclite.h
index 8fafe5e3b4f..fb8b6d56fee 100644
--- a/gdb/config/sparc/tm-sparclite.h
+++ b/gdb/config/sparc/tm-sparclite.h
@@ -1,5 +1,5 @@
/* Macro definitions for GDB for a Fujitsu SPARClite.
- Copyright 1993, 1994, 1995, 1998, 1999, 2000
+ Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -63,9 +63,6 @@ enum {
* The following defines must go away for MULTI_ARCH.
*/
-#undef FRAME_CHAIN_VALID
-#define FRAME_CHAIN_VALID(FP,FI) func_frame_chain_valid (FP, FI)
-
#undef NUM_REGS
#define NUM_REGS 80
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 53013558505..eb7256bcffe 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -1,5 +1,5 @@
/* Target dependent code for CRIS, for GDB, the GNU debugger.
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Axis Communications AB.
Written by Hendrik Ruijter, Stefan Andersson, and Orjan Friberg.
@@ -4312,7 +4312,6 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frameless_function_invocation
(gdbarch, cris_frameless_function_invocation);
set_gdbarch_frame_chain (gdbarch, cris_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, cris_frame_saved_pc);
set_gdbarch_saved_pc_after_call (gdbarch, cris_saved_pc_after_call);
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index 2012cead22d..46f312941d8 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -1,6 +1,6 @@
/* Target-dependent code for Mitsubishi D10V, for GDB.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
Foundation, Inc.
This file is part of GDB.
@@ -112,14 +112,7 @@ static void do_d10v_pop_frame (struct frame_info *fi);
static int
d10v_frame_chain_valid (CORE_ADDR chain, struct frame_info *frame)
{
- if (chain != 0 && frame != NULL)
- {
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame))
- return 1; /* Path back from a call dummy must be valid. */
- return (get_frame_pc (frame) > IMEM_START
- && !inside_main_func (get_frame_pc (frame)));
- }
- else return 0;
+ return (get_frame_pc (frame) > IMEM_START);
}
static CORE_ADDR
diff --git a/gdb/frame.c b/gdb/frame.c
index 97d61939a50..361651e8f62 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -1,7 +1,7 @@
/* Cache and manage frames for GDB, the GNU debugger.
Copyright 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1998, 2000,
- 2001, 2002 Free Software Foundation, Inc.
+ 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -693,15 +693,7 @@ frame_saved_regs_id_unwind (struct frame_info *next_frame, void **cache)
main. */
id.base = FRAME_CHAIN (next_frame);
- /* FIXME: cagney/2002-06-08: There should be two tests here.
- The first would check for a valid frame chain based on a user
- selectable policy. The default being ``stop at main'' (as
- implemented by generic_func_frame_chain_valid()). Other
- policies would be available - stop at NULL, .... The second
- test, if provided by the target architecture, would check for
- more exotic cases - most target architectures wouldn't bother
- with this second case. */
- if (!FRAME_CHAIN_VALID (id.base, next_frame))
+ if (!frame_chain_valid (id.base, next_frame))
return null_frame_id;
}
if (id.base == 0)
@@ -1019,15 +1011,7 @@ get_prev_frame (struct frame_info *next_frame)
main. */
address = FRAME_CHAIN (next_frame);
- /* FIXME: cagney/2002-06-08: There should be two tests here.
- The first would check for a valid frame chain based on a user
- selectable policy. The default being ``stop at main'' (as
- implemented by generic_func_frame_chain_valid()). Other
- policies would be available - stop at NULL, .... The second
- test, if provided by the target architecture, would check for
- more exotic cases - most target architectures wouldn't bother
- with this second case. */
- if (!FRAME_CHAIN_VALID (address, next_frame))
+ if (!frame_chain_valid (address, next_frame))
return 0;
}
if (address == 0)
diff --git a/gdb/frame.h b/gdb/frame.h
index 283a968bb5b..21ef137b568 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -1,7 +1,7 @@
/* Definitions for dealing with stack frames, for GDB, the GNU debugger.
Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996,
- 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -474,23 +474,14 @@ enum print_what
extern void *frame_obstack_alloc (unsigned long size);
-/* Define a default FRAME_CHAIN_VALID, in the form that is suitable for most
- targets. If FRAME_CHAIN_VALID returns zero it means that the given frame
- is the outermost one and has no caller.
+/* If FRAME_CHAIN_VALID returns zero it means that the given frame
+ is the outermost one and has no caller. */
- XXXX - both default and alternate frame_chain_valid functions are
- deprecated. New code should use dummy frames and one of the
- generic functions. */
+extern int frame_chain_valid (CORE_ADDR, struct frame_info *);
-extern int file_frame_chain_valid (CORE_ADDR, struct frame_info *);
-extern int func_frame_chain_valid (CORE_ADDR, struct frame_info *);
-extern int nonnull_frame_chain_valid (CORE_ADDR, struct frame_info *);
-extern int generic_file_frame_chain_valid (CORE_ADDR, struct frame_info *);
-extern int generic_func_frame_chain_valid (CORE_ADDR, struct frame_info *);
extern void generic_save_dummy_frame_tos (CORE_ADDR sp);
-
#ifdef FRAME_FIND_SAVED_REGS
/* XXX - deprecated */
#define FRAME_INIT_SAVED_REGS(FI) deprecated_get_frame_saved_regs (FI, NULL)
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index b4c6629dab5..073631282b4 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -1083,7 +1083,6 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_saved_pc_after_call (gdbarch, frv_saved_pc_after_call);
set_gdbarch_frame_chain (gdbarch, frv_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, frv_frame_saved_pc);
set_gdbarch_frame_init_saved_regs (gdbarch, frv_frame_init_saved_regs);
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 3a44b3389d1..e39ff5a116d 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -556,7 +556,6 @@ 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_chain_valid = generic_func_frame_chain_valid;
current_gdbarch->frame_args_address = get_frame_base;
current_gdbarch->frame_locals_address = get_frame_base;
current_gdbarch->extra_stack_alignment_needed = 1;
@@ -769,7 +768,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
&& (gdbarch->frame_chain == 0))
fprintf_unfiltered (log, "\n\tframe_chain");
- /* Skip verify of frame_chain_valid, invalid_p == 0 */
+ /* Skip verify of frame_chain_valid, has predicate */
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
&& (gdbarch->frame_saved_pc == 0))
fprintf_unfiltered (log, "\n\tframe_saved_pc");
@@ -1445,6 +1444,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->frame_chain
/*FRAME_CHAIN ()*/);
#endif
+#ifdef FRAME_CHAIN_VALID_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "FRAME_CHAIN_VALID_P()",
+ XSTRING (FRAME_CHAIN_VALID_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: FRAME_CHAIN_VALID_P() = %d\n",
+ FRAME_CHAIN_VALID_P ());
+#endif
#ifdef FRAME_CHAIN_VALID
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -4641,6 +4649,13 @@ set_gdbarch_frame_chain (struct gdbarch *gdbarch,
}
int
+gdbarch_frame_chain_valid_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->frame_chain_valid != 0;
+}
+
+int
gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
{
gdb_assert (gdbarch != NULL);
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index edb8adedcac..d973fa30eeb 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -1987,17 +1987,29 @@ extern void set_gdbarch_frame_chain (struct gdbarch *gdbarch, gdbarch_frame_chai
#endif
#endif
-/* Define a default FRAME_CHAIN_VALID, in the form that is suitable for
- most targets. If FRAME_CHAIN_VALID returns zero it means that the
- given frame is the outermost one and has no caller.
-
- XXXX - both default and alternate frame_chain_valid functions are
- deprecated. New code should use dummy frames and one of the generic
- functions. */
+#if defined (FRAME_CHAIN_VALID)
+/* Legacy for systems yet to multi-arch FRAME_CHAIN_VALID */
+#if !defined (FRAME_CHAIN_VALID_P)
+#define FRAME_CHAIN_VALID_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_VALID_P)
+#define FRAME_CHAIN_VALID_P() (0)
+#endif
+
+extern int gdbarch_frame_chain_valid_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_CHAIN_VALID_P)
+#error "Non multi-arch definition of FRAME_CHAIN_VALID"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_CHAIN_VALID_P)
+#define FRAME_CHAIN_VALID_P() (gdbarch_frame_chain_valid_p (current_gdbarch))
+#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_VALID)
-#define FRAME_CHAIN_VALID(chain, thisframe) (generic_func_frame_chain_valid (chain, thisframe))
+#define FRAME_CHAIN_VALID(chain, thisframe) (internal_error (__FILE__, __LINE__, "FRAME_CHAIN_VALID"), 0)
#endif
typedef int (gdbarch_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe);
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 73f62c596a5..5848ca81334 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -569,14 +569,7 @@ f:2:REMOTE_TRANSLATE_XFER_ADDRESS:void:remote_translate_xfer_address:CORE_ADDR g
v:2:FRAME_ARGS_SKIP:CORE_ADDR:frame_args_skip::::0:-1
f:2:FRAMELESS_FUNCTION_INVOCATION:int:frameless_function_invocation:struct frame_info *fi:fi:::generic_frameless_function_invocation_not::0
f:2:FRAME_CHAIN:CORE_ADDR:frame_chain:struct frame_info *frame:frame::0:0
-# Define a default FRAME_CHAIN_VALID, in the form that is suitable for
-# most targets. If FRAME_CHAIN_VALID returns zero it means that the
-# given frame is the outermost one and has no caller.
-#
-# XXXX - both default and alternate frame_chain_valid functions are
-# deprecated. New code should use dummy frames and one of the generic
-# functions.
-f:2:FRAME_CHAIN_VALID:int:frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe:::generic_func_frame_chain_valid::0
+F:2:FRAME_CHAIN_VALID:int:frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe::0:0
f:2:FRAME_SAVED_PC:CORE_ADDR:frame_saved_pc:struct frame_info *fi:fi::0:0
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
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index 66ecd33fe69..8ebf60458d5 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -1114,7 +1114,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_saved_pc_after_call (gdbarch, h8300_saved_pc_after_call);
set_gdbarch_frame_saved_pc (gdbarch, h8300_frame_saved_pc);
set_gdbarch_skip_prologue (gdbarch, h8300_skip_prologue);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_frame_args_address (gdbarch, h8300_frame_args_address);
set_gdbarch_frame_locals_address (gdbarch, h8300_frame_locals_address);
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 0d57c0eccbb..6364dbc7447 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -1381,9 +1381,6 @@ hppa_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
struct unwind_table_entry *u, *next_u = NULL;
struct frame_info *next;
- if (!chain)
- return 0;
-
u = find_unwind_entry (thisframe->pc);
if (u == NULL)
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 9c1000ebeed..9b4cf0286b0 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -1408,9 +1408,6 @@ i386_svr4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
- /* FIXME: kettenis/20020511: Why do we override this function here? */
- set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
-
set_gdbarch_pc_in_sigtramp (gdbarch, i386_svr4_pc_in_sigtramp);
tdep->sigcontext_addr = i386_svr4_sigcontext_addr;
tdep->sc_pc_offset = 14 * 4;
@@ -1438,9 +1435,6 @@ i386_nw_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- /* FIXME: kettenis/20020511: Why do we override this function here? */
- set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
-
tdep->jb_pc_offset = 24;
}
@@ -1622,7 +1616,6 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frameless_function_invocation (gdbarch,
i386_frameless_function_invocation);
set_gdbarch_frame_chain (gdbarch, i386_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, i386_frame_saved_pc);
set_gdbarch_saved_pc_after_call (gdbarch, i386_saved_pc_after_call);
set_gdbarch_frame_num_args (gdbarch, i386_frame_num_args);
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index d8f7db0a3f4..c5f447ccfe0 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -1,6 +1,6 @@
/* Target-dependent code for the IA-64 for GDB, the GNU debugger.
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -2183,7 +2183,6 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_saved_pc_after_call (gdbarch, ia64_saved_pc_after_call);
set_gdbarch_frame_chain (gdbarch, ia64_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, ia64_frame_saved_pc);
set_gdbarch_frame_init_saved_regs (gdbarch, ia64_frame_init_saved_regs);
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index eda411c3b4a..323200dbcf1 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for Motorola 68HC11 & 68HC12
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Stephane Carrez, stcarrez@nerim.fr
This file is part of GDB.
@@ -1331,14 +1331,12 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
set_gdbarch_frame_chain (gdbarch, m68hc11_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, m68hc11_frame_saved_pc);
set_gdbarch_frame_args_address (gdbarch, m68hc11_frame_args_address);
set_gdbarch_frame_locals_address (gdbarch, m68hc11_frame_locals_address);
set_gdbarch_saved_pc_after_call (gdbarch, m68hc11_saved_pc_after_call);
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
set_gdbarch_store_struct_return (gdbarch, m68hc11_store_struct_return);
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 34cc0eb6386..bcaae9da68a 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -1,5 +1,6 @@
/* Target dependent code for the Motorola 68000 series.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001,
+ 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -1010,7 +1011,6 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_store_return_value (gdbarch, m68k_store_return_value);
set_gdbarch_frame_chain (gdbarch, m68k_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, m68k_frame_saved_pc);
set_gdbarch_frame_init_saved_regs (gdbarch, m68k_frame_init_saved_regs);
set_gdbarch_frameless_function_invocation (gdbarch,
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index 708cf4c0cba..43cb2480e6f 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -1,5 +1,5 @@
/* Target-machine dependent code for Motorola MCore for GDB, the GNU debugger
- Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -1131,7 +1131,6 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_init_extra_frame_info (gdbarch, mcore_init_extra_frame_info);
set_gdbarch_frame_chain (gdbarch, mcore_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
set_gdbarch_frame_init_saved_regs (gdbarch, mcore_frame_init_saved_regs);
set_gdbarch_frame_saved_pc (gdbarch, mcore_frame_saved_pc);
set_gdbarch_deprecated_store_return_value (gdbarch, mcore_store_return_value);
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 2f24ec0d875..3dac67250dc 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -5987,7 +5987,6 @@ mips_gdbarch_init (struct gdbarch_info info,
mips_register_convert_to_raw);
set_gdbarch_frame_chain (gdbarch, mips_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_frameless_function_invocation (gdbarch,
generic_frameless_function_invocation_not);
set_gdbarch_frame_saved_pc (gdbarch, mips_frame_saved_pc);
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index 582e965bb0f..a130e1c53fd 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -1,6 +1,6 @@
/* Target-dependent code for the Matsushita MN10300 for GDB, the GNU debugger.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
Foundation, Inc.
This file is part of GDB.
@@ -1162,9 +1162,7 @@ mn10300_gdbarch_init (struct gdbarch_info info,
set_gdbarch_decr_pc_after_break (gdbarch, 0);
/* Stack unwinding. */
- set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
set_gdbarch_saved_pc_after_call (gdbarch, mn10300_saved_pc_after_call);
set_gdbarch_init_extra_frame_info (gdbarch, mn10300_init_extra_frame_info);
set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_noop);
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index 4b3b93788ce..f9fe2949b8a 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -573,7 +573,6 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
generic_frameless_function_invocation_not);
set_gdbarch_frame_chain (gdbarch, ns32k_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, ns32k_frame_saved_pc);
set_gdbarch_frame_args_address (gdbarch, ns32k_frame_args_address);
diff --git a/gdb/ppcnbsd-tdep.c b/gdb/ppcnbsd-tdep.c
index ba863d07a79..21ab858768e 100644
--- a/gdb/ppcnbsd-tdep.c
+++ b/gdb/ppcnbsd-tdep.c
@@ -208,9 +208,6 @@ static void
ppcnbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
- /* Stop at main. */
- set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
-
set_gdbarch_pc_in_sigtramp (gdbarch, ppcnbsd_pc_in_sigtramp);
set_solib_svr4_fetch_link_map_offsets (gdbarch,
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index d0a3c036d55..a3a8d3d6fb1 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -2928,8 +2928,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_use_struct_convention (gdbarch,
generic_use_struct_convention);
- set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
-
set_gdbarch_frameless_function_invocation (gdbarch,
rs6000_frameless_function_invocation);
set_gdbarch_frame_chain (gdbarch, rs6000_frame_chain);
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 961ff4fc892..efae4d458e8 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1815,7 +1815,6 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_cannot_fetch_register (gdbarch, s390_cannot_fetch_register);
set_gdbarch_cannot_store_register (gdbarch, s390_cannot_fetch_register);
set_gdbarch_use_struct_convention (gdbarch, s390_use_struct_convention);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_register_name (gdbarch, s390_register_name);
set_gdbarch_stab_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum);
set_gdbarch_dwarf_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum);
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index e0088d151c3..10abefcc318 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -4565,7 +4565,6 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue);
- set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, sh_frame_saved_pc);
set_gdbarch_saved_pc_after_call (gdbarch, sh_saved_pc_after_call);
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 2c7c5ddc5a6..1ae9c92b6eb 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -3332,7 +3332,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
case bfd_mach_sparc:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
- set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 72);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparc32_register_name);
@@ -3343,7 +3342,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case bfd_mach_sparc_sparclet:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparclet_extract_return_value);
- set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 32 + 32 + 8 + 8 + 8);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparclet_register_name);
@@ -3354,7 +3352,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case bfd_mach_sparc_sparclite:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 80);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparclite_register_name);
@@ -3365,7 +3362,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case bfd_mach_sparc_v8plus:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
- set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 72);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparc32_register_name);
@@ -3376,7 +3372,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case bfd_mach_sparc_v8plusa:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
- set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 72);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparc32_register_name);
@@ -3387,7 +3382,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case bfd_mach_sparc_sparclite_le:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 80);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparclite_register_name);
@@ -3398,7 +3392,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case bfd_mach_sparc_v9:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc64_extract_return_value);
- set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 125);
set_gdbarch_register_bytes (gdbarch, 32*8 + 32*8 + 45*8);
set_gdbarch_register_name (gdbarch, sparc64_register_name);
@@ -3409,7 +3402,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case bfd_mach_sparc_v9a:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc64_extract_return_value);
- set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 125);
set_gdbarch_register_bytes (gdbarch, 32*8 + 32*8 + 45*8);
set_gdbarch_register_name (gdbarch, sparc64_register_name);
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 851ba079414..1a28b748534 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -1241,7 +1241,6 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_saved_pc_after_call (gdbarch, v850_saved_pc_after_call);
set_gdbarch_frame_saved_pc (gdbarch, v850_frame_saved_pc);
set_gdbarch_skip_prologue (gdbarch, v850_skip_prologue);
- set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
/*
* Miscelany
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 1d1b83a9498..b915b666288 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -650,7 +650,6 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
generic_frameless_function_invocation_not);
set_gdbarch_frame_chain (gdbarch, vax_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, vax_frame_saved_pc);
set_gdbarch_frame_args_address (gdbarch, vax_frame_args_address);
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index 97c3bd90556..2cf005eca1c 100644
--- a/gdb/x86-64-tdep.c
+++ b/gdb/x86-64-tdep.c
@@ -1,6 +1,6 @@
/* Target-dependent code for the x86-64 for GDB, the GNU debugger.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Jiri Smid, SuSE Labs.
This file is part of GDB.
@@ -1005,9 +1005,6 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_frame_chain (gdbarch, x86_64_linux_frame_chain);
set_gdbarch_frameless_function_invocation (gdbarch,
x86_64_frameless_function_invocation);
- /* FIXME: kettenis/20021025: Shouldn't this be set to
- generic_file_frame_chain_valid? */
- set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
/* FIXME: kettenis/20021026: These two are GNU/Linux-specific and
should be moved elsewhere. */
set_gdbarch_frame_saved_pc (gdbarch, x86_64_linux_frame_saved_pc);