diff options
Diffstat (limited to 'gdb/frame-base.c')
-rw-r--r-- | gdb/frame-base.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/gdb/frame-base.c b/gdb/frame-base.c index f7ba4be..0865a0c 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,25 +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); - /* FRAME_ARGS_ADDRESS_CORRECT is just like FRAME_ARGS_ADDRESS except - that if it is unsure about the answer, it returns 0 instead of - guessing (this happens on the VAX and i960, for example). - - On most machines, we never have to guess about the args address, - so FRAME_ARGS_ADDRESS{,_CORRECT} are the same. */ -#ifdef FRAME_ARGS_ADDRESS_CORRECT - return FRAME_ARGS_ADDRESS_CORRECT (this_frame); -#else - return FRAME_ARGS_ADDRESS (this_frame); -#endif + 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 = { @@ -146,6 +146,8 @@ frame_base_find_by_pc (struct gdbarch *gdbarch, CORE_ADDR pc) return table->default_base; } +extern initialize_file_ftype _initialize_frame_base; /* -Wmissing-prototypes */ + void _initialize_frame_base (void) { |