summaryrefslogtreecommitdiff
path: root/gdb/frame-base.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
commit548c5b9a72226fe056c082ada66926eb395b6063 (patch)
tree515317934b6f9c0c5838ffd773198da2a553639d /gdb/frame-base.c
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.
Diffstat (limited to 'gdb/frame-base.c')
-rw-r--r--gdb/frame-base.c24
1 files changed, 17 insertions, 7 deletions
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 = {