2002-06-01 22:44:21 +02:00
|
|
|
/* Cache and manage frames for GDB, the GNU debugger.
|
2002-04-10 00:14:39 +02:00
|
|
|
|
2007-01-09 18:59:20 +01:00
|
|
|
Copyright (C) 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1998, 2000, 2001,
|
|
|
|
2002, 2003, 2004, 2007 Free Software Foundation, Inc.
|
2001-02-20 23:39:03 +01:00
|
|
|
|
|
|
|
This file is part of GDB.
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2007-08-23 20:08:50 +02:00
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
2001-02-20 23:39:03 +01:00
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2007-08-23 20:08:50 +02:00
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
2001-02-20 23:39:03 +01:00
|
|
|
|
|
|
|
#include "defs.h"
|
|
|
|
#include "frame.h"
|
|
|
|
#include "target.h"
|
|
|
|
#include "value.h"
|
2001-05-04 06:15:33 +02:00
|
|
|
#include "inferior.h" /* for inferior_ptid */
|
2001-03-01 02:39:22 +01:00
|
|
|
#include "regcache.h"
|
2002-06-01 22:44:21 +02:00
|
|
|
#include "gdb_assert.h"
|
2002-09-25 22:30:38 +02:00
|
|
|
#include "gdb_string.h"
|
2003-07-07 16:36:58 +02:00
|
|
|
#include "user-regs.h"
|
2002-11-08 21:48:55 +01:00
|
|
|
#include "gdb_obstack.h"
|
|
|
|
#include "dummy-frame.h"
|
2003-01-27 22:41:41 +01:00
|
|
|
#include "sentinel-frame.h"
|
2002-11-08 21:48:55 +01:00
|
|
|
#include "gdbcore.h"
|
|
|
|
#include "annotate.h"
|
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* stack.c (selected_frame, select_frame): Move from here ...
* frame.c (selected_frame, select_frame): ... to here. Include
"language.h".
* Makefile.in (frame.o): Update dependencies.
* frame.c (get_selected_frame): New function.
* frame.h (get_selected_frame): Declare.
(deprecated_selected_frame): Rename selected_frame.
* ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update.
* eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update.
* h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update.
* inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update.
* mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update.
* remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update.
* stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update.
* z8k-tdep.c, cli/cli-cmds.c: Update.
Index: mi/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* mi/mi-cmd-stack.c, mi/mi-main.c: Update to use
deprecated_selected_frame.
Index: tui/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* tui/tui-hooks.c: Update to use deprecated_selected_frame.
* tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto.
* tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
2002-11-29 20:15:16 +01:00
|
|
|
#include "language.h"
|
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* dummy-frame.h (dummy_frame_id_unwind): Delete declaration.
(dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto.
(struct frame_unwind): Declare opaque.
(dummy_frame_p): Declare function.
* dummy-frame.c (dummy_frame_id_unwind): Make static.
(dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto.
* dummy-frame.c: Include "frame-unwind.h".
(dummy_frame_p): New function.
(dummy_frame_unwind): New variable.
* frame.c: Include "frame-unwind.h".
(frame_pc_unwind, frame_id_unwind, frame_register_unwind): Update
to use the new unwind field.
(set_unwind_by_pc): Delete function.
(create_new_frame, get_prev_frame): Set unwind field using
frame_unwind_find_by_pc.
(trad_frame_unwind, trad_frame_unwinder): New variables.
* frame.h (trad_frame_unwind): Declare variable.
(frame_id_unwind_ftype): Delete declaration.
(frame_pc_unwind_ftype, frame_register_unwind_ftype): Ditto.
(struct frame_unwind): Declare opaque.
(struct frame_info): Replace the fields id_unwind, pc_unwind and
register_unwind with a single unwind pointer.
* frame-unwind.h, frame-unwind.c: New files.
* Makefile.in (SFILES): Add frame-unwind.c.
(frame_unwind_h): Define.
(COMMON_OBS): Add frame-unwind.o.
(frame-unwind.o): Specify dependencies.
(frame.o, dummy-frame.o): Update dependencies.
2003-01-18 18:25:23 +01:00
|
|
|
#include "frame-unwind.h"
|
2003-04-01 21:11:01 +02:00
|
|
|
#include "frame-base.h"
|
2003-01-21 20:32:42 +01:00
|
|
|
#include "command.h"
|
|
|
|
#include "gdbcmd.h"
|
2004-04-26 11:49:36 +02:00
|
|
|
#include "observer.h"
|
2004-09-01 16:13:33 +02:00
|
|
|
#include "objfiles.h"
|
2005-01-12 Andrew Cagney <cagney@gnu.org>
* exceptions.h (enum return_reason, RETURN_MASK)
(RETURN_MASK_QUIT, RETURN_MASK_ERROR, RETURN_MASK_ALL)
(return_mask, throw_exception, catch_exceptions_ftype)
(catch_exceptions_with_msg, catch_errors_ftype, catch_errors)
(catch_command_errors_ftype, catch_command_errors): Move to
exceptions.h.
* exceptions.c, exceptions.h: New files.
* top.c: Do not include <setjmp.h>.
(SIGJMP_BUF, SIGSETJMP, SIGLONGJMP, catch_return)
(throw_exception, catcher, catch_exceptions)
(catch_exceptions_with_msg, struct catch_errors_args)
(do_catch_errors, catch_errors, struct captured_command_args)
(do_captured_command, catch_command_errors): Move to exceptions.c.
* wrapper.c, wince.c, win32-nat.c, utils.c: Include "exceptions.h".
* tui/tui-interp.c, top.c, thread.c, symmisc.c: Ditto.
* symfile-mem.c, stack.c, solib.c, rs6000-nat.c: Ditto.
* remote-sds.c, remote-mips.c, remote-fileio.c: Ditto.
* remote-e7000.c, objc-lang.c, ocd.c: Ditto.
* remote.c, nto-procfs.c, monitor.c, mi/mi-main.c: Ditto.
* main.c, m32r-rom.c, infrun.c, inf-loop.c: Ditto.
* hppa-hpux-tdep.c, frame.c, event-top.c, event-loop.c: Ditto.
* corelow.c, corefile.c, cli/cli-interp.c, breakpoint.c: Ditto.
* ada-valprint.c, ada-lang.c: Ditto.
* Makefile.in (HFILES_NO_SRCDIR, COMMON_OBS): Add exceptions.h and
exceptions.o. Update all dependencies.
2005-01-12 19:31:35 +01:00
|
|
|
#include "exceptions.h"
|
2003-01-21 20:32:42 +01:00
|
|
|
|
2004-03-31 21:40:28 +02:00
|
|
|
static struct frame_info *get_prev_frame_1 (struct frame_info *this_frame);
|
|
|
|
|
2003-04-13 02:10:22 +02:00
|
|
|
/* We keep a cache of stack frames, each of which is a "struct
|
|
|
|
frame_info". The innermost one gets allocated (in
|
|
|
|
wait_for_inferior) each time the inferior stops; current_frame
|
|
|
|
points to it. Additional frames get allocated (in get_prev_frame)
|
|
|
|
as needed, and are chained through the next and prev fields. Any
|
|
|
|
time that the frame cache becomes invalid (most notably when we
|
|
|
|
execute something, but also if we change how we interpret the
|
|
|
|
frames (e.g. "set heuristic-fence-post" in mips-tdep.c, or anything
|
|
|
|
which reads new symbols)), we should call reinit_frame_cache. */
|
|
|
|
|
|
|
|
struct frame_info
|
|
|
|
{
|
|
|
|
/* Level of this frame. The inner-most (youngest) frame is at level
|
|
|
|
0. As you move towards the outer-most (oldest) frame, the level
|
|
|
|
increases. This is a cached value. It could just as easily be
|
|
|
|
computed by counting back from the selected frame to the inner
|
|
|
|
most frame. */
|
2004-04-17 02:48:25 +02:00
|
|
|
/* NOTE: cagney/2002-04-05: Perhaps a level of ``-1'' should be
|
2003-04-13 02:10:22 +02:00
|
|
|
reserved to indicate a bogus frame - one that has been created
|
|
|
|
just to keep GDB happy (GDB always needs a frame). For the
|
|
|
|
moment leave this as speculation. */
|
|
|
|
int level;
|
|
|
|
|
|
|
|
/* The frame's low-level unwinder and corresponding cache. The
|
|
|
|
low-level unwinder is responsible for unwinding register values
|
|
|
|
for the previous frame. The low-level unwind methods are
|
2004-04-17 02:48:25 +02:00
|
|
|
selected based on the presence, or otherwise, of register unwind
|
2003-04-13 02:10:22 +02:00
|
|
|
information such as CFI. */
|
|
|
|
void *prologue_cache;
|
|
|
|
const struct frame_unwind *unwind;
|
|
|
|
|
|
|
|
/* Cached copy of the previous frame's resume address. */
|
|
|
|
struct {
|
|
|
|
int p;
|
|
|
|
CORE_ADDR value;
|
|
|
|
} prev_pc;
|
|
|
|
|
|
|
|
/* Cached copy of the previous frame's function address. */
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
CORE_ADDR addr;
|
|
|
|
int p;
|
|
|
|
} prev_func;
|
|
|
|
|
|
|
|
/* This frame's ID. */
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
int p;
|
|
|
|
struct frame_id value;
|
|
|
|
} this_id;
|
|
|
|
|
|
|
|
/* The frame's high-level base methods, and corresponding cache.
|
|
|
|
The high level base methods are selected based on the frame's
|
|
|
|
debug info. */
|
|
|
|
const struct frame_base *base;
|
|
|
|
void *base_cache;
|
|
|
|
|
|
|
|
/* Pointers to the next (down, inner, younger) and previous (up,
|
|
|
|
outer, older) frame_info's in the frame cache. */
|
|
|
|
struct frame_info *next; /* down, inner, younger */
|
|
|
|
int prev_p;
|
|
|
|
struct frame_info *prev; /* up, outer, older */
|
2006-10-18 21:52:05 +02:00
|
|
|
|
|
|
|
/* The reason why we could not set PREV, or UNWIND_NO_REASON if we
|
|
|
|
could. Only valid when PREV_P is set. */
|
|
|
|
enum unwind_stop_reason stop_reason;
|
2003-04-13 02:10:22 +02:00
|
|
|
};
|
|
|
|
|
2003-02-26 00:12:22 +01:00
|
|
|
/* Flag to control debugging. */
|
|
|
|
|
|
|
|
static int frame_debug;
|
2005-02-24 Andrew Cagney <cagney@gnu.org>
Add show_VARIABLE functions, update add_setshow call.
* varobj.c (_initialize_varobj, show_varobjdebug): Add and update.
* valprint.c (_initialize_valprint, show_print_max)
(show_stop_print_at_null, show_repeat_count_threshold)
(show_prettyprint_structs, show_unionprint)
(show_prettyprint_arrays, show_addressprint, show_input_radix)
(show_output_radix): Ditto.
* valops.c (_initialize_valops, show_overload_resolution): Ditto.
* utils.c (initialize_utils, show_chars_per_line)
(show_lines_per_page, show_demangle, show_pagination_enabled)
(show_sevenbit_strings, show_asm_demangle): Ditto
* tui/tui-win.c (_initialize_tui_win, show_tui_border_kind)
(show_tui_border_mode, show_tui_active_border_mode): Ditto.
* top.c (init_main, show_new_async_prompt)
(show_async_command_editing_p, show_write_history_p)
(show_history_size, show_history_filename, show_caution)
(show_annotation_level, init_main): Ditto.
* target.c (initialize_targets, show_targetdebug)
(show_trust_readonly): Ditto.
* symfile.c (_initialize_symfile, show_symbol_reloading)
(show_ext_args, show_download_write_size)
(show_debug_file_directory): Ditto.
* source.c (_initialize_source, show_lines_to_list): Ditto.
* solib.c (_initialize_solib, show_auto_solib_add)
(show_solib_search_path): Ditto.
* p-valprint.c (_initialize_pascal_valprint)
(show_pascal_static_field_print): Ditto.
* printcmd.c (_initialize_printcmd, show_max_symbolic_offset)
(show_print_symbol_filename): Add and update.
* parse.c (_initialize_parse, show_expressiondebug): Dito.
* observer.c (_initialize_observer, show_observer_debug): Dito.
* maint.c (_initialize_maint_cmds, show_watchdog)
(show_maintenance_profile_p): Dito.
* linux-nat.c (_initialize_linux_nat, show_debug_linux_nat): Dito.
* infrun.c (_initialize_infrun, show_debug_infrun)
(show_stop_on_solib_events, show_follow_fork_mode_string)
(show_scheduler_mode, show_step_stop_if_no_debug): Ditto.
* infcall.c (_initialize_infcall, show_coerce_float_to_double_p)
(show_unwind_on_signal_p): Ditto.
* gdbtypes.c (build_gdbtypes, show_opaque_type_resolution)
(_initialize_gdbtypes, show_overload_debug): Ditto.
* gdb-events.c, gdb-events.sh (_initialize_gdb_events)
(show_gdb_events_debug): Ditto.
* gdbarch.c, gdbarch.sh (show_gdbarch_debug)
(_initialize_gdbarch): Ditto.
* frame.c (_initialize_frame, show_backtrace_past_main)
(show_backtrace_past_entry, show_backtrace_limit)
(show_frame_debug): Ditto.
* exec.c (_initialize_exec, show_write_files): Ditto.
* dwarf2read.c (_initialize_dwarf2_read)
(show_dwarf2_max_cache_age): Ditto.
* demangle.c (_initialize_demangler)
(show_demangling_style_names): Ditto.
* dcache.c (_initialize_dcache, show_dcache_enabled_p): Ditto.
* cp-valprint.c (show_static_field_print)
(_initialize_cp_valprint, show_vtblprint, show_objectprint): Ditto.
* corefile.c (_initialize_core, show_gnutarget_string): Ditto.
* cli/cli-logging.c (_initialize_cli_logging)
(show_logging_overwrite, show_logging_redirect)
(show_logging_filename): Ditto.
* cli/cli-cmds.c (show_info_verbose, show_history_expansion_p)
(init_cli_cmds, show_baud_rate, show_remote_debug)
(show_remote_timeout, show_max_user_call_depth): Ditto.
* charset.c (show_host_charset_name, show_target_charset_name)
(initialize_charset): Ditto.
* breakpoint.c (show_can_use_hw_watchpoints)
(show_pending_break_support, _initialize_breakpoint): Ditto.
2005-02-24 14:51:36 +01:00
|
|
|
static void
|
|
|
|
show_frame_debug (struct ui_file *file, int from_tty,
|
|
|
|
struct cmd_list_element *c, const char *value)
|
|
|
|
{
|
|
|
|
fprintf_filtered (file, _("Frame debugging is %s.\n"), value);
|
|
|
|
}
|
2003-02-26 00:12:22 +01:00
|
|
|
|
2003-08-09 17:10:09 +02:00
|
|
|
/* Flag to indicate whether backtraces should stop at main et.al. */
|
|
|
|
|
|
|
|
static int backtrace_past_main;
|
2005-02-24 Andrew Cagney <cagney@gnu.org>
Add show_VARIABLE functions, update add_setshow call.
* varobj.c (_initialize_varobj, show_varobjdebug): Add and update.
* valprint.c (_initialize_valprint, show_print_max)
(show_stop_print_at_null, show_repeat_count_threshold)
(show_prettyprint_structs, show_unionprint)
(show_prettyprint_arrays, show_addressprint, show_input_radix)
(show_output_radix): Ditto.
* valops.c (_initialize_valops, show_overload_resolution): Ditto.
* utils.c (initialize_utils, show_chars_per_line)
(show_lines_per_page, show_demangle, show_pagination_enabled)
(show_sevenbit_strings, show_asm_demangle): Ditto
* tui/tui-win.c (_initialize_tui_win, show_tui_border_kind)
(show_tui_border_mode, show_tui_active_border_mode): Ditto.
* top.c (init_main, show_new_async_prompt)
(show_async_command_editing_p, show_write_history_p)
(show_history_size, show_history_filename, show_caution)
(show_annotation_level, init_main): Ditto.
* target.c (initialize_targets, show_targetdebug)
(show_trust_readonly): Ditto.
* symfile.c (_initialize_symfile, show_symbol_reloading)
(show_ext_args, show_download_write_size)
(show_debug_file_directory): Ditto.
* source.c (_initialize_source, show_lines_to_list): Ditto.
* solib.c (_initialize_solib, show_auto_solib_add)
(show_solib_search_path): Ditto.
* p-valprint.c (_initialize_pascal_valprint)
(show_pascal_static_field_print): Ditto.
* printcmd.c (_initialize_printcmd, show_max_symbolic_offset)
(show_print_symbol_filename): Add and update.
* parse.c (_initialize_parse, show_expressiondebug): Dito.
* observer.c (_initialize_observer, show_observer_debug): Dito.
* maint.c (_initialize_maint_cmds, show_watchdog)
(show_maintenance_profile_p): Dito.
* linux-nat.c (_initialize_linux_nat, show_debug_linux_nat): Dito.
* infrun.c (_initialize_infrun, show_debug_infrun)
(show_stop_on_solib_events, show_follow_fork_mode_string)
(show_scheduler_mode, show_step_stop_if_no_debug): Ditto.
* infcall.c (_initialize_infcall, show_coerce_float_to_double_p)
(show_unwind_on_signal_p): Ditto.
* gdbtypes.c (build_gdbtypes, show_opaque_type_resolution)
(_initialize_gdbtypes, show_overload_debug): Ditto.
* gdb-events.c, gdb-events.sh (_initialize_gdb_events)
(show_gdb_events_debug): Ditto.
* gdbarch.c, gdbarch.sh (show_gdbarch_debug)
(_initialize_gdbarch): Ditto.
* frame.c (_initialize_frame, show_backtrace_past_main)
(show_backtrace_past_entry, show_backtrace_limit)
(show_frame_debug): Ditto.
* exec.c (_initialize_exec, show_write_files): Ditto.
* dwarf2read.c (_initialize_dwarf2_read)
(show_dwarf2_max_cache_age): Ditto.
* demangle.c (_initialize_demangler)
(show_demangling_style_names): Ditto.
* dcache.c (_initialize_dcache, show_dcache_enabled_p): Ditto.
* cp-valprint.c (show_static_field_print)
(_initialize_cp_valprint, show_vtblprint, show_objectprint): Ditto.
* corefile.c (_initialize_core, show_gnutarget_string): Ditto.
* cli/cli-logging.c (_initialize_cli_logging)
(show_logging_overwrite, show_logging_redirect)
(show_logging_filename): Ditto.
* cli/cli-cmds.c (show_info_verbose, show_history_expansion_p)
(init_cli_cmds, show_baud_rate, show_remote_debug)
(show_remote_timeout, show_max_user_call_depth): Ditto.
* charset.c (show_host_charset_name, show_target_charset_name)
(initialize_charset): Ditto.
* breakpoint.c (show_can_use_hw_watchpoints)
(show_pending_break_support, _initialize_breakpoint): Ditto.
2005-02-24 14:51:36 +01:00
|
|
|
static void
|
|
|
|
show_backtrace_past_main (struct ui_file *file, int from_tty,
|
|
|
|
struct cmd_list_element *c, const char *value)
|
|
|
|
{
|
|
|
|
fprintf_filtered (file, _("\
|
|
|
|
Whether backtraces should continue past \"main\" is %s.\n"),
|
|
|
|
value);
|
|
|
|
}
|
|
|
|
|
2004-11-10 22:17:58 +01:00
|
|
|
static int backtrace_past_entry;
|
2005-02-24 Andrew Cagney <cagney@gnu.org>
Add show_VARIABLE functions, update add_setshow call.
* varobj.c (_initialize_varobj, show_varobjdebug): Add and update.
* valprint.c (_initialize_valprint, show_print_max)
(show_stop_print_at_null, show_repeat_count_threshold)
(show_prettyprint_structs, show_unionprint)
(show_prettyprint_arrays, show_addressprint, show_input_radix)
(show_output_radix): Ditto.
* valops.c (_initialize_valops, show_overload_resolution): Ditto.
* utils.c (initialize_utils, show_chars_per_line)
(show_lines_per_page, show_demangle, show_pagination_enabled)
(show_sevenbit_strings, show_asm_demangle): Ditto
* tui/tui-win.c (_initialize_tui_win, show_tui_border_kind)
(show_tui_border_mode, show_tui_active_border_mode): Ditto.
* top.c (init_main, show_new_async_prompt)
(show_async_command_editing_p, show_write_history_p)
(show_history_size, show_history_filename, show_caution)
(show_annotation_level, init_main): Ditto.
* target.c (initialize_targets, show_targetdebug)
(show_trust_readonly): Ditto.
* symfile.c (_initialize_symfile, show_symbol_reloading)
(show_ext_args, show_download_write_size)
(show_debug_file_directory): Ditto.
* source.c (_initialize_source, show_lines_to_list): Ditto.
* solib.c (_initialize_solib, show_auto_solib_add)
(show_solib_search_path): Ditto.
* p-valprint.c (_initialize_pascal_valprint)
(show_pascal_static_field_print): Ditto.
* printcmd.c (_initialize_printcmd, show_max_symbolic_offset)
(show_print_symbol_filename): Add and update.
* parse.c (_initialize_parse, show_expressiondebug): Dito.
* observer.c (_initialize_observer, show_observer_debug): Dito.
* maint.c (_initialize_maint_cmds, show_watchdog)
(show_maintenance_profile_p): Dito.
* linux-nat.c (_initialize_linux_nat, show_debug_linux_nat): Dito.
* infrun.c (_initialize_infrun, show_debug_infrun)
(show_stop_on_solib_events, show_follow_fork_mode_string)
(show_scheduler_mode, show_step_stop_if_no_debug): Ditto.
* infcall.c (_initialize_infcall, show_coerce_float_to_double_p)
(show_unwind_on_signal_p): Ditto.
* gdbtypes.c (build_gdbtypes, show_opaque_type_resolution)
(_initialize_gdbtypes, show_overload_debug): Ditto.
* gdb-events.c, gdb-events.sh (_initialize_gdb_events)
(show_gdb_events_debug): Ditto.
* gdbarch.c, gdbarch.sh (show_gdbarch_debug)
(_initialize_gdbarch): Ditto.
* frame.c (_initialize_frame, show_backtrace_past_main)
(show_backtrace_past_entry, show_backtrace_limit)
(show_frame_debug): Ditto.
* exec.c (_initialize_exec, show_write_files): Ditto.
* dwarf2read.c (_initialize_dwarf2_read)
(show_dwarf2_max_cache_age): Ditto.
* demangle.c (_initialize_demangler)
(show_demangling_style_names): Ditto.
* dcache.c (_initialize_dcache, show_dcache_enabled_p): Ditto.
* cp-valprint.c (show_static_field_print)
(_initialize_cp_valprint, show_vtblprint, show_objectprint): Ditto.
* corefile.c (_initialize_core, show_gnutarget_string): Ditto.
* cli/cli-logging.c (_initialize_cli_logging)
(show_logging_overwrite, show_logging_redirect)
(show_logging_filename): Ditto.
* cli/cli-cmds.c (show_info_verbose, show_history_expansion_p)
(init_cli_cmds, show_baud_rate, show_remote_debug)
(show_remote_timeout, show_max_user_call_depth): Ditto.
* charset.c (show_host_charset_name, show_target_charset_name)
(initialize_charset): Ditto.
* breakpoint.c (show_can_use_hw_watchpoints)
(show_pending_break_support, _initialize_breakpoint): Ditto.
2005-02-24 14:51:36 +01:00
|
|
|
static void
|
|
|
|
show_backtrace_past_entry (struct ui_file *file, int from_tty,
|
|
|
|
struct cmd_list_element *c, const char *value)
|
|
|
|
{
|
|
|
|
fprintf_filtered (file, _("\
|
|
|
|
Whether backtraces should continue past the entry point of a program is %s.\n"),
|
|
|
|
value);
|
|
|
|
}
|
|
|
|
|
2005-05-29 00:51:37 +02:00
|
|
|
static int backtrace_limit = INT_MAX;
|
2005-02-24 Andrew Cagney <cagney@gnu.org>
Add show_VARIABLE functions, update add_setshow call.
* varobj.c (_initialize_varobj, show_varobjdebug): Add and update.
* valprint.c (_initialize_valprint, show_print_max)
(show_stop_print_at_null, show_repeat_count_threshold)
(show_prettyprint_structs, show_unionprint)
(show_prettyprint_arrays, show_addressprint, show_input_radix)
(show_output_radix): Ditto.
* valops.c (_initialize_valops, show_overload_resolution): Ditto.
* utils.c (initialize_utils, show_chars_per_line)
(show_lines_per_page, show_demangle, show_pagination_enabled)
(show_sevenbit_strings, show_asm_demangle): Ditto
* tui/tui-win.c (_initialize_tui_win, show_tui_border_kind)
(show_tui_border_mode, show_tui_active_border_mode): Ditto.
* top.c (init_main, show_new_async_prompt)
(show_async_command_editing_p, show_write_history_p)
(show_history_size, show_history_filename, show_caution)
(show_annotation_level, init_main): Ditto.
* target.c (initialize_targets, show_targetdebug)
(show_trust_readonly): Ditto.
* symfile.c (_initialize_symfile, show_symbol_reloading)
(show_ext_args, show_download_write_size)
(show_debug_file_directory): Ditto.
* source.c (_initialize_source, show_lines_to_list): Ditto.
* solib.c (_initialize_solib, show_auto_solib_add)
(show_solib_search_path): Ditto.
* p-valprint.c (_initialize_pascal_valprint)
(show_pascal_static_field_print): Ditto.
* printcmd.c (_initialize_printcmd, show_max_symbolic_offset)
(show_print_symbol_filename): Add and update.
* parse.c (_initialize_parse, show_expressiondebug): Dito.
* observer.c (_initialize_observer, show_observer_debug): Dito.
* maint.c (_initialize_maint_cmds, show_watchdog)
(show_maintenance_profile_p): Dito.
* linux-nat.c (_initialize_linux_nat, show_debug_linux_nat): Dito.
* infrun.c (_initialize_infrun, show_debug_infrun)
(show_stop_on_solib_events, show_follow_fork_mode_string)
(show_scheduler_mode, show_step_stop_if_no_debug): Ditto.
* infcall.c (_initialize_infcall, show_coerce_float_to_double_p)
(show_unwind_on_signal_p): Ditto.
* gdbtypes.c (build_gdbtypes, show_opaque_type_resolution)
(_initialize_gdbtypes, show_overload_debug): Ditto.
* gdb-events.c, gdb-events.sh (_initialize_gdb_events)
(show_gdb_events_debug): Ditto.
* gdbarch.c, gdbarch.sh (show_gdbarch_debug)
(_initialize_gdbarch): Ditto.
* frame.c (_initialize_frame, show_backtrace_past_main)
(show_backtrace_past_entry, show_backtrace_limit)
(show_frame_debug): Ditto.
* exec.c (_initialize_exec, show_write_files): Ditto.
* dwarf2read.c (_initialize_dwarf2_read)
(show_dwarf2_max_cache_age): Ditto.
* demangle.c (_initialize_demangler)
(show_demangling_style_names): Ditto.
* dcache.c (_initialize_dcache, show_dcache_enabled_p): Ditto.
* cp-valprint.c (show_static_field_print)
(_initialize_cp_valprint, show_vtblprint, show_objectprint): Ditto.
* corefile.c (_initialize_core, show_gnutarget_string): Ditto.
* cli/cli-logging.c (_initialize_cli_logging)
(show_logging_overwrite, show_logging_redirect)
(show_logging_filename): Ditto.
* cli/cli-cmds.c (show_info_verbose, show_history_expansion_p)
(init_cli_cmds, show_baud_rate, show_remote_debug)
(show_remote_timeout, show_max_user_call_depth): Ditto.
* charset.c (show_host_charset_name, show_target_charset_name)
(initialize_charset): Ditto.
* breakpoint.c (show_can_use_hw_watchpoints)
(show_pending_break_support, _initialize_breakpoint): Ditto.
2005-02-24 14:51:36 +01:00
|
|
|
static void
|
|
|
|
show_backtrace_limit (struct ui_file *file, int from_tty,
|
|
|
|
struct cmd_list_element *c, const char *value)
|
|
|
|
{
|
|
|
|
fprintf_filtered (file, _("\
|
|
|
|
An upper bound on the number of backtrace levels is %s.\n"),
|
|
|
|
value);
|
|
|
|
}
|
|
|
|
|
2003-01-21 20:32:42 +01:00
|
|
|
|
2004-07-16 21:00:12 +02:00
|
|
|
static void
|
|
|
|
fprint_field (struct ui_file *file, const char *name, int p, CORE_ADDR addr)
|
|
|
|
{
|
|
|
|
if (p)
|
|
|
|
fprintf_unfiltered (file, "%s=0x%s", name, paddr_nz (addr));
|
|
|
|
else
|
|
|
|
fprintf_unfiltered (file, "!%s", name);
|
|
|
|
}
|
2001-02-20 23:39:03 +01:00
|
|
|
|
2003-05-05 20:33:11 +02:00
|
|
|
void
|
2003-04-10 17:32:27 +02:00
|
|
|
fprint_frame_id (struct ui_file *file, struct frame_id id)
|
|
|
|
{
|
2004-07-16 21:00:12 +02:00
|
|
|
fprintf_unfiltered (file, "{");
|
|
|
|
fprint_field (file, "stack", id.stack_addr_p, id.stack_addr);
|
|
|
|
fprintf_unfiltered (file, ",");
|
|
|
|
fprint_field (file, "code", id.code_addr_p, id.code_addr);
|
|
|
|
fprintf_unfiltered (file, ",");
|
|
|
|
fprint_field (file, "special", id.special_addr_p, id.special_addr);
|
|
|
|
fprintf_unfiltered (file, "}");
|
2003-04-10 17:32:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
fprint_frame_type (struct ui_file *file, enum frame_type type)
|
|
|
|
{
|
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case NORMAL_FRAME:
|
|
|
|
fprintf_unfiltered (file, "NORMAL_FRAME");
|
|
|
|
return;
|
|
|
|
case DUMMY_FRAME:
|
|
|
|
fprintf_unfiltered (file, "DUMMY_FRAME");
|
|
|
|
return;
|
|
|
|
case SIGTRAMP_FRAME:
|
|
|
|
fprintf_unfiltered (file, "SIGTRAMP_FRAME");
|
|
|
|
return;
|
|
|
|
default:
|
|
|
|
fprintf_unfiltered (file, "<unknown type>");
|
|
|
|
return;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
fprint_frame (struct ui_file *file, struct frame_info *fi)
|
|
|
|
{
|
|
|
|
if (fi == NULL)
|
|
|
|
{
|
|
|
|
fprintf_unfiltered (file, "<NULL frame>");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
fprintf_unfiltered (file, "{");
|
|
|
|
fprintf_unfiltered (file, "level=%d", fi->level);
|
|
|
|
fprintf_unfiltered (file, ",");
|
|
|
|
fprintf_unfiltered (file, "type=");
|
2004-07-31 23:41:50 +02:00
|
|
|
if (fi->unwind != NULL)
|
|
|
|
fprint_frame_type (file, fi->unwind->type);
|
|
|
|
else
|
|
|
|
fprintf_unfiltered (file, "<unknown>");
|
2003-04-10 17:32:27 +02:00
|
|
|
fprintf_unfiltered (file, ",");
|
|
|
|
fprintf_unfiltered (file, "unwind=");
|
|
|
|
if (fi->unwind != NULL)
|
|
|
|
gdb_print_host_address (fi->unwind, file);
|
|
|
|
else
|
|
|
|
fprintf_unfiltered (file, "<unknown>");
|
|
|
|
fprintf_unfiltered (file, ",");
|
|
|
|
fprintf_unfiltered (file, "pc=");
|
|
|
|
if (fi->next != NULL && fi->next->prev_pc.p)
|
|
|
|
fprintf_unfiltered (file, "0x%s", paddr_nz (fi->next->prev_pc.value));
|
|
|
|
else
|
|
|
|
fprintf_unfiltered (file, "<unknown>");
|
|
|
|
fprintf_unfiltered (file, ",");
|
|
|
|
fprintf_unfiltered (file, "id=");
|
|
|
|
if (fi->this_id.p)
|
|
|
|
fprint_frame_id (file, fi->this_id.value);
|
|
|
|
else
|
|
|
|
fprintf_unfiltered (file, "<unknown>");
|
|
|
|
fprintf_unfiltered (file, ",");
|
|
|
|
fprintf_unfiltered (file, "func=");
|
|
|
|
if (fi->next != NULL && fi->next->prev_func.p)
|
|
|
|
fprintf_unfiltered (file, "0x%s", paddr_nz (fi->next->prev_func.addr));
|
|
|
|
else
|
|
|
|
fprintf_unfiltered (file, "<unknown>");
|
|
|
|
fprintf_unfiltered (file, "}");
|
|
|
|
}
|
|
|
|
|
2002-12-04 01:05:54 +01:00
|
|
|
/* Return a frame uniq ID that can be used to, later, re-find the
|
2002-06-11 01:25:50 +02:00
|
|
|
frame. */
|
|
|
|
|
2002-12-04 01:05:54 +01:00
|
|
|
struct frame_id
|
|
|
|
get_frame_id (struct frame_info *fi)
|
2002-06-11 01:25:50 +02:00
|
|
|
{
|
|
|
|
if (fi == NULL)
|
|
|
|
{
|
2002-12-04 01:05:54 +01:00
|
|
|
return null_frame_id;
|
2002-06-11 01:25:50 +02:00
|
|
|
}
|
2003-04-10 05:30:36 +02:00
|
|
|
if (!fi->this_id.p)
|
2002-06-11 01:25:50 +02:00
|
|
|
{
|
2003-04-10 17:32:27 +02:00
|
|
|
if (frame_debug)
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "{ get_frame_id (fi=%d) ",
|
|
|
|
fi->level);
|
2003-04-16 16:39:47 +02:00
|
|
|
/* Find the unwinder. */
|
|
|
|
if (fi->unwind == NULL)
|
2004-07-31 23:41:50 +02:00
|
|
|
fi->unwind = frame_unwind_find_by_frame (fi->next,
|
|
|
|
&fi->prologue_cache);
|
2003-03-30 18:16:25 +02:00
|
|
|
/* Find THIS frame's ID. */
|
2003-04-10 05:30:36 +02:00
|
|
|
fi->unwind->this_id (fi->next, &fi->prologue_cache, &fi->this_id.value);
|
|
|
|
fi->this_id.p = 1;
|
2003-04-10 17:32:27 +02:00
|
|
|
if (frame_debug)
|
|
|
|
{
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "-> ");
|
|
|
|
fprint_frame_id (gdb_stdlog, fi->this_id.value);
|
|
|
|
fprintf_unfiltered (gdb_stdlog, " }\n");
|
|
|
|
}
|
2002-06-11 01:25:50 +02:00
|
|
|
}
|
2003-04-12 06:27:29 +02:00
|
|
|
return fi->this_id.value;
|
2002-06-11 01:25:50 +02:00
|
|
|
}
|
|
|
|
|
2004-03-31 21:40:28 +02:00
|
|
|
struct frame_id
|
|
|
|
frame_unwind_id (struct frame_info *next_frame)
|
|
|
|
{
|
|
|
|
/* Use prev_frame, and not get_prev_frame. The latter will truncate
|
|
|
|
the frame chain, leading to this function unintentionally
|
|
|
|
returning a null_frame_id (e.g., when a caller requests the frame
|
|
|
|
ID of "main()"s caller. */
|
|
|
|
return get_frame_id (get_prev_frame_1 (next_frame));
|
|
|
|
}
|
|
|
|
|
2002-12-04 01:05:54 +01:00
|
|
|
const struct frame_id null_frame_id; /* All zeros. */
|
|
|
|
|
|
|
|
struct frame_id
|
2003-10-17 18:32:17 +02:00
|
|
|
frame_id_build_special (CORE_ADDR stack_addr, CORE_ADDR code_addr,
|
|
|
|
CORE_ADDR special_addr)
|
2002-12-04 01:05:54 +01:00
|
|
|
{
|
2004-06-27 22:45:05 +02:00
|
|
|
struct frame_id id = null_frame_id;
|
2003-04-10 05:30:36 +02:00
|
|
|
id.stack_addr = stack_addr;
|
2004-06-27 22:45:05 +02:00
|
|
|
id.stack_addr_p = 1;
|
2003-04-10 05:30:36 +02:00
|
|
|
id.code_addr = code_addr;
|
2004-06-27 22:45:05 +02:00
|
|
|
id.code_addr_p = 1;
|
2003-10-17 18:32:17 +02:00
|
|
|
id.special_addr = special_addr;
|
2004-06-27 22:45:05 +02:00
|
|
|
id.special_addr_p = 1;
|
2002-12-04 01:05:54 +01:00
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
2003-10-17 18:32:17 +02:00
|
|
|
struct frame_id
|
|
|
|
frame_id_build (CORE_ADDR stack_addr, CORE_ADDR code_addr)
|
|
|
|
{
|
2004-06-27 22:45:05 +02:00
|
|
|
struct frame_id id = null_frame_id;
|
|
|
|
id.stack_addr = stack_addr;
|
|
|
|
id.stack_addr_p = 1;
|
|
|
|
id.code_addr = code_addr;
|
|
|
|
id.code_addr_p = 1;
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct frame_id
|
|
|
|
frame_id_build_wild (CORE_ADDR stack_addr)
|
|
|
|
{
|
|
|
|
struct frame_id id = null_frame_id;
|
|
|
|
id.stack_addr = stack_addr;
|
|
|
|
id.stack_addr_p = 1;
|
|
|
|
return id;
|
2003-10-17 18:32:17 +02:00
|
|
|
}
|
|
|
|
|
2002-12-04 01:05:54 +01:00
|
|
|
int
|
|
|
|
frame_id_p (struct frame_id l)
|
|
|
|
{
|
2003-04-10 05:30:36 +02:00
|
|
|
int p;
|
2004-06-27 22:45:05 +02:00
|
|
|
/* The frame is valid iff it has a valid stack address. */
|
|
|
|
p = l.stack_addr_p;
|
2003-04-10 17:32:27 +02:00
|
|
|
if (frame_debug)
|
|
|
|
{
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "{ frame_id_p (l=");
|
|
|
|
fprint_frame_id (gdb_stdlog, l);
|
|
|
|
fprintf_unfiltered (gdb_stdlog, ") -> %d }\n", p);
|
|
|
|
}
|
2003-04-10 05:30:36 +02:00
|
|
|
return p;
|
2002-12-04 01:05:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
frame_id_eq (struct frame_id l, struct frame_id r)
|
|
|
|
{
|
2003-04-10 05:30:36 +02:00
|
|
|
int eq;
|
2004-06-27 22:45:05 +02:00
|
|
|
if (!l.stack_addr_p || !r.stack_addr_p)
|
|
|
|
/* Like a NaN, if either ID is invalid, the result is false.
|
|
|
|
Note that a frame ID is invalid iff it is the null frame ID. */
|
2003-04-10 05:30:36 +02:00
|
|
|
eq = 0;
|
|
|
|
else if (l.stack_addr != r.stack_addr)
|
|
|
|
/* If .stack addresses are different, the frames are different. */
|
|
|
|
eq = 0;
|
2004-06-27 22:45:05 +02:00
|
|
|
else if (!l.code_addr_p || !r.code_addr_p)
|
|
|
|
/* An invalid code addr is a wild card, always succeed. */
|
2003-04-10 05:30:36 +02:00
|
|
|
eq = 1;
|
2003-10-17 18:32:17 +02:00
|
|
|
else if (l.code_addr != r.code_addr)
|
|
|
|
/* If .code addresses are different, the frames are different. */
|
|
|
|
eq = 0;
|
2004-06-27 22:45:05 +02:00
|
|
|
else if (!l.special_addr_p || !r.special_addr_p)
|
|
|
|
/* An invalid special addr is a wild card (or unused), always succeed. */
|
2003-10-17 18:32:17 +02:00
|
|
|
eq = 1;
|
|
|
|
else if (l.special_addr == r.special_addr)
|
|
|
|
/* Frames are equal. */
|
2003-04-10 05:30:36 +02:00
|
|
|
eq = 1;
|
|
|
|
else
|
2003-04-21 21:34:02 +02:00
|
|
|
/* No luck. */
|
|
|
|
eq = 0;
|
2003-04-10 17:32:27 +02:00
|
|
|
if (frame_debug)
|
|
|
|
{
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "{ frame_id_eq (l=");
|
|
|
|
fprint_frame_id (gdb_stdlog, l);
|
|
|
|
fprintf_unfiltered (gdb_stdlog, ",r=");
|
|
|
|
fprint_frame_id (gdb_stdlog, r);
|
|
|
|
fprintf_unfiltered (gdb_stdlog, ") -> %d }\n", eq);
|
|
|
|
}
|
2003-04-10 05:30:36 +02:00
|
|
|
return eq;
|
2002-12-04 01:05:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2007-11-02 15:47:28 +01:00
|
|
|
frame_id_inner (struct gdbarch *gdbarch, struct frame_id l, struct frame_id r)
|
2002-12-04 01:05:54 +01:00
|
|
|
{
|
2003-04-10 05:30:36 +02:00
|
|
|
int inner;
|
2004-06-27 22:45:05 +02:00
|
|
|
if (!l.stack_addr_p || !r.stack_addr_p)
|
2003-04-10 05:30:36 +02:00
|
|
|
/* Like NaN, any operation involving an invalid ID always fails. */
|
|
|
|
inner = 0;
|
|
|
|
else
|
|
|
|
/* Only return non-zero when strictly inner than. Note that, per
|
|
|
|
comment in "frame.h", there is some fuzz here. Frameless
|
|
|
|
functions are not strictly inner than (same .stack but
|
2003-10-17 18:32:17 +02:00
|
|
|
different .code and/or .special address). */
|
2007-11-02 15:47:28 +01:00
|
|
|
inner = gdbarch_inner_than (gdbarch, l.stack_addr, r.stack_addr);
|
2003-04-10 17:32:27 +02:00
|
|
|
if (frame_debug)
|
|
|
|
{
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "{ frame_id_inner (l=");
|
|
|
|
fprint_frame_id (gdb_stdlog, l);
|
|
|
|
fprintf_unfiltered (gdb_stdlog, ",r=");
|
|
|
|
fprint_frame_id (gdb_stdlog, r);
|
|
|
|
fprintf_unfiltered (gdb_stdlog, ") -> %d }\n", inner);
|
|
|
|
}
|
2003-04-10 05:30:36 +02:00
|
|
|
return inner;
|
2002-12-04 01:05:54 +01:00
|
|
|
}
|
|
|
|
|
2002-06-11 01:25:50 +02:00
|
|
|
struct frame_info *
|
|
|
|
frame_find_by_id (struct frame_id id)
|
|
|
|
{
|
|
|
|
struct frame_info *frame;
|
|
|
|
|
|
|
|
/* ZERO denotes the null frame, let the caller decide what to do
|
|
|
|
about it. Should it instead return get_current_frame()? */
|
2002-12-04 01:05:54 +01:00
|
|
|
if (!frame_id_p (id))
|
2002-06-11 01:25:50 +02:00
|
|
|
return NULL;
|
|
|
|
|
|
|
|
for (frame = get_current_frame ();
|
|
|
|
frame != NULL;
|
|
|
|
frame = get_prev_frame (frame))
|
|
|
|
{
|
2002-12-04 01:05:54 +01:00
|
|
|
struct frame_id this = get_frame_id (frame);
|
|
|
|
if (frame_id_eq (id, this))
|
|
|
|
/* An exact match. */
|
|
|
|
return frame;
|
2007-11-02 15:47:28 +01:00
|
|
|
if (frame_id_inner (get_frame_arch (frame), id, this))
|
2002-12-04 01:05:54 +01:00
|
|
|
/* Gone to far. */
|
2002-06-11 01:25:50 +02:00
|
|
|
return NULL;
|
2004-04-17 02:48:25 +02:00
|
|
|
/* Either we're not yet gone far enough out along the frame
|
|
|
|
chain (inner(this,id)), or we're comparing frameless functions
|
2002-12-04 01:05:54 +01:00
|
|
|
(same .base, different .func, no test available). Struggle
|
|
|
|
on until we've definitly gone to far. */
|
2002-06-11 01:25:50 +02:00
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2002-11-15 23:16:25 +01:00
|
|
|
CORE_ADDR
|
2003-03-10 16:28:41 +01:00
|
|
|
frame_pc_unwind (struct frame_info *this_frame)
|
2002-11-15 23:16:25 +01:00
|
|
|
{
|
2003-04-09 22:49:22 +02:00
|
|
|
if (!this_frame->prev_pc.p)
|
2002-11-15 23:16:25 +01:00
|
|
|
{
|
2003-03-10 16:28:41 +01:00
|
|
|
CORE_ADDR pc;
|
2004-11-09 02:16:42 +01:00
|
|
|
if (this_frame->unwind == NULL)
|
|
|
|
this_frame->unwind
|
|
|
|
= frame_unwind_find_by_frame (this_frame->next,
|
|
|
|
&this_frame->prologue_cache);
|
|
|
|
if (this_frame->unwind->prev_pc != NULL)
|
|
|
|
/* A per-frame unwinder, prefer it. */
|
|
|
|
pc = this_frame->unwind->prev_pc (this_frame->next,
|
|
|
|
&this_frame->prologue_cache);
|
2007-10-09 20:14:09 +02:00
|
|
|
else if (gdbarch_unwind_pc_p (get_frame_arch (this_frame)))
|
2003-03-10 16:28:41 +01:00
|
|
|
{
|
|
|
|
/* The right way. The `pure' way. The one true way. This
|
|
|
|
method depends solely on the register-unwind code to
|
|
|
|
determine the value of registers in THIS frame, and hence
|
|
|
|
the value of this frame's PC (resume address). A typical
|
|
|
|
implementation is no more than:
|
|
|
|
|
|
|
|
frame_unwind_register (this_frame, ISA_PC_REGNUM, buf);
|
2003-05-22 20:37:05 +02:00
|
|
|
return extract_unsigned_integer (buf, size of ISA_PC_REGNUM);
|
2003-03-10 16:28:41 +01:00
|
|
|
|
|
|
|
Note: this method is very heavily dependent on a correct
|
|
|
|
register-unwind implementation, it pays to fix that
|
|
|
|
method first; this method is frame type agnostic, since
|
|
|
|
it only deals with register values, it works with any
|
|
|
|
frame. This is all in stark contrast to the old
|
|
|
|
FRAME_SAVED_PC which would try to directly handle all the
|
|
|
|
different ways that a PC could be unwound. */
|
2007-10-09 20:14:09 +02:00
|
|
|
pc = gdbarch_unwind_pc (get_frame_arch (this_frame), this_frame);
|
2003-03-10 16:28:41 +01:00
|
|
|
}
|
|
|
|
else
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up error_no_arg, query, perror_with_name, complaint, and
internal_error.
* breakpoint.c, cp-abi.c, cp-namespace.c, cp-support.c: Update.
* cris-tdep.c, dbxread.c, dictionary.c, dsrec.c: Update.
* dummy-frame.c, dve3900-rom.c, dwarf2-frame.c, dwarf2expr.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, event-loop.c: Update.
* exceptions.c, exec.c, f-lang.c, findvar.c, fork-child.c: Update.
* frame-unwind.c, frame.c, frv-linux-tdep.c, frv-tdep.c: Update.
* gdb_assert.h, gdbarch.c, gdbtypes.c, gnu-nat.c: Update.
* go32-nat.c, hppa-tdep.c, hppabsd-nat.c, hpread.c: Update.
* i386-linux-nat.c, i386-nat.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386fbsd-nat.c, inf-ptrace.c, inf-ttrace.c, infcall.c: Update.
* infcmd.c, inflow.c, infptrace.c, infrun.c, inftarg.c: Update.
* interps.c, language.c, linespec.c, linux-nat.c: Update.
* m32r-linux-nat.c, m68k-tdep.c, m68kbsd-nat.c: Update.
* m68klinux-nat.c, m88kbsd-nat.c, macroexp.c, macroscope.c: Update.
* macrotab.c, maint.c, mdebugread.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mips64obsd-nat.c: Update.
* mipsnbsd-nat.c, mn10300-tdep.c, monitor.c, nto-procfs.c: Update.
* objc-lang.c, objfiles.c, objfiles.h, ocd.c, osabi.c: Update.
* parse.c, ppc-bdm.c, ppc-linux-nat.c, ppc-sysv-tdep.c: Update.
* ppcnbsd-nat.c, ppcobsd-nat.c, printcmd.c, procfs.c: Update.
* regcache.c, reggroups.c, remote-e7000.c, remote-mips.c: Update.
* remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote.c, rs6000-nat.c, rs6000-tdep.c: Update.
* s390-nat.c, s390-tdep.c, sentinel-frame.c, serial.c: Update.
* sh-tdep.c, sh3-rom.c, sh64-tdep.c, shnbsd-nat.c: Update.
* solib-aix5.c, solib-svr4.c, solib.c, source.c: Update.
* sparc-nat.c, stabsread.c, stack.c, symfile.c, symtab.c: Update.
* symtab.h, target.c, tracepoint.c, ui-file.c, ui-out.c: Update.
* utils.c, valops.c, valprint.c, vax-nat.c, vaxbsd-nat.c: Update.
* win32-nat.c, xcoffread.c, xstormy16-tdep.c: Update.
* cli/cli-cmds.c, cli/cli-logging.c, cli/cli-script.c: Update.
* cli/cli-setshow.c, mi/mi-cmd-break.c, mi/mi-cmds.c: Update.
* mi/mi-console.c, mi/mi-getopt.c, mi/mi-out.c: Update.
* tui/tui-file.c, tui/tui-interp.c: Update.
2005-02-11 19:13:55 +01:00
|
|
|
internal_error (__FILE__, __LINE__, _("No unwind_pc method"));
|
2003-04-09 22:49:22 +02:00
|
|
|
this_frame->prev_pc.value = pc;
|
|
|
|
this_frame->prev_pc.p = 1;
|
2003-04-10 17:32:27 +02:00
|
|
|
if (frame_debug)
|
|
|
|
fprintf_unfiltered (gdb_stdlog,
|
|
|
|
"{ frame_pc_unwind (this_frame=%d) -> 0x%s }\n",
|
|
|
|
this_frame->level,
|
|
|
|
paddr_nz (this_frame->prev_pc.value));
|
2002-11-15 23:16:25 +01:00
|
|
|
}
|
2003-04-09 22:49:22 +02:00
|
|
|
return this_frame->prev_pc.value;
|
2002-11-15 23:16:25 +01:00
|
|
|
}
|
|
|
|
|
2003-04-05 20:54:38 +02:00
|
|
|
CORE_ADDR
|
* dwarf2-frame.c (dwarf2_frame_cache, dwarf2_frame_this_id)
(dwarf2_frame_sniffer): Update.
(dwarf2_signal_frame_this_id): New function.
(dwarf2_signal_frame_unwind): Use it.
(dwarf2_frame_base_sniffer): Use frame_unwind_address_in_block.
* frame.c (frame_func_unwind): Add this_type argument.
(get_frame_func): Update.
(frame_unwind_address_in_block): Add this_type argument and check it.
Fix a typo.
(get_frame_address_in_block): Update.
* frame.h (enum frame_type): Move higher in the file.
(frame_unwind_address_in_block, frame_func_unwind): Add enum frame_type
argument.
* alpha-mdebug-tdep.c, alpha-tdep.c, amd64-tdep.c, amd64obsd-tdep.c,
arm-tdep.c, avr-tdep.c, cris-tdep.c, frv-tdep.c, h8300-tdep.c,
hppa-tdep.c, i386-tdep.c, i386obsd-tdep.c, ia64-tdep.c,
libunwind-frame.c, m32c-tdep.c, m32r-linux-tdep.c, m32r-tdep.c,
m68hc11-tdep.c, m68k-tdep.c, m88k-tdep.c, mips-mdebug-tdep.c,
mips-tdep.c, mn10300-tdep.c, mt-tdep.c, rs6000-tdep.c, s390-tdep.c,
score-tdep.c, sh-tdep.c, sh64-tdep.c, sparc-tdep.c,
sparc64obsd-tdep.c, spu-tdep.c, v850-tdep.c, vax-tdep.c,
xstormy16-tdep.c, xtensa-tdep.c: Update calls to
frame_func_unwind and frame_unwind_address_in_block to specify
the frame type. Use frame_unwind_address_in_block instead of
frame_pc_unwind in sniffers.
* gdb.arch/i386-signal.c, gdb.arch/i386-signal.exp: New files.
2007-02-27 21:17:19 +01:00
|
|
|
frame_func_unwind (struct frame_info *fi, enum frame_type this_type)
|
2003-04-05 20:54:38 +02:00
|
|
|
{
|
|
|
|
if (!fi->prev_func.p)
|
|
|
|
{
|
2003-08-04 17:42:43 +02:00
|
|
|
/* Make certain that this, and not the adjacent, function is
|
|
|
|
found. */
|
* dwarf2-frame.c (dwarf2_frame_cache, dwarf2_frame_this_id)
(dwarf2_frame_sniffer): Update.
(dwarf2_signal_frame_this_id): New function.
(dwarf2_signal_frame_unwind): Use it.
(dwarf2_frame_base_sniffer): Use frame_unwind_address_in_block.
* frame.c (frame_func_unwind): Add this_type argument.
(get_frame_func): Update.
(frame_unwind_address_in_block): Add this_type argument and check it.
Fix a typo.
(get_frame_address_in_block): Update.
* frame.h (enum frame_type): Move higher in the file.
(frame_unwind_address_in_block, frame_func_unwind): Add enum frame_type
argument.
* alpha-mdebug-tdep.c, alpha-tdep.c, amd64-tdep.c, amd64obsd-tdep.c,
arm-tdep.c, avr-tdep.c, cris-tdep.c, frv-tdep.c, h8300-tdep.c,
hppa-tdep.c, i386-tdep.c, i386obsd-tdep.c, ia64-tdep.c,
libunwind-frame.c, m32c-tdep.c, m32r-linux-tdep.c, m32r-tdep.c,
m68hc11-tdep.c, m68k-tdep.c, m88k-tdep.c, mips-mdebug-tdep.c,
mips-tdep.c, mn10300-tdep.c, mt-tdep.c, rs6000-tdep.c, s390-tdep.c,
score-tdep.c, sh-tdep.c, sh64-tdep.c, sparc-tdep.c,
sparc64obsd-tdep.c, spu-tdep.c, v850-tdep.c, vax-tdep.c,
xstormy16-tdep.c, xtensa-tdep.c: Update calls to
frame_func_unwind and frame_unwind_address_in_block to specify
the frame type. Use frame_unwind_address_in_block instead of
frame_pc_unwind in sniffers.
* gdb.arch/i386-signal.c, gdb.arch/i386-signal.exp: New files.
2007-02-27 21:17:19 +01:00
|
|
|
CORE_ADDR addr_in_block = frame_unwind_address_in_block (fi, this_type);
|
2003-04-05 20:54:38 +02:00
|
|
|
fi->prev_func.p = 1;
|
2003-08-04 17:42:43 +02:00
|
|
|
fi->prev_func.addr = get_pc_function_start (addr_in_block);
|
2003-04-10 17:32:27 +02:00
|
|
|
if (frame_debug)
|
|
|
|
fprintf_unfiltered (gdb_stdlog,
|
|
|
|
"{ frame_func_unwind (fi=%d) -> 0x%s }\n",
|
|
|
|
fi->level, paddr_nz (fi->prev_func.addr));
|
2003-04-05 20:54:38 +02:00
|
|
|
}
|
|
|
|
return fi->prev_func.addr;
|
|
|
|
}
|
|
|
|
|
|
|
|
CORE_ADDR
|
|
|
|
get_frame_func (struct frame_info *fi)
|
|
|
|
{
|
* dwarf2-frame.c (dwarf2_frame_cache, dwarf2_frame_this_id)
(dwarf2_frame_sniffer): Update.
(dwarf2_signal_frame_this_id): New function.
(dwarf2_signal_frame_unwind): Use it.
(dwarf2_frame_base_sniffer): Use frame_unwind_address_in_block.
* frame.c (frame_func_unwind): Add this_type argument.
(get_frame_func): Update.
(frame_unwind_address_in_block): Add this_type argument and check it.
Fix a typo.
(get_frame_address_in_block): Update.
* frame.h (enum frame_type): Move higher in the file.
(frame_unwind_address_in_block, frame_func_unwind): Add enum frame_type
argument.
* alpha-mdebug-tdep.c, alpha-tdep.c, amd64-tdep.c, amd64obsd-tdep.c,
arm-tdep.c, avr-tdep.c, cris-tdep.c, frv-tdep.c, h8300-tdep.c,
hppa-tdep.c, i386-tdep.c, i386obsd-tdep.c, ia64-tdep.c,
libunwind-frame.c, m32c-tdep.c, m32r-linux-tdep.c, m32r-tdep.c,
m68hc11-tdep.c, m68k-tdep.c, m88k-tdep.c, mips-mdebug-tdep.c,
mips-tdep.c, mn10300-tdep.c, mt-tdep.c, rs6000-tdep.c, s390-tdep.c,
score-tdep.c, sh-tdep.c, sh64-tdep.c, sparc-tdep.c,
sparc64obsd-tdep.c, spu-tdep.c, v850-tdep.c, vax-tdep.c,
xstormy16-tdep.c, xtensa-tdep.c: Update calls to
frame_func_unwind and frame_unwind_address_in_block to specify
the frame type. Use frame_unwind_address_in_block instead of
frame_pc_unwind in sniffers.
* gdb.arch/i386-signal.c, gdb.arch/i386-signal.exp: New files.
2007-02-27 21:17:19 +01:00
|
|
|
return frame_func_unwind (fi->next, get_frame_type (fi));
|
2003-04-05 20:54:38 +02:00
|
|
|
}
|
|
|
|
|
2003-03-12 16:39:30 +01:00
|
|
|
static int
|
2005-05-19 Andrew Cagney <cagney@gnu.org>
* regcache.h (regcache_raw_read, regcache_raw_write)
(regcache_raw_read_part, regcache_raw_write_part)
(regcache_cooked_read_part, regcache_cooked_write_part)
(regcache_cooked_read, regcache_cooked_write)
(regcache_raw_supply, regcache_raw_collect)
(regcache_cooked_read_ftype, regcache_save, regcache_restore)
(deprecated_read_register_gen, deprecated_write_register_gen)
(deprecated_read_register_bytes, deprecated_write_register_bytes)
(deprecated_grub_regcache_for_registers): Use gdb_byte for byte
buffer parameters.
* ia64-tdep.c (ia64_extract_return_value): Update.
* frame.c (do_frame_register_read): Update.
* regcache.c (deprecated_grub_regcache_for_registers)
(struct regcache, regcache_save, regcache_restore, regcache_cpy)
(do_cooked_read, regcache_xmalloc, register_buffer)
(deprecated_read_register_bytes, regcache_raw_read)
(regcache_raw_read_signed, regcache_raw_read_unsigned)
(deprecated_read_register_gen, regcache_cooked_read)
(regcache_cooked_read_signed, regcache_cooked_read_unsigned)
(deprecated_write_register_gen, regcache_cooked_write)
(deprecated_write_register_bytes, regcache_raw_read_part)
(regcache_raw_write_part, regcache_cooked_read_part)
(regcache_cooked_write_part, read_register, regcache_raw_supply):
2005-05-19 18:37:09 +02:00
|
|
|
do_frame_register_read (void *src, int regnum, gdb_byte *buf)
|
2003-03-12 16:39:30 +01:00
|
|
|
{
|
2004-08-02 05:36:24 +02:00
|
|
|
frame_register_read (src, regnum, buf);
|
2003-03-12 16:39:30 +01:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2004-08-02 05:36:24 +02:00
|
|
|
struct regcache *
|
|
|
|
frame_save_as_regcache (struct frame_info *this_frame)
|
|
|
|
{
|
2007-10-09 20:14:09 +02:00
|
|
|
struct regcache *regcache = regcache_xmalloc (get_frame_arch (this_frame));
|
2004-08-02 05:36:24 +02:00
|
|
|
struct cleanup *cleanups = make_cleanup_regcache_xfree (regcache);
|
|
|
|
regcache_save (regcache, do_frame_register_read, this_frame);
|
|
|
|
discard_cleanups (cleanups);
|
|
|
|
return regcache;
|
|
|
|
}
|
|
|
|
|
2003-01-19 18:39:16 +01:00
|
|
|
void
|
2003-03-12 16:39:30 +01:00
|
|
|
frame_pop (struct frame_info *this_frame)
|
|
|
|
{
|
2007-03-13 15:05:25 +01:00
|
|
|
struct frame_info *prev_frame;
|
|
|
|
struct regcache *scratch;
|
|
|
|
struct cleanup *cleanups;
|
|
|
|
|
|
|
|
/* Ensure that we have a frame to pop to. */
|
|
|
|
prev_frame = get_prev_frame_1 (this_frame);
|
|
|
|
|
|
|
|
if (!prev_frame)
|
|
|
|
error (_("Cannot pop the initial frame."));
|
|
|
|
|
2004-07-31 23:41:50 +02:00
|
|
|
/* Make a copy of all the register values unwound from this frame.
|
|
|
|
Save them in a scratch buffer so that there isn't a race between
|
2007-06-16 19:16:26 +02:00
|
|
|
trying to extract the old values from the current regcache while
|
2004-07-31 23:41:50 +02:00
|
|
|
at the same time writing new values into that same cache. */
|
2007-03-13 15:05:25 +01:00
|
|
|
scratch = frame_save_as_regcache (prev_frame);
|
|
|
|
cleanups = make_cleanup_regcache_xfree (scratch);
|
2004-07-31 23:41:50 +02:00
|
|
|
|
|
|
|
/* FIXME: cagney/2003-03-16: It should be possible to tell the
|
|
|
|
target's register cache that it is about to be hit with a burst
|
|
|
|
register transfer and that the sequence of register writes should
|
|
|
|
be batched. The pair target_prepare_to_store() and
|
|
|
|
target_store_registers() kind of suggest this functionality.
|
|
|
|
Unfortunately, they don't implement it. Their lack of a formal
|
|
|
|
definition can lead to targets writing back bogus values
|
|
|
|
(arguably a bug in the target code mind). */
|
|
|
|
/* Now copy those saved registers into the current regcache.
|
|
|
|
Here, regcache_cpy() calls regcache_restore(). */
|
2007-06-16 19:16:26 +02:00
|
|
|
regcache_cpy (get_current_regcache (), scratch);
|
2004-07-31 23:41:50 +02:00
|
|
|
do_cleanups (cleanups);
|
2003-03-12 16:39:30 +01:00
|
|
|
|
|
|
|
/* We've made right mess of GDB's local state, just discard
|
|
|
|
everything. */
|
2007-02-28 18:35:01 +01:00
|
|
|
reinit_frame_cache ();
|
2003-01-19 18:39:16 +01:00
|
|
|
}
|
2002-12-13 17:40:25 +01:00
|
|
|
|
2002-06-01 22:44:21 +02:00
|
|
|
void
|
|
|
|
frame_register_unwind (struct frame_info *frame, int regnum,
|
|
|
|
int *optimizedp, enum lval_type *lvalp,
|
2005-05-22 Andrew Cagney <cagney@gnu.org>
* frame.h (frame_register_unwind, frame_unwind_register)
(get_frame_register, frame_register, put_frame_register)
(get_frame_memory, safe_frame_unwind_memory)
(frame_register_read): Use gdb_byte for byte buffer parameters.
* trad-frame.h (trad_frame_get_register)
(frame_get_prev_register): Ditto.
* frame-unwind.h (frame_prev_register_ftype): Ditto.
* frame.c (frame_pop, frame_register, frame_unwind_register)
(get_frame_register, frame_unwind_register_signed)
(frame_unwind_register_unsigned, frame_unwind_unsigned_register)
(frame_register_read, get_frame_memory): Update.
* trad-frame.c (trad_frame_get_prev_register): Update.
(trad_frame_get_register): Update.
* gdbcore.h (deprecated_read_memory_nobpt, read_memory): Ditto.
* breakpoint.c (deprecated_read_memory_nobpt): Update.
* corefile.c (read_memory): Update.
* tramp-frame.c (tramp_frame_prev_register): Update.
* valops.c (value_assign): Update.
* sentinel-frame.c (sentinel_frame_prev_register): Update.
* std-regs.c (value_of_builtin_frame_fp_reg)
(value_of_builtin_frame_pc_reg): Update.
* infcmd.c (default_print_registers_info): Update
* dummy-frame.c (dummy_frame_prev_register): Update.
* findvar.c (value_of_register, value_from_register): Update.
* tui/tui-regs.c (tui_register_format, tui_get_register): Update.
* mi/mi-main.c (register_changed_p, get_register): Update.
2005-05-22 16:53:35 +02:00
|
|
|
CORE_ADDR *addrp, int *realnump, gdb_byte *bufferp)
|
2002-06-01 22:44:21 +02:00
|
|
|
{
|
|
|
|
struct frame_unwind_cache *cache;
|
|
|
|
|
2003-04-10 17:32:27 +02:00
|
|
|
if (frame_debug)
|
|
|
|
{
|
2004-02-09 05:10:58 +01:00
|
|
|
fprintf_unfiltered (gdb_stdlog, "\
|
|
|
|
{ frame_register_unwind (frame=%d,regnum=%d(%s),...) ",
|
|
|
|
frame->level, regnum,
|
|
|
|
frame_map_regnum_to_name (frame, regnum));
|
2003-04-10 17:32:27 +02:00
|
|
|
}
|
|
|
|
|
2002-06-01 22:44:21 +02:00
|
|
|
/* Require all but BUFFERP to be valid. A NULL BUFFERP indicates
|
|
|
|
that the value proper does not need to be fetched. */
|
|
|
|
gdb_assert (optimizedp != NULL);
|
|
|
|
gdb_assert (lvalp != NULL);
|
|
|
|
gdb_assert (addrp != NULL);
|
|
|
|
gdb_assert (realnump != NULL);
|
|
|
|
/* gdb_assert (bufferp != NULL); */
|
|
|
|
|
2003-01-27 22:41:41 +01:00
|
|
|
/* NOTE: cagney/2002-11-27: A program trying to unwind a NULL frame
|
|
|
|
is broken. There is always a frame. If there, for some reason,
|
2004-04-17 02:48:25 +02:00
|
|
|
isn't a frame, there is some pretty busted code as it should have
|
2003-01-27 22:41:41 +01:00
|
|
|
detected the problem before calling here. */
|
|
|
|
gdb_assert (frame != NULL);
|
2002-06-01 22:44:21 +02:00
|
|
|
|
2003-04-16 16:39:47 +02:00
|
|
|
/* Find the unwinder. */
|
|
|
|
if (frame->unwind == NULL)
|
2004-07-31 23:41:50 +02:00
|
|
|
frame->unwind = frame_unwind_find_by_frame (frame->next,
|
|
|
|
&frame->prologue_cache);
|
2003-04-16 16:39:47 +02:00
|
|
|
|
2003-03-17 15:23:50 +01:00
|
|
|
/* Ask this frame to unwind its register. See comment in
|
2004-04-17 02:48:25 +02:00
|
|
|
"frame-unwind.h" for why NEXT frame and this unwind cache are
|
2003-03-17 15:23:50 +01:00
|
|
|
passed in. */
|
|
|
|
frame->unwind->prev_register (frame->next, &frame->prologue_cache, regnum,
|
|
|
|
optimizedp, lvalp, addrp, realnump, bufferp);
|
|
|
|
|
2003-04-10 17:32:27 +02:00
|
|
|
if (frame_debug)
|
|
|
|
{
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "->");
|
|
|
|
fprintf_unfiltered (gdb_stdlog, " *optimizedp=%d", (*optimizedp));
|
|
|
|
fprintf_unfiltered (gdb_stdlog, " *lvalp=%d", (int) (*lvalp));
|
|
|
|
fprintf_unfiltered (gdb_stdlog, " *addrp=0x%s", paddr_nz ((*addrp)));
|
|
|
|
fprintf_unfiltered (gdb_stdlog, " *bufferp=");
|
|
|
|
if (bufferp == NULL)
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "<NULL>");
|
|
|
|
else
|
|
|
|
{
|
|
|
|
int i;
|
2003-06-29 15:27:26 +02:00
|
|
|
const unsigned char *buf = bufferp;
|
2003-04-10 17:32:27 +02:00
|
|
|
fprintf_unfiltered (gdb_stdlog, "[");
|
2007-10-09 20:14:09 +02:00
|
|
|
for (i = 0; i < register_size (get_frame_arch (frame), regnum); i++)
|
2003-04-10 17:32:27 +02:00
|
|
|
fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]);
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "]");
|
|
|
|
}
|
|
|
|
fprintf_unfiltered (gdb_stdlog, " }\n");
|
|
|
|
}
|
2002-06-01 22:44:21 +02:00
|
|
|
}
|
|
|
|
|
2002-11-05 22:44:05 +01:00
|
|
|
void
|
|
|
|
frame_register (struct frame_info *frame, int regnum,
|
|
|
|
int *optimizedp, enum lval_type *lvalp,
|
2005-05-22 Andrew Cagney <cagney@gnu.org>
* frame.h (frame_register_unwind, frame_unwind_register)
(get_frame_register, frame_register, put_frame_register)
(get_frame_memory, safe_frame_unwind_memory)
(frame_register_read): Use gdb_byte for byte buffer parameters.
* trad-frame.h (trad_frame_get_register)
(frame_get_prev_register): Ditto.
* frame-unwind.h (frame_prev_register_ftype): Ditto.
* frame.c (frame_pop, frame_register, frame_unwind_register)
(get_frame_register, frame_unwind_register_signed)
(frame_unwind_register_unsigned, frame_unwind_unsigned_register)
(frame_register_read, get_frame_memory): Update.
* trad-frame.c (trad_frame_get_prev_register): Update.
(trad_frame_get_register): Update.
* gdbcore.h (deprecated_read_memory_nobpt, read_memory): Ditto.
* breakpoint.c (deprecated_read_memory_nobpt): Update.
* corefile.c (read_memory): Update.
* tramp-frame.c (tramp_frame_prev_register): Update.
* valops.c (value_assign): Update.
* sentinel-frame.c (sentinel_frame_prev_register): Update.
* std-regs.c (value_of_builtin_frame_fp_reg)
(value_of_builtin_frame_pc_reg): Update.
* infcmd.c (default_print_registers_info): Update
* dummy-frame.c (dummy_frame_prev_register): Update.
* findvar.c (value_of_register, value_from_register): Update.
* tui/tui-regs.c (tui_register_format, tui_get_register): Update.
* mi/mi-main.c (register_changed_p, get_register): Update.
2005-05-22 16:53:35 +02:00
|
|
|
CORE_ADDR *addrp, int *realnump, gdb_byte *bufferp)
|
2002-11-05 22:44:05 +01:00
|
|
|
{
|
|
|
|
/* Require all but BUFFERP to be valid. A NULL BUFFERP indicates
|
|
|
|
that the value proper does not need to be fetched. */
|
|
|
|
gdb_assert (optimizedp != NULL);
|
|
|
|
gdb_assert (lvalp != NULL);
|
|
|
|
gdb_assert (addrp != NULL);
|
|
|
|
gdb_assert (realnump != NULL);
|
|
|
|
/* gdb_assert (bufferp != NULL); */
|
|
|
|
|
2003-01-27 22:41:41 +01:00
|
|
|
/* Obtain the register value by unwinding the register from the next
|
|
|
|
(more inner frame). */
|
|
|
|
gdb_assert (frame != NULL && frame->next != NULL);
|
|
|
|
frame_register_unwind (frame->next, regnum, optimizedp, lvalp, addrp,
|
|
|
|
realnump, bufferp);
|
2002-11-05 22:44:05 +01:00
|
|
|
}
|
|
|
|
|
2002-09-17 22:42:01 +02:00
|
|
|
void
|
2005-05-22 Andrew Cagney <cagney@gnu.org>
* frame.h (frame_register_unwind, frame_unwind_register)
(get_frame_register, frame_register, put_frame_register)
(get_frame_memory, safe_frame_unwind_memory)
(frame_register_read): Use gdb_byte for byte buffer parameters.
* trad-frame.h (trad_frame_get_register)
(frame_get_prev_register): Ditto.
* frame-unwind.h (frame_prev_register_ftype): Ditto.
* frame.c (frame_pop, frame_register, frame_unwind_register)
(get_frame_register, frame_unwind_register_signed)
(frame_unwind_register_unsigned, frame_unwind_unsigned_register)
(frame_register_read, get_frame_memory): Update.
* trad-frame.c (trad_frame_get_prev_register): Update.
(trad_frame_get_register): Update.
* gdbcore.h (deprecated_read_memory_nobpt, read_memory): Ditto.
* breakpoint.c (deprecated_read_memory_nobpt): Update.
* corefile.c (read_memory): Update.
* tramp-frame.c (tramp_frame_prev_register): Update.
* valops.c (value_assign): Update.
* sentinel-frame.c (sentinel_frame_prev_register): Update.
* std-regs.c (value_of_builtin_frame_fp_reg)
(value_of_builtin_frame_pc_reg): Update.
* infcmd.c (default_print_registers_info): Update
* dummy-frame.c (dummy_frame_prev_register): Update.
* findvar.c (value_of_register, value_from_register): Update.
* tui/tui-regs.c (tui_register_format, tui_get_register): Update.
* mi/mi-main.c (register_changed_p, get_register): Update.
2005-05-22 16:53:35 +02:00
|
|
|
frame_unwind_register (struct frame_info *frame, int regnum, gdb_byte *buf)
|
2002-09-17 22:42:01 +02:00
|
|
|
{
|
|
|
|
int optimized;
|
|
|
|
CORE_ADDR addr;
|
|
|
|
int realnum;
|
|
|
|
enum lval_type lval;
|
|
|
|
frame_register_unwind (frame, regnum, &optimized, &lval, &addr,
|
|
|
|
&realnum, buf);
|
2003-02-02 21:31:43 +01:00
|
|
|
}
|
|
|
|
|
2003-06-21 18:26:02 +02:00
|
|
|
void
|
|
|
|
get_frame_register (struct frame_info *frame,
|
2005-05-22 Andrew Cagney <cagney@gnu.org>
* frame.h (frame_register_unwind, frame_unwind_register)
(get_frame_register, frame_register, put_frame_register)
(get_frame_memory, safe_frame_unwind_memory)
(frame_register_read): Use gdb_byte for byte buffer parameters.
* trad-frame.h (trad_frame_get_register)
(frame_get_prev_register): Ditto.
* frame-unwind.h (frame_prev_register_ftype): Ditto.
* frame.c (frame_pop, frame_register, frame_unwind_register)
(get_frame_register, frame_unwind_register_signed)
(frame_unwind_register_unsigned, frame_unwind_unsigned_register)
(frame_register_read, get_frame_memory): Update.
* trad-frame.c (trad_frame_get_prev_register): Update.
(trad_frame_get_register): Update.
* gdbcore.h (deprecated_read_memory_nobpt, read_memory): Ditto.
* breakpoint.c (deprecated_read_memory_nobpt): Update.
* corefile.c (read_memory): Update.
* tramp-frame.c (tramp_frame_prev_register): Update.
* valops.c (value_assign): Update.
* sentinel-frame.c (sentinel_frame_prev_register): Update.
* std-regs.c (value_of_builtin_frame_fp_reg)
(value_of_builtin_frame_pc_reg): Update.
* infcmd.c (default_print_registers_info): Update
* dummy-frame.c (dummy_frame_prev_register): Update.
* findvar.c (value_of_register, value_from_register): Update.
* tui/tui-regs.c (tui_register_format, tui_get_register): Update.
* mi/mi-main.c (register_changed_p, get_register): Update.
2005-05-22 16:53:35 +02:00
|
|
|
int regnum, gdb_byte *buf)
|
2003-06-21 18:26:02 +02:00
|
|
|
{
|
|
|
|
frame_unwind_register (frame->next, regnum, buf);
|
|
|
|
}
|
|
|
|
|
|
|
|
LONGEST
|
|
|
|
frame_unwind_register_signed (struct frame_info *frame, int regnum)
|
|
|
|
{
|
2005-05-22 Andrew Cagney <cagney@gnu.org>
* frame.h (frame_register_unwind, frame_unwind_register)
(get_frame_register, frame_register, put_frame_register)
(get_frame_memory, safe_frame_unwind_memory)
(frame_register_read): Use gdb_byte for byte buffer parameters.
* trad-frame.h (trad_frame_get_register)
(frame_get_prev_register): Ditto.
* frame-unwind.h (frame_prev_register_ftype): Ditto.
* frame.c (frame_pop, frame_register, frame_unwind_register)
(get_frame_register, frame_unwind_register_signed)
(frame_unwind_register_unsigned, frame_unwind_unsigned_register)
(frame_register_read, get_frame_memory): Update.
* trad-frame.c (trad_frame_get_prev_register): Update.
(trad_frame_get_register): Update.
* gdbcore.h (deprecated_read_memory_nobpt, read_memory): Ditto.
* breakpoint.c (deprecated_read_memory_nobpt): Update.
* corefile.c (read_memory): Update.
* tramp-frame.c (tramp_frame_prev_register): Update.
* valops.c (value_assign): Update.
* sentinel-frame.c (sentinel_frame_prev_register): Update.
* std-regs.c (value_of_builtin_frame_fp_reg)
(value_of_builtin_frame_pc_reg): Update.
* infcmd.c (default_print_registers_info): Update
* dummy-frame.c (dummy_frame_prev_register): Update.
* findvar.c (value_of_register, value_from_register): Update.
* tui/tui-regs.c (tui_register_format, tui_get_register): Update.
* mi/mi-main.c (register_changed_p, get_register): Update.
2005-05-22 16:53:35 +02:00
|
|
|
gdb_byte buf[MAX_REGISTER_SIZE];
|
2003-06-21 18:26:02 +02:00
|
|
|
frame_unwind_register (frame, regnum, buf);
|
2004-08-01 23:47:19 +02:00
|
|
|
return extract_signed_integer (buf, register_size (get_frame_arch (frame),
|
|
|
|
regnum));
|
2003-06-21 18:26:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
LONGEST
|
|
|
|
get_frame_register_signed (struct frame_info *frame, int regnum)
|
|
|
|
{
|
|
|
|
return frame_unwind_register_signed (frame->next, regnum);
|
|
|
|
}
|
|
|
|
|
|
|
|
ULONGEST
|
|
|
|
frame_unwind_register_unsigned (struct frame_info *frame, int regnum)
|
|
|
|
{
|
2005-05-22 Andrew Cagney <cagney@gnu.org>
* frame.h (frame_register_unwind, frame_unwind_register)
(get_frame_register, frame_register, put_frame_register)
(get_frame_memory, safe_frame_unwind_memory)
(frame_register_read): Use gdb_byte for byte buffer parameters.
* trad-frame.h (trad_frame_get_register)
(frame_get_prev_register): Ditto.
* frame-unwind.h (frame_prev_register_ftype): Ditto.
* frame.c (frame_pop, frame_register, frame_unwind_register)
(get_frame_register, frame_unwind_register_signed)
(frame_unwind_register_unsigned, frame_unwind_unsigned_register)
(frame_register_read, get_frame_memory): Update.
* trad-frame.c (trad_frame_get_prev_register): Update.
(trad_frame_get_register): Update.
* gdbcore.h (deprecated_read_memory_nobpt, read_memory): Ditto.
* breakpoint.c (deprecated_read_memory_nobpt): Update.
* corefile.c (read_memory): Update.
* tramp-frame.c (tramp_frame_prev_register): Update.
* valops.c (value_assign): Update.
* sentinel-frame.c (sentinel_frame_prev_register): Update.
* std-regs.c (value_of_builtin_frame_fp_reg)
(value_of_builtin_frame_pc_reg): Update.
* infcmd.c (default_print_registers_info): Update
* dummy-frame.c (dummy_frame_prev_register): Update.
* findvar.c (value_of_register, value_from_register): Update.
* tui/tui-regs.c (tui_register_format, tui_get_register): Update.
* mi/mi-main.c (register_changed_p, get_register): Update.
2005-05-22 16:53:35 +02:00
|
|
|
gdb_byte buf[MAX_REGISTER_SIZE];
|
2003-06-21 18:26:02 +02:00
|
|
|
frame_unwind_register (frame, regnum, buf);
|
2004-08-01 23:47:19 +02:00
|
|
|
return extract_unsigned_integer (buf, register_size (get_frame_arch (frame),
|
|
|
|
regnum));
|
2003-06-21 18:26:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ULONGEST
|
|
|
|
get_frame_register_unsigned (struct frame_info *frame, int regnum)
|
|
|
|
{
|
|
|
|
return frame_unwind_register_unsigned (frame->next, regnum);
|
|
|
|
}
|
|
|
|
|
2003-06-14 Andrew Cagney <cagney@redhat.com>
Mark Kettenis <kettenis@gnu.org>
* gdbarch.sh (CONVERT_REGISTER_P): Add "type" parameter.
(REGISTER_TO_VALUE, VALUE_TO_REGISTER): Replace raw buffer
parameter with "frame".
* gdbarch.h, gdbarch.c: Re-generate.
* frame.h (put_frame_register): Declare.
* frame.c (put_frame_register): New function.
* arch-utils.c (legacy_convert_register_p): Add "type" parameter.
(legacy_register_to_value): Rewrite, use "frame" to get the
register value.
(legacy_value_to_register): Rewrite, use "frame" to find the
register's location before storing.
* arch-utils.h (legacy_convert_register_p): Update.
(legacy_register_to_value, legacy_value_to_register): Update.
* findvar.c (value_from_register): Rewrite, eliminate use of
REGISTER_CONVERT_TO_TYPE, pass "type" to CONVERT_REGISTER_P, pass
"frame" to REGISTER_TO_VALUE.
* valops.c (value_assign): Move the CONVERT_REGISTER code to the
lval_reg_frame_relative + lval_register branch of the switch. Do
not use REGISTER_CONVERT_FROM_TYPE. Use put_frame_register.
* i386-tdep.c (I386_EBX_REGNUM, I386_ECX_REGNUM, I386_ESI_REGNUM,
I386_EDI_REGNUM): New defines.
(i386_next_regnum, i386_convert_register_p,
i386_register_to_value, i386_value_to_register): New functions.
(i386_register_convertible, i386_register_convert_to_virtual,
i386_convert_to_raw): Remove functions.
(i386_gdbarch_init): Set convert_register_p, register_to_value and
value_to_register instead of register_convertible,
register_convert_to_virtual and register_convert_to_raw.
* mips-tdep.c (mips_convert_register_p): New function.
(mips_value_to_register): Replace mips_register_convert_from_type.
(mips_register_to_value): Replace mips_register_convert_to_type.
(mips_gdbarch_init): Set conver_register_p, value_to_register and
register_to_value.
* alpha-tdep.c (alpha_convert_register_p): Update.
(alpha_value_to_register): Update, store the register.
(alpha_register_to_value): Update, fetch the register.
2003-06-15 00:35:25 +02:00
|
|
|
void
|
2005-05-22 Andrew Cagney <cagney@gnu.org>
* frame.h (frame_register_unwind, frame_unwind_register)
(get_frame_register, frame_register, put_frame_register)
(get_frame_memory, safe_frame_unwind_memory)
(frame_register_read): Use gdb_byte for byte buffer parameters.
* trad-frame.h (trad_frame_get_register)
(frame_get_prev_register): Ditto.
* frame-unwind.h (frame_prev_register_ftype): Ditto.
* frame.c (frame_pop, frame_register, frame_unwind_register)
(get_frame_register, frame_unwind_register_signed)
(frame_unwind_register_unsigned, frame_unwind_unsigned_register)
(frame_register_read, get_frame_memory): Update.
* trad-frame.c (trad_frame_get_prev_register): Update.
(trad_frame_get_register): Update.
* gdbcore.h (deprecated_read_memory_nobpt, read_memory): Ditto.
* breakpoint.c (deprecated_read_memory_nobpt): Update.
* corefile.c (read_memory): Update.
* tramp-frame.c (tramp_frame_prev_register): Update.
* valops.c (value_assign): Update.
* sentinel-frame.c (sentinel_frame_prev_register): Update.
* std-regs.c (value_of_builtin_frame_fp_reg)
(value_of_builtin_frame_pc_reg): Update.
* infcmd.c (default_print_registers_info): Update
* dummy-frame.c (dummy_frame_prev_register): Update.
* findvar.c (value_of_register, value_from_register): Update.
* tui/tui-regs.c (tui_register_format, tui_get_register): Update.
* mi/mi-main.c (register_changed_p, get_register): Update.
2005-05-22 16:53:35 +02:00
|
|
|
put_frame_register (struct frame_info *frame, int regnum,
|
|
|
|
const gdb_byte *buf)
|
2003-06-14 Andrew Cagney <cagney@redhat.com>
Mark Kettenis <kettenis@gnu.org>
* gdbarch.sh (CONVERT_REGISTER_P): Add "type" parameter.
(REGISTER_TO_VALUE, VALUE_TO_REGISTER): Replace raw buffer
parameter with "frame".
* gdbarch.h, gdbarch.c: Re-generate.
* frame.h (put_frame_register): Declare.
* frame.c (put_frame_register): New function.
* arch-utils.c (legacy_convert_register_p): Add "type" parameter.
(legacy_register_to_value): Rewrite, use "frame" to get the
register value.
(legacy_value_to_register): Rewrite, use "frame" to find the
register's location before storing.
* arch-utils.h (legacy_convert_register_p): Update.
(legacy_register_to_value, legacy_value_to_register): Update.
* findvar.c (value_from_register): Rewrite, eliminate use of
REGISTER_CONVERT_TO_TYPE, pass "type" to CONVERT_REGISTER_P, pass
"frame" to REGISTER_TO_VALUE.
* valops.c (value_assign): Move the CONVERT_REGISTER code to the
lval_reg_frame_relative + lval_register branch of the switch. Do
not use REGISTER_CONVERT_FROM_TYPE. Use put_frame_register.
* i386-tdep.c (I386_EBX_REGNUM, I386_ECX_REGNUM, I386_ESI_REGNUM,
I386_EDI_REGNUM): New defines.
(i386_next_regnum, i386_convert_register_p,
i386_register_to_value, i386_value_to_register): New functions.
(i386_register_convertible, i386_register_convert_to_virtual,
i386_convert_to_raw): Remove functions.
(i386_gdbarch_init): Set convert_register_p, register_to_value and
value_to_register instead of register_convertible,
register_convert_to_virtual and register_convert_to_raw.
* mips-tdep.c (mips_convert_register_p): New function.
(mips_value_to_register): Replace mips_register_convert_from_type.
(mips_register_to_value): Replace mips_register_convert_to_type.
(mips_gdbarch_init): Set conver_register_p, value_to_register and
register_to_value.
* alpha-tdep.c (alpha_convert_register_p): Update.
(alpha_value_to_register): Update, store the register.
(alpha_register_to_value): Update, fetch the register.
2003-06-15 00:35:25 +02:00
|
|
|
{
|
|
|
|
struct gdbarch *gdbarch = get_frame_arch (frame);
|
|
|
|
int realnum;
|
|
|
|
int optim;
|
|
|
|
enum lval_type lval;
|
|
|
|
CORE_ADDR addr;
|
|
|
|
frame_register (frame, regnum, &optim, &lval, &addr, &realnum, NULL);
|
|
|
|
if (optim)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
error (_("Attempt to assign to a value that was optimized out."));
|
2003-06-14 Andrew Cagney <cagney@redhat.com>
Mark Kettenis <kettenis@gnu.org>
* gdbarch.sh (CONVERT_REGISTER_P): Add "type" parameter.
(REGISTER_TO_VALUE, VALUE_TO_REGISTER): Replace raw buffer
parameter with "frame".
* gdbarch.h, gdbarch.c: Re-generate.
* frame.h (put_frame_register): Declare.
* frame.c (put_frame_register): New function.
* arch-utils.c (legacy_convert_register_p): Add "type" parameter.
(legacy_register_to_value): Rewrite, use "frame" to get the
register value.
(legacy_value_to_register): Rewrite, use "frame" to find the
register's location before storing.
* arch-utils.h (legacy_convert_register_p): Update.
(legacy_register_to_value, legacy_value_to_register): Update.
* findvar.c (value_from_register): Rewrite, eliminate use of
REGISTER_CONVERT_TO_TYPE, pass "type" to CONVERT_REGISTER_P, pass
"frame" to REGISTER_TO_VALUE.
* valops.c (value_assign): Move the CONVERT_REGISTER code to the
lval_reg_frame_relative + lval_register branch of the switch. Do
not use REGISTER_CONVERT_FROM_TYPE. Use put_frame_register.
* i386-tdep.c (I386_EBX_REGNUM, I386_ECX_REGNUM, I386_ESI_REGNUM,
I386_EDI_REGNUM): New defines.
(i386_next_regnum, i386_convert_register_p,
i386_register_to_value, i386_value_to_register): New functions.
(i386_register_convertible, i386_register_convert_to_virtual,
i386_convert_to_raw): Remove functions.
(i386_gdbarch_init): Set convert_register_p, register_to_value and
value_to_register instead of register_convertible,
register_convert_to_virtual and register_convert_to_raw.
* mips-tdep.c (mips_convert_register_p): New function.
(mips_value_to_register): Replace mips_register_convert_from_type.
(mips_register_to_value): Replace mips_register_convert_to_type.
(mips_gdbarch_init): Set conver_register_p, value_to_register and
register_to_value.
* alpha-tdep.c (alpha_convert_register_p): Update.
(alpha_value_to_register): Update, store the register.
(alpha_register_to_value): Update, fetch the register.
2003-06-15 00:35:25 +02:00
|
|
|
switch (lval)
|
|
|
|
{
|
|
|
|
case lval_memory:
|
|
|
|
{
|
|
|
|
/* FIXME: write_memory doesn't yet take constant buffers.
|
|
|
|
Arrrg! */
|
2005-05-22 Andrew Cagney <cagney@gnu.org>
* frame.h (frame_register_unwind, frame_unwind_register)
(get_frame_register, frame_register, put_frame_register)
(get_frame_memory, safe_frame_unwind_memory)
(frame_register_read): Use gdb_byte for byte buffer parameters.
* trad-frame.h (trad_frame_get_register)
(frame_get_prev_register): Ditto.
* frame-unwind.h (frame_prev_register_ftype): Ditto.
* frame.c (frame_pop, frame_register, frame_unwind_register)
(get_frame_register, frame_unwind_register_signed)
(frame_unwind_register_unsigned, frame_unwind_unsigned_register)
(frame_register_read, get_frame_memory): Update.
* trad-frame.c (trad_frame_get_prev_register): Update.
(trad_frame_get_register): Update.
* gdbcore.h (deprecated_read_memory_nobpt, read_memory): Ditto.
* breakpoint.c (deprecated_read_memory_nobpt): Update.
* corefile.c (read_memory): Update.
* tramp-frame.c (tramp_frame_prev_register): Update.
* valops.c (value_assign): Update.
* sentinel-frame.c (sentinel_frame_prev_register): Update.
* std-regs.c (value_of_builtin_frame_fp_reg)
(value_of_builtin_frame_pc_reg): Update.
* infcmd.c (default_print_registers_info): Update
* dummy-frame.c (dummy_frame_prev_register): Update.
* findvar.c (value_of_register, value_from_register): Update.
* tui/tui-regs.c (tui_register_format, tui_get_register): Update.
* mi/mi-main.c (register_changed_p, get_register): Update.
2005-05-22 16:53:35 +02:00
|
|
|
gdb_byte tmp[MAX_REGISTER_SIZE];
|
2003-06-14 Andrew Cagney <cagney@redhat.com>
Mark Kettenis <kettenis@gnu.org>
* gdbarch.sh (CONVERT_REGISTER_P): Add "type" parameter.
(REGISTER_TO_VALUE, VALUE_TO_REGISTER): Replace raw buffer
parameter with "frame".
* gdbarch.h, gdbarch.c: Re-generate.
* frame.h (put_frame_register): Declare.
* frame.c (put_frame_register): New function.
* arch-utils.c (legacy_convert_register_p): Add "type" parameter.
(legacy_register_to_value): Rewrite, use "frame" to get the
register value.
(legacy_value_to_register): Rewrite, use "frame" to find the
register's location before storing.
* arch-utils.h (legacy_convert_register_p): Update.
(legacy_register_to_value, legacy_value_to_register): Update.
* findvar.c (value_from_register): Rewrite, eliminate use of
REGISTER_CONVERT_TO_TYPE, pass "type" to CONVERT_REGISTER_P, pass
"frame" to REGISTER_TO_VALUE.
* valops.c (value_assign): Move the CONVERT_REGISTER code to the
lval_reg_frame_relative + lval_register branch of the switch. Do
not use REGISTER_CONVERT_FROM_TYPE. Use put_frame_register.
* i386-tdep.c (I386_EBX_REGNUM, I386_ECX_REGNUM, I386_ESI_REGNUM,
I386_EDI_REGNUM): New defines.
(i386_next_regnum, i386_convert_register_p,
i386_register_to_value, i386_value_to_register): New functions.
(i386_register_convertible, i386_register_convert_to_virtual,
i386_convert_to_raw): Remove functions.
(i386_gdbarch_init): Set convert_register_p, register_to_value and
value_to_register instead of register_convertible,
register_convert_to_virtual and register_convert_to_raw.
* mips-tdep.c (mips_convert_register_p): New function.
(mips_value_to_register): Replace mips_register_convert_from_type.
(mips_register_to_value): Replace mips_register_convert_to_type.
(mips_gdbarch_init): Set conver_register_p, value_to_register and
register_to_value.
* alpha-tdep.c (alpha_convert_register_p): Update.
(alpha_value_to_register): Update, store the register.
(alpha_register_to_value): Update, fetch the register.
2003-06-15 00:35:25 +02:00
|
|
|
memcpy (tmp, buf, register_size (gdbarch, regnum));
|
|
|
|
write_memory (addr, tmp, register_size (gdbarch, regnum));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case lval_register:
|
2007-06-16 19:16:26 +02:00
|
|
|
regcache_cooked_write (get_current_regcache (), realnum, buf);
|
2003-06-14 Andrew Cagney <cagney@redhat.com>
Mark Kettenis <kettenis@gnu.org>
* gdbarch.sh (CONVERT_REGISTER_P): Add "type" parameter.
(REGISTER_TO_VALUE, VALUE_TO_REGISTER): Replace raw buffer
parameter with "frame".
* gdbarch.h, gdbarch.c: Re-generate.
* frame.h (put_frame_register): Declare.
* frame.c (put_frame_register): New function.
* arch-utils.c (legacy_convert_register_p): Add "type" parameter.
(legacy_register_to_value): Rewrite, use "frame" to get the
register value.
(legacy_value_to_register): Rewrite, use "frame" to find the
register's location before storing.
* arch-utils.h (legacy_convert_register_p): Update.
(legacy_register_to_value, legacy_value_to_register): Update.
* findvar.c (value_from_register): Rewrite, eliminate use of
REGISTER_CONVERT_TO_TYPE, pass "type" to CONVERT_REGISTER_P, pass
"frame" to REGISTER_TO_VALUE.
* valops.c (value_assign): Move the CONVERT_REGISTER code to the
lval_reg_frame_relative + lval_register branch of the switch. Do
not use REGISTER_CONVERT_FROM_TYPE. Use put_frame_register.
* i386-tdep.c (I386_EBX_REGNUM, I386_ECX_REGNUM, I386_ESI_REGNUM,
I386_EDI_REGNUM): New defines.
(i386_next_regnum, i386_convert_register_p,
i386_register_to_value, i386_value_to_register): New functions.
(i386_register_convertible, i386_register_convert_to_virtual,
i386_convert_to_raw): Remove functions.
(i386_gdbarch_init): Set convert_register_p, register_to_value and
value_to_register instead of register_convertible,
register_convert_to_virtual and register_convert_to_raw.
* mips-tdep.c (mips_convert_register_p): New function.
(mips_value_to_register): Replace mips_register_convert_from_type.
(mips_register_to_value): Replace mips_register_convert_to_type.
(mips_gdbarch_init): Set conver_register_p, value_to_register and
register_to_value.
* alpha-tdep.c (alpha_convert_register_p): Update.
(alpha_value_to_register): Update, store the register.
(alpha_register_to_value): Update, fetch the register.
2003-06-15 00:35:25 +02:00
|
|
|
break;
|
|
|
|
default:
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
error (_("Attempt to assign to an unmodifiable value."));
|
2003-06-14 Andrew Cagney <cagney@redhat.com>
Mark Kettenis <kettenis@gnu.org>
* gdbarch.sh (CONVERT_REGISTER_P): Add "type" parameter.
(REGISTER_TO_VALUE, VALUE_TO_REGISTER): Replace raw buffer
parameter with "frame".
* gdbarch.h, gdbarch.c: Re-generate.
* frame.h (put_frame_register): Declare.
* frame.c (put_frame_register): New function.
* arch-utils.c (legacy_convert_register_p): Add "type" parameter.
(legacy_register_to_value): Rewrite, use "frame" to get the
register value.
(legacy_value_to_register): Rewrite, use "frame" to find the
register's location before storing.
* arch-utils.h (legacy_convert_register_p): Update.
(legacy_register_to_value, legacy_value_to_register): Update.
* findvar.c (value_from_register): Rewrite, eliminate use of
REGISTER_CONVERT_TO_TYPE, pass "type" to CONVERT_REGISTER_P, pass
"frame" to REGISTER_TO_VALUE.
* valops.c (value_assign): Move the CONVERT_REGISTER code to the
lval_reg_frame_relative + lval_register branch of the switch. Do
not use REGISTER_CONVERT_FROM_TYPE. Use put_frame_register.
* i386-tdep.c (I386_EBX_REGNUM, I386_ECX_REGNUM, I386_ESI_REGNUM,
I386_EDI_REGNUM): New defines.
(i386_next_regnum, i386_convert_register_p,
i386_register_to_value, i386_value_to_register): New functions.
(i386_register_convertible, i386_register_convert_to_virtual,
i386_convert_to_raw): Remove functions.
(i386_gdbarch_init): Set convert_register_p, register_to_value and
value_to_register instead of register_convertible,
register_convert_to_virtual and register_convert_to_raw.
* mips-tdep.c (mips_convert_register_p): New function.
(mips_value_to_register): Replace mips_register_convert_from_type.
(mips_register_to_value): Replace mips_register_convert_to_type.
(mips_gdbarch_init): Set conver_register_p, value_to_register and
register_to_value.
* alpha-tdep.c (alpha_convert_register_p): Update.
(alpha_value_to_register): Update, store the register.
(alpha_register_to_value): Update, fetch the register.
2003-06-15 00:35:25 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-04-12 20:18:59 +02:00
|
|
|
/* frame_register_read ()
|
2001-02-20 23:39:03 +01:00
|
|
|
|
2002-04-12 20:18:59 +02:00
|
|
|
Find and return the value of REGNUM for the specified stack frame.
|
2004-08-01 23:47:19 +02:00
|
|
|
The number of bytes copied is REGISTER_SIZE (REGNUM).
|
2001-02-20 23:39:03 +01:00
|
|
|
|
2002-04-12 20:18:59 +02:00
|
|
|
Returns 0 if the register value could not be found. */
|
2001-02-20 23:39:03 +01:00
|
|
|
|
2002-04-12 20:18:59 +02:00
|
|
|
int
|
2005-05-22 Andrew Cagney <cagney@gnu.org>
* frame.h (frame_register_unwind, frame_unwind_register)
(get_frame_register, frame_register, put_frame_register)
(get_frame_memory, safe_frame_unwind_memory)
(frame_register_read): Use gdb_byte for byte buffer parameters.
* trad-frame.h (trad_frame_get_register)
(frame_get_prev_register): Ditto.
* frame-unwind.h (frame_prev_register_ftype): Ditto.
* frame.c (frame_pop, frame_register, frame_unwind_register)
(get_frame_register, frame_unwind_register_signed)
(frame_unwind_register_unsigned, frame_unwind_unsigned_register)
(frame_register_read, get_frame_memory): Update.
* trad-frame.c (trad_frame_get_prev_register): Update.
(trad_frame_get_register): Update.
* gdbcore.h (deprecated_read_memory_nobpt, read_memory): Ditto.
* breakpoint.c (deprecated_read_memory_nobpt): Update.
* corefile.c (read_memory): Update.
* tramp-frame.c (tramp_frame_prev_register): Update.
* valops.c (value_assign): Update.
* sentinel-frame.c (sentinel_frame_prev_register): Update.
* std-regs.c (value_of_builtin_frame_fp_reg)
(value_of_builtin_frame_pc_reg): Update.
* infcmd.c (default_print_registers_info): Update
* dummy-frame.c (dummy_frame_prev_register): Update.
* findvar.c (value_of_register, value_from_register): Update.
* tui/tui-regs.c (tui_register_format, tui_get_register): Update.
* mi/mi-main.c (register_changed_p, get_register): Update.
2005-05-22 16:53:35 +02:00
|
|
|
frame_register_read (struct frame_info *frame, int regnum,
|
|
|
|
gdb_byte *myaddr)
|
2001-02-20 23:39:03 +01:00
|
|
|
{
|
2002-11-05 22:44:05 +01:00
|
|
|
int optimized;
|
|
|
|
enum lval_type lval;
|
|
|
|
CORE_ADDR addr;
|
|
|
|
int realnum;
|
|
|
|
frame_register (frame, regnum, &optimized, &lval, &addr, &realnum, myaddr);
|
2001-02-20 23:39:03 +01:00
|
|
|
|
2002-11-05 22:44:05 +01:00
|
|
|
return !optimized;
|
2001-02-20 23:39:03 +01:00
|
|
|
}
|
2002-09-25 22:30:38 +02:00
|
|
|
|
2007-01-08 18:34:12 +01:00
|
|
|
int
|
|
|
|
get_frame_register_bytes (struct frame_info *frame, int regnum,
|
|
|
|
CORE_ADDR offset, int len, gdb_byte *myaddr)
|
|
|
|
{
|
|
|
|
struct gdbarch *gdbarch = get_frame_arch (frame);
|
|
|
|
|
|
|
|
/* Skip registers wholly inside of OFFSET. */
|
|
|
|
while (offset >= register_size (gdbarch, regnum))
|
|
|
|
{
|
|
|
|
offset -= register_size (gdbarch, regnum);
|
|
|
|
regnum++;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Copy the data. */
|
|
|
|
while (len > 0)
|
|
|
|
{
|
|
|
|
int curr_len = register_size (gdbarch, regnum) - offset;
|
|
|
|
if (curr_len > len)
|
|
|
|
curr_len = len;
|
|
|
|
|
|
|
|
if (curr_len == register_size (gdbarch, regnum))
|
|
|
|
{
|
|
|
|
if (!frame_register_read (frame, regnum, myaddr))
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
gdb_byte buf[MAX_REGISTER_SIZE];
|
|
|
|
if (!frame_register_read (frame, regnum, buf))
|
|
|
|
return 0;
|
|
|
|
memcpy (myaddr, buf + offset, curr_len);
|
|
|
|
}
|
|
|
|
|
2007-01-13 20:44:42 +01:00
|
|
|
myaddr += curr_len;
|
2007-01-08 18:34:12 +01:00
|
|
|
len -= curr_len;
|
|
|
|
offset = 0;
|
|
|
|
regnum++;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
put_frame_register_bytes (struct frame_info *frame, int regnum,
|
|
|
|
CORE_ADDR offset, int len, const gdb_byte *myaddr)
|
|
|
|
{
|
|
|
|
struct gdbarch *gdbarch = get_frame_arch (frame);
|
|
|
|
|
|
|
|
/* Skip registers wholly inside of OFFSET. */
|
|
|
|
while (offset >= register_size (gdbarch, regnum))
|
|
|
|
{
|
|
|
|
offset -= register_size (gdbarch, regnum);
|
|
|
|
regnum++;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Copy the data. */
|
|
|
|
while (len > 0)
|
|
|
|
{
|
|
|
|
int curr_len = register_size (gdbarch, regnum) - offset;
|
|
|
|
if (curr_len > len)
|
|
|
|
curr_len = len;
|
|
|
|
|
|
|
|
if (curr_len == register_size (gdbarch, regnum))
|
|
|
|
{
|
|
|
|
put_frame_register (frame, regnum, myaddr);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
gdb_byte buf[MAX_REGISTER_SIZE];
|
|
|
|
frame_register_read (frame, regnum, buf);
|
|
|
|
memcpy (buf + offset, myaddr, curr_len);
|
|
|
|
put_frame_register (frame, regnum, buf);
|
|
|
|
}
|
|
|
|
|
2007-01-13 20:44:42 +01:00
|
|
|
myaddr += curr_len;
|
2007-01-08 18:34:12 +01:00
|
|
|
len -= curr_len;
|
|
|
|
offset = 0;
|
|
|
|
regnum++;
|
|
|
|
}
|
|
|
|
}
|
2002-09-25 22:30:38 +02:00
|
|
|
|
|
|
|
/* Map between a frame register number and its name. A frame register
|
|
|
|
space is a superset of the cooked register space --- it also
|
|
|
|
includes builtin registers. */
|
|
|
|
|
|
|
|
int
|
2003-07-07 16:36:58 +02:00
|
|
|
frame_map_name_to_regnum (struct frame_info *frame, const char *name, int len)
|
2002-09-25 22:30:38 +02:00
|
|
|
{
|
2003-07-07 16:36:58 +02:00
|
|
|
return user_reg_map_name_to_regnum (get_frame_arch (frame), name, len);
|
2002-09-25 22:30:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
const char *
|
2003-07-07 16:36:58 +02:00
|
|
|
frame_map_regnum_to_name (struct frame_info *frame, int regnum)
|
2002-09-25 22:30:38 +02:00
|
|
|
{
|
2003-07-07 16:36:58 +02:00
|
|
|
return user_reg_map_regnum_to_name (get_frame_arch (frame), regnum);
|
2002-09-25 22:30:38 +02:00
|
|
|
}
|
2002-11-08 21:48:55 +01:00
|
|
|
|
2003-01-27 22:41:41 +01:00
|
|
|
/* Create a sentinel frame. */
|
|
|
|
|
2003-06-08 Andrew Cagney <cagney@redhat.com>
* acinclude.m4 (gcc_AC_CHECK_DECL, (gcc_AC_CHECK_DECL): Stolen
from GCC's acinclude.m4.
* configure.in: Check for getopt's delcaration.
* aclocal.m4, config.in, configure: Re-generate.
* main.c (error_init): Delete declaration.
* defs.h (error_init): Declare.
* rs6000-tdep.c (rs6000_fetch_pointer_argument): Make static.
(rs6000_convert_from_func_ptr_addr): Make static.
(_initialize_rs6000_tdep): Add declaration.
* cli/cli-cmds.c (dont_repeat): Delete declaration.
(show_commands, set_verbose, show_history): Delete declaration.
* top.h (set_verbose): Add declaration.
(show_history, set_history, show_commands): Add declaration.
(do_restore_instream_cleanup): Add declaration.
* objc-lang.c (specialcmp): Make static.
(print_object_command): Make static.
(find_objc_msgsend): Make static.
(find_objc_msgcall_submethod_helper): Make static.
(find_objc_msgcall_submethod): Make static.
(_initialize_objc_language): Add declaration.
(find_implementation_from_class): Make static.
(find_implementation): Make static.
* objc-exp.y (yylex): Delete lookup_struct_typedef declaration.
* objc-lang.h (lookup_struct_typedef): Add declaration.
* cli/cli-interp.c (_initialize_cli_interp): Add declaration.
* cli/cli-script.c (clear_hook_in_cleanup): Make static.
(do_restore_user_call_depth): Make static.
(do_restore_instream_cleanup): Delete declaration.
(dont_repeat): Delete declaration.
* cli/cli-decode.c (add_abbrev_cmd): Delete function.
* cli/cli-dump.c (_initialize_cli_dump): Add declaration.
* reggroups.c (_initialize_reggroup): Add declaration.
* cp-support.c (_initialize_cp_support): Add declaration.
* cp-abi.c (_initialize_cp_abi): Add declaration.
* hpacc-abi.c (_initialize_hpacc_abi): Add declaration.
* gnu-v3-abi.c (gnuv3_baseclass_offset): Make static.
(_initialize_gnu_v3_abi): Add declaration.
* gnu-v2-abi.c (gnuv2_value_rtti_type): Make static.
(_initialize_gnu_v2_abi): Add declaration.
* frame-base.c (_initialize_frame_base): Add declaration.
* doublest.c (floatformat_from_length): Make static.
* frame-unwind.c (_initialize_frame_unwind): Add declaration.
* frame.c (create_sentinel_frame): Make static.
(_initialize_frame): Add declaration.
* top.c (do_catch_errors): Make static.
(gdb_rl_operate_and_get_next_completion): Make static.
* typeprint.c: Include "typeprint.h".
* sentinel-frame.c (sentinel_frame_prev_register): Make static.
(sentinel_frame_this_id): Make static.
* p-valprint.c (_initialize_pascal_valprint): Add declaration.
* ui-out.c (make_cleanup_ui_out_begin_end): Delete function.
* dwarf2-frame.c (dwarf2_frame_cache): Make static.
* p-exp.y (push_current_type, pop_current_type): ISO C declaration.
* dwarf2expr.h (dwarf_expr_context): ISO C declaration.
* maint.c (maintenance_print_architecture): Make static.
* signals/signals.c (_initialize_signals): Add declaration.
* std-regs.c (_initialize_frame_reg): Add declaration.
* jv-exp.y (push_variable): ISO C definition.
(push_qualified_expression_name): Ditto.
* memattr.c (_initialize_mem): Add declaration.
* remote.c (remote_check_watch_resources): Make static.
(remote_stopped_by_watchpoint): Make static.
(remote_stopped_data_address): Make static.
* d10v-tdep.c (nr_dmap_regs): Make static.
(a0_regnum): Make static.
(d10v_frame_unwind_cache): Make static.
(d10v_frame_p): Make static.
* osabi.c (show_osabi): Make static.
(_initialize_gdb_osabi): Add extern declaration.
* gdbtypes.c (make_qualified_type): Make static.
(safe_parse_type): Make static.
* macrocmd.c (_initialize_macrocmd): Add extern declaration.
* macrotab.c (macro_bcache_free): Make static.
* interps.c (interp_set_quiet): Make static.
(interpreter_exec_cmd): Make static.
* stack.h (select_frame_command): New file.
* stack.c: Include "stack.h".
(select_frame_command_wrapper): Delete function.
(select_frame_command): Make global.
* infcall.c: Include "infcall.h".
* linespec.c: Include "linespec.h".
* symfile.c (sections_overlap): Make static.
* cp-support.h (cp_initialize_namespace): ISO C declaration.
* charset.c (_initialize_charset): Add missing prototype.
* regcache.c (init_legacy_regcache_descr): Make static.
(do_regcache_xfree): Make static.
(regcache_xfer_part): Make static.
(_initialize_regcache): Add missing prototype.
* breakpoint.c (parse_breakpoint_sals): Make static.
(breakpoint_sals_to_pc): Make static.
* interps.h (clear_interpreter_hooks): ISO C declaration.
* Makefile.in (stack_h): Define.
(stack.o, typeprint.o, mi-main.o): Update dependencies.
(mi-cmd-stack.o, infcall.o, linespec.o): Update dependencies.
Index: mi/ChangeLog
2003-06-08 Andrew Cagney <cagney@redhat.com>
* mi-parse.c (_initialize_mi_parse): Delete function.
* mi-main.c: Include "mi-main.h".
* mi-interp.c (_initialize_mi_interp): Add declaration.
* mi-cmd-stack.c: Include "stack.h".
(select_frame_command_wrapper): Delete extern declaration.
(mi_cmd_stack_select_frame): Replace select_frame_command_wrapper
with select_frame_command.
2003-06-08 20:27:14 +02:00
|
|
|
static struct frame_info *
|
2003-01-27 22:41:41 +01:00
|
|
|
create_sentinel_frame (struct regcache *regcache)
|
|
|
|
{
|
|
|
|
struct frame_info *frame = FRAME_OBSTACK_ZALLOC (struct frame_info);
|
|
|
|
frame->level = -1;
|
|
|
|
/* Explicitly initialize the sentinel frame's cache. Provide it
|
|
|
|
with the underlying regcache. In the future additional
|
|
|
|
information, such as the frame's thread will be added. */
|
2003-03-17 15:23:50 +01:00
|
|
|
frame->prologue_cache = sentinel_frame_cache (regcache);
|
2003-01-27 22:41:41 +01:00
|
|
|
/* For the moment there is only one sentinel frame implementation. */
|
|
|
|
frame->unwind = sentinel_frame_unwind;
|
|
|
|
/* Link this frame back to itself. The frame is self referential
|
|
|
|
(the unwound PC is the same as the pc), so make it so. */
|
|
|
|
frame->next = frame;
|
2003-04-04 16:46:00 +02:00
|
|
|
/* Make the sentinel frame's ID valid, but invalid. That way all
|
|
|
|
comparisons with it should fail. */
|
2003-04-10 05:30:36 +02:00
|
|
|
frame->this_id.p = 1;
|
|
|
|
frame->this_id.value = null_frame_id;
|
2003-04-10 17:32:27 +02:00
|
|
|
if (frame_debug)
|
|
|
|
{
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "{ create_sentinel_frame (...) -> ");
|
|
|
|
fprint_frame (gdb_stdlog, frame);
|
|
|
|
fprintf_unfiltered (gdb_stdlog, " }\n");
|
|
|
|
}
|
2003-01-27 22:41:41 +01:00
|
|
|
return frame;
|
|
|
|
}
|
|
|
|
|
2002-11-08 21:48:55 +01:00
|
|
|
/* Info about the innermost stack frame (contents of FP register) */
|
|
|
|
|
|
|
|
static struct frame_info *current_frame;
|
|
|
|
|
|
|
|
/* Cache for frame addresses already read by gdb. Valid only while
|
|
|
|
inferior is stopped. Control variables for the frame cache should
|
|
|
|
be local to this module. */
|
|
|
|
|
|
|
|
static struct obstack frame_cache_obstack;
|
|
|
|
|
|
|
|
void *
|
2003-01-09 19:53:21 +01:00
|
|
|
frame_obstack_zalloc (unsigned long size)
|
2002-11-08 21:48:55 +01:00
|
|
|
{
|
2003-01-09 19:53:21 +01:00
|
|
|
void *data = obstack_alloc (&frame_cache_obstack, size);
|
|
|
|
memset (data, 0, size);
|
|
|
|
return data;
|
2002-11-08 21:48:55 +01:00
|
|
|
}
|
|
|
|
|
2003-01-27 22:41:41 +01:00
|
|
|
/* Return the innermost (currently executing) stack frame. This is
|
|
|
|
split into two functions. The function unwind_to_current_frame()
|
|
|
|
is wrapped in catch exceptions so that, even when the unwind of the
|
|
|
|
sentinel frame fails, the function still returns a stack frame. */
|
|
|
|
|
|
|
|
static int
|
|
|
|
unwind_to_current_frame (struct ui_out *ui_out, void *args)
|
|
|
|
{
|
|
|
|
struct frame_info *frame = get_prev_frame (args);
|
2004-04-17 02:48:25 +02:00
|
|
|
/* A sentinel frame can fail to unwind, e.g., because its PC value
|
2003-01-27 22:41:41 +01:00
|
|
|
lands in somewhere like start. */
|
|
|
|
if (frame == NULL)
|
|
|
|
return 1;
|
|
|
|
current_frame = frame;
|
|
|
|
return 0;
|
|
|
|
}
|
2002-11-08 21:48:55 +01:00
|
|
|
|
|
|
|
struct frame_info *
|
|
|
|
get_current_frame (void)
|
|
|
|
{
|
2003-03-12 23:39:16 +01:00
|
|
|
/* First check, and report, the lack of registers. Having GDB
|
|
|
|
report "No stack!" or "No memory" when the target doesn't even
|
|
|
|
have registers is very confusing. Besides, "printcmd.exp"
|
|
|
|
explicitly checks that ``print $pc'' with no registers prints "No
|
|
|
|
registers". */
|
2003-01-27 22:41:41 +01:00
|
|
|
if (!target_has_registers)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
error (_("No registers."));
|
2003-03-12 23:39:16 +01:00
|
|
|
if (!target_has_stack)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
error (_("No stack."));
|
2003-01-27 22:41:41 +01:00
|
|
|
if (!target_has_memory)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
error (_("No memory."));
|
2002-11-08 21:48:55 +01:00
|
|
|
if (current_frame == NULL)
|
|
|
|
{
|
2003-01-27 22:41:41 +01:00
|
|
|
struct frame_info *sentinel_frame =
|
2007-06-16 19:16:26 +02:00
|
|
|
create_sentinel_frame (get_current_regcache ());
|
2003-01-27 22:41:41 +01:00
|
|
|
if (catch_exceptions (uiout, unwind_to_current_frame, sentinel_frame,
|
2005-01-15 00:27:14 +01:00
|
|
|
RETURN_MASK_ERROR) != 0)
|
2003-01-27 22:41:41 +01:00
|
|
|
{
|
|
|
|
/* Oops! Fake a current frame? Is this useful? It has a PC
|
|
|
|
of zero, for instance. */
|
|
|
|
current_frame = sentinel_frame;
|
|
|
|
}
|
2002-11-08 21:48:55 +01:00
|
|
|
}
|
|
|
|
return current_frame;
|
|
|
|
}
|
|
|
|
|
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* stack.c (selected_frame, select_frame): Move from here ...
* frame.c (selected_frame, select_frame): ... to here. Include
"language.h".
* Makefile.in (frame.o): Update dependencies.
* frame.c (get_selected_frame): New function.
* frame.h (get_selected_frame): Declare.
(deprecated_selected_frame): Rename selected_frame.
* ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update.
* eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update.
* h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update.
* inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update.
* mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update.
* remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update.
* stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update.
* z8k-tdep.c, cli/cli-cmds.c: Update.
Index: mi/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* mi/mi-cmd-stack.c, mi/mi-main.c: Update to use
deprecated_selected_frame.
Index: tui/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* tui/tui-hooks.c: Update to use deprecated_selected_frame.
* tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto.
* tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
2002-11-29 20:15:16 +01:00
|
|
|
/* The "selected" stack frame is used by default for local and arg
|
|
|
|
access. May be zero, for no selected frame. */
|
|
|
|
|
* frame.c (deprecated_selected_frame): Rename to...
(selected_frame): ...this. Make static.
(get_selected_frame, select_frame): Update.
* frame.h (deprected_select_frame): Delete.
(deprecated_safe_get_selected_frame): Update comments.
* breakpoint.c, cli/cli-cmds.c, f-valprint.c, infcmd.c, inflow.c,
infrun.c, stack.c, tui/tui-disasm.c, tui/tui-source.c,
tui/tui-winsource.c, valops.c, varobj.c, findvar.c, macroscope.c,
parse.c, regcache.h, sh64-tdep.c, tui/tui-hooks.c, tui/tui-win.c,
tui/tui.c: Replace references to deprecated_selected_frame.
2007-02-27 20:46:04 +01:00
|
|
|
static struct frame_info *selected_frame;
|
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* stack.c (selected_frame, select_frame): Move from here ...
* frame.c (selected_frame, select_frame): ... to here. Include
"language.h".
* Makefile.in (frame.o): Update dependencies.
* frame.c (get_selected_frame): New function.
* frame.h (get_selected_frame): Declare.
(deprecated_selected_frame): Rename selected_frame.
* ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update.
* eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update.
* h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update.
* inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update.
* mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update.
* remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update.
* stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update.
* z8k-tdep.c, cli/cli-cmds.c: Update.
Index: mi/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* mi/mi-cmd-stack.c, mi/mi-main.c: Update to use
deprecated_selected_frame.
Index: tui/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* tui/tui-hooks.c: Update to use deprecated_selected_frame.
* tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto.
* tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
2002-11-29 20:15:16 +01:00
|
|
|
|
2004-04-17 02:48:25 +02:00
|
|
|
/* Return the selected frame. Always non-NULL (unless there isn't an
|
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* stack.c (selected_frame, select_frame): Move from here ...
* frame.c (selected_frame, select_frame): ... to here. Include
"language.h".
* Makefile.in (frame.o): Update dependencies.
* frame.c (get_selected_frame): New function.
* frame.h (get_selected_frame): Declare.
(deprecated_selected_frame): Rename selected_frame.
* ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update.
* eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update.
* h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update.
* inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update.
* mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update.
* remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update.
* stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update.
* z8k-tdep.c, cli/cli-cmds.c: Update.
Index: mi/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* mi/mi-cmd-stack.c, mi/mi-main.c: Update to use
deprecated_selected_frame.
Index: tui/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* tui/tui-hooks.c: Update to use deprecated_selected_frame.
* tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto.
* tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
2002-11-29 20:15:16 +01:00
|
|
|
inferior sufficient for creating a frame) in which case an error is
|
|
|
|
thrown. */
|
|
|
|
|
|
|
|
struct frame_info *
|
2004-10-29 Andrew Cagney <cagney@gnu.org>
* frame.h (get_selected_frame): Add message parameter.
* frame.c (get_selected_frame): Add and use message parameter.
* stack.c (current_frame_command, return_command, locals_info)
(catch_info, args_info, up_silently_base, down_silently_base): Use
get_selected_frame with an explicit message.
* thread.c, stack.c, sh-tdep.c, sh64-tdep.c: Update.
* remote-rdp.c, remote-mips.c, remote-e7000.c: Update.
* ocd.c, mi/mi-main.c, mi/mi-cmd-stack.c: Update.
* infrun.c, inflow.c, infcmd.c, frame.c: Update.
* findvar.c, eval.c, corelow.c, bsd-kvm.c: Update.
* breakpoint.c: Update.
2004-10-29 22:23:17 +02:00
|
|
|
get_selected_frame (const char *message)
|
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* stack.c (selected_frame, select_frame): Move from here ...
* frame.c (selected_frame, select_frame): ... to here. Include
"language.h".
* Makefile.in (frame.o): Update dependencies.
* frame.c (get_selected_frame): New function.
* frame.h (get_selected_frame): Declare.
(deprecated_selected_frame): Rename selected_frame.
* ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update.
* eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update.
* h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update.
* inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update.
* mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update.
* remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update.
* stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update.
* z8k-tdep.c, cli/cli-cmds.c: Update.
Index: mi/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* mi/mi-cmd-stack.c, mi/mi-main.c: Update to use
deprecated_selected_frame.
Index: tui/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* tui/tui-hooks.c: Update to use deprecated_selected_frame.
* tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto.
* tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
2002-11-29 20:15:16 +01:00
|
|
|
{
|
* frame.c (deprecated_selected_frame): Rename to...
(selected_frame): ...this. Make static.
(get_selected_frame, select_frame): Update.
* frame.h (deprected_select_frame): Delete.
(deprecated_safe_get_selected_frame): Update comments.
* breakpoint.c, cli/cli-cmds.c, f-valprint.c, infcmd.c, inflow.c,
infrun.c, stack.c, tui/tui-disasm.c, tui/tui-source.c,
tui/tui-winsource.c, valops.c, varobj.c, findvar.c, macroscope.c,
parse.c, regcache.h, sh64-tdep.c, tui/tui-hooks.c, tui/tui-win.c,
tui/tui.c: Replace references to deprecated_selected_frame.
2007-02-27 20:46:04 +01:00
|
|
|
if (selected_frame == NULL)
|
2004-10-29 Andrew Cagney <cagney@gnu.org>
* frame.h (get_selected_frame): Add message parameter.
* frame.c (get_selected_frame): Add and use message parameter.
* stack.c (current_frame_command, return_command, locals_info)
(catch_info, args_info, up_silently_base, down_silently_base): Use
get_selected_frame with an explicit message.
* thread.c, stack.c, sh-tdep.c, sh64-tdep.c: Update.
* remote-rdp.c, remote-mips.c, remote-e7000.c: Update.
* ocd.c, mi/mi-main.c, mi/mi-cmd-stack.c: Update.
* infrun.c, inflow.c, infcmd.c, frame.c: Update.
* findvar.c, eval.c, corelow.c, bsd-kvm.c: Update.
* breakpoint.c: Update.
2004-10-29 22:23:17 +02:00
|
|
|
{
|
|
|
|
if (message != NULL && (!target_has_registers
|
|
|
|
|| !target_has_stack
|
|
|
|
|| !target_has_memory))
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
error (("%s"), message);
|
2004-10-29 Andrew Cagney <cagney@gnu.org>
* frame.h (get_selected_frame): Add message parameter.
* frame.c (get_selected_frame): Add and use message parameter.
* stack.c (current_frame_command, return_command, locals_info)
(catch_info, args_info, up_silently_base, down_silently_base): Use
get_selected_frame with an explicit message.
* thread.c, stack.c, sh-tdep.c, sh64-tdep.c: Update.
* remote-rdp.c, remote-mips.c, remote-e7000.c: Update.
* ocd.c, mi/mi-main.c, mi/mi-cmd-stack.c: Update.
* infrun.c, inflow.c, infcmd.c, frame.c: Update.
* findvar.c, eval.c, corelow.c, bsd-kvm.c: Update.
* breakpoint.c: Update.
2004-10-29 22:23:17 +02:00
|
|
|
/* Hey! Don't trust this. It should really be re-finding the
|
|
|
|
last selected frame of the currently selected thread. This,
|
|
|
|
though, is better than nothing. */
|
|
|
|
select_frame (get_current_frame ());
|
|
|
|
}
|
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* stack.c (selected_frame, select_frame): Move from here ...
* frame.c (selected_frame, select_frame): ... to here. Include
"language.h".
* Makefile.in (frame.o): Update dependencies.
* frame.c (get_selected_frame): New function.
* frame.h (get_selected_frame): Declare.
(deprecated_selected_frame): Rename selected_frame.
* ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update.
* eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update.
* h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update.
* inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update.
* mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update.
* remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update.
* stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update.
* z8k-tdep.c, cli/cli-cmds.c: Update.
Index: mi/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* mi/mi-cmd-stack.c, mi/mi-main.c: Update to use
deprecated_selected_frame.
Index: tui/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* tui/tui-hooks.c: Update to use deprecated_selected_frame.
* tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto.
* tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
2002-11-29 20:15:16 +01:00
|
|
|
/* There is always a frame. */
|
* frame.c (deprecated_selected_frame): Rename to...
(selected_frame): ...this. Make static.
(get_selected_frame, select_frame): Update.
* frame.h (deprected_select_frame): Delete.
(deprecated_safe_get_selected_frame): Update comments.
* breakpoint.c, cli/cli-cmds.c, f-valprint.c, infcmd.c, inflow.c,
infrun.c, stack.c, tui/tui-disasm.c, tui/tui-source.c,
tui/tui-winsource.c, valops.c, varobj.c, findvar.c, macroscope.c,
parse.c, regcache.h, sh64-tdep.c, tui/tui-hooks.c, tui/tui-win.c,
tui/tui.c: Replace references to deprecated_selected_frame.
2007-02-27 20:46:04 +01:00
|
|
|
gdb_assert (selected_frame != NULL);
|
|
|
|
return selected_frame;
|
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* stack.c (selected_frame, select_frame): Move from here ...
* frame.c (selected_frame, select_frame): ... to here. Include
"language.h".
* Makefile.in (frame.o): Update dependencies.
* frame.c (get_selected_frame): New function.
* frame.h (get_selected_frame): Declare.
(deprecated_selected_frame): Rename selected_frame.
* ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update.
* eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update.
* h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update.
* inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update.
* mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update.
* remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update.
* stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update.
* z8k-tdep.c, cli/cli-cmds.c: Update.
Index: mi/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* mi/mi-cmd-stack.c, mi/mi-main.c: Update to use
deprecated_selected_frame.
Index: tui/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* tui/tui-hooks.c: Update to use deprecated_selected_frame.
* tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto.
* tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
2002-11-29 20:15:16 +01:00
|
|
|
}
|
|
|
|
|
2004-04-17 02:48:25 +02:00
|
|
|
/* This is a variant of get_selected_frame() which can be called when
|
2003-09-08 20:56:03 +02:00
|
|
|
the inferior does not have a frame; in that case it will return
|
2004-04-17 02:48:25 +02:00
|
|
|
NULL instead of calling error(). */
|
2003-09-08 20:56:03 +02:00
|
|
|
|
|
|
|
struct frame_info *
|
|
|
|
deprecated_safe_get_selected_frame (void)
|
|
|
|
{
|
|
|
|
if (!target_has_registers || !target_has_stack || !target_has_memory)
|
|
|
|
return NULL;
|
2004-10-29 Andrew Cagney <cagney@gnu.org>
* frame.h (get_selected_frame): Add message parameter.
* frame.c (get_selected_frame): Add and use message parameter.
* stack.c (current_frame_command, return_command, locals_info)
(catch_info, args_info, up_silently_base, down_silently_base): Use
get_selected_frame with an explicit message.
* thread.c, stack.c, sh-tdep.c, sh64-tdep.c: Update.
* remote-rdp.c, remote-mips.c, remote-e7000.c: Update.
* ocd.c, mi/mi-main.c, mi/mi-cmd-stack.c: Update.
* infrun.c, inflow.c, infcmd.c, frame.c: Update.
* findvar.c, eval.c, corelow.c, bsd-kvm.c: Update.
* breakpoint.c: Update.
2004-10-29 22:23:17 +02:00
|
|
|
return get_selected_frame (NULL);
|
2003-09-08 20:56:03 +02:00
|
|
|
}
|
|
|
|
|
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* stack.c (selected_frame, select_frame): Move from here ...
* frame.c (selected_frame, select_frame): ... to here. Include
"language.h".
* Makefile.in (frame.o): Update dependencies.
* frame.c (get_selected_frame): New function.
* frame.h (get_selected_frame): Declare.
(deprecated_selected_frame): Rename selected_frame.
* ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update.
* eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update.
* h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update.
* inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update.
* mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update.
* remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update.
* stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update.
* z8k-tdep.c, cli/cli-cmds.c: Update.
Index: mi/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* mi/mi-cmd-stack.c, mi/mi-main.c: Update to use
deprecated_selected_frame.
Index: tui/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* tui/tui-hooks.c: Update to use deprecated_selected_frame.
* tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto.
* tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
2002-11-29 20:15:16 +01:00
|
|
|
/* Select frame FI (or NULL - to invalidate the current frame). */
|
|
|
|
|
|
|
|
void
|
|
|
|
select_frame (struct frame_info *fi)
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
struct symtab *s;
|
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* stack.c (selected_frame, select_frame): Move from here ...
* frame.c (selected_frame, select_frame): ... to here. Include
"language.h".
* Makefile.in (frame.o): Update dependencies.
* frame.c (get_selected_frame): New function.
* frame.h (get_selected_frame): Declare.
(deprecated_selected_frame): Rename selected_frame.
* ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update.
* eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update.
* h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update.
* inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update.
* mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update.
* remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update.
* stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update.
* z8k-tdep.c, cli/cli-cmds.c: Update.
Index: mi/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* mi/mi-cmd-stack.c, mi/mi-main.c: Update to use
deprecated_selected_frame.
Index: tui/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* tui/tui-hooks.c: Update to use deprecated_selected_frame.
* tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto.
* tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
2002-11-29 20:15:16 +01:00
|
|
|
|
* frame.c (deprecated_selected_frame): Rename to...
(selected_frame): ...this. Make static.
(get_selected_frame, select_frame): Update.
* frame.h (deprected_select_frame): Delete.
(deprecated_safe_get_selected_frame): Update comments.
* breakpoint.c, cli/cli-cmds.c, f-valprint.c, infcmd.c, inflow.c,
infrun.c, stack.c, tui/tui-disasm.c, tui/tui-source.c,
tui/tui-winsource.c, valops.c, varobj.c, findvar.c, macroscope.c,
parse.c, regcache.h, sh64-tdep.c, tui/tui-hooks.c, tui/tui-win.c,
tui/tui.c: Replace references to deprecated_selected_frame.
2007-02-27 20:46:04 +01:00
|
|
|
selected_frame = fi;
|
2004-04-17 02:48:25 +02:00
|
|
|
/* NOTE: cagney/2002-05-04: FI can be NULL. This occurs when the
|
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* stack.c (selected_frame, select_frame): Move from here ...
* frame.c (selected_frame, select_frame): ... to here. Include
"language.h".
* Makefile.in (frame.o): Update dependencies.
* frame.c (get_selected_frame): New function.
* frame.h (get_selected_frame): Declare.
(deprecated_selected_frame): Rename selected_frame.
* ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update.
* eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update.
* h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update.
* inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update.
* mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update.
* remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update.
* stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update.
* z8k-tdep.c, cli/cli-cmds.c: Update.
Index: mi/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* mi/mi-cmd-stack.c, mi/mi-main.c: Update to use
deprecated_selected_frame.
Index: tui/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* tui/tui-hooks.c: Update to use deprecated_selected_frame.
* tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto.
* tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
2002-11-29 20:15:16 +01:00
|
|
|
frame is being invalidated. */
|
2004-04-21 Andrew Cagney <cagney@redhat.com>
* annotate.h (deprecated_annotate_starting_hook)
(deprecated_annotate_stopped_hook)
(deprecated_annotate_exited_hook)
(deprecated_annotate_signal_hook)
(deprecated_annotate_signalled_hook): Deprecate.
* tracepoint.h (deprecated_create_tracepoint_hook)
(deprecated_delete_tracepoint_hook)
(deprecated_modify_tracepoint_hook)
(deprecated_trace_find_hook)
(deprecated_trace_start_stop_hook): Deprecate.
* target.h (deprecated_target_new_objfile_hook): Deprecate.
* remote.h (deprecated_target_resume_hook)
(deprecated_target_wait_loop_hook): Deprecate.
* gdbcore.h (deprecated_exec_file_display_hook)
(deprecated_file_changed_hook): Deprecate.
* frame.h (deprecated_selected_frame_level_changed_hook): Deprecate.
* defs.h (deprecated_modify_breakpoint_hook)
(deprecated_command_loop_hook, deprecated_show_load_progress)
(deprecated_print_frame_info_listing_hook)
(deprecated_query_hook, deprecated_warning_hook)
(deprecated_flush_hook, deprecated_create_breakpoint_hook)
(deprecated_delete_breakpoint_hook)
(deprecated_interactive_hook, deprecated_registers_changed_hook)
(deprecated_readline_begin_hook, deprecated_readline_hook)
(deprecated_readline_end_hook, deprecated_register_changed_hook)
(deprecated_memory_changed_hook, deprecated_init_ui_hook)
(deprecated_context_hook, deprecated_target_wait_hook)
(deprecated_attach_hook, deprecated_detach_hook)
(deprecated_call_command_hook, deprecated_set_hook)
(deprecated_error_hook, deprecated_error_begin_hook)
(deprecated_ui_load_progress_hook): Deprecate.
* valops.c, uw-thread.c, utils.c, tui/tui-io.c: Update.
* tui/tui-hooks.c, tracepoint.c, top.c, thread-db.c: Update.
* target.c, symfile.c, stack.c, sol-thread.c, rs6000-nat.c: Update.
* remote.c, remote-mips.c, regcache.c, mi/mi-interp.c: Update.
* main.c, interps.c, infcmd.c, hpux-thread.c, frame.c: Update.
* exec.c, dsrec.c, d10v-tdep.c, corefile.c, complaints.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, breakpoint.c: Update.
* annotate.c, aix-thread.c: Update.
2004-04-22 01:52:21 +02:00
|
|
|
if (deprecated_selected_frame_level_changed_hook)
|
|
|
|
deprecated_selected_frame_level_changed_hook (frame_relative_level (fi));
|
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* stack.c (selected_frame, select_frame): Move from here ...
* frame.c (selected_frame, select_frame): ... to here. Include
"language.h".
* Makefile.in (frame.o): Update dependencies.
* frame.c (get_selected_frame): New function.
* frame.h (get_selected_frame): Declare.
(deprecated_selected_frame): Rename selected_frame.
* ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update.
* eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update.
* h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update.
* inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update.
* mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update.
* remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update.
* stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update.
* z8k-tdep.c, cli/cli-cmds.c: Update.
Index: mi/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* mi/mi-cmd-stack.c, mi/mi-main.c: Update to use
deprecated_selected_frame.
Index: tui/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* tui/tui-hooks.c: Update to use deprecated_selected_frame.
* tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto.
* tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
2002-11-29 20:15:16 +01:00
|
|
|
|
|
|
|
/* FIXME: kseitz/2002-08-28: It would be nice to call
|
2004-04-17 02:48:25 +02:00
|
|
|
selected_frame_level_changed_event() right here, but due to limitations
|
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* stack.c (selected_frame, select_frame): Move from here ...
* frame.c (selected_frame, select_frame): ... to here. Include
"language.h".
* Makefile.in (frame.o): Update dependencies.
* frame.c (get_selected_frame): New function.
* frame.h (get_selected_frame): Declare.
(deprecated_selected_frame): Rename selected_frame.
* ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update.
* eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update.
* h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update.
* inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update.
* mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update.
* remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update.
* stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update.
* z8k-tdep.c, cli/cli-cmds.c: Update.
Index: mi/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* mi/mi-cmd-stack.c, mi/mi-main.c: Update to use
deprecated_selected_frame.
Index: tui/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* tui/tui-hooks.c: Update to use deprecated_selected_frame.
* tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto.
* tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
2002-11-29 20:15:16 +01:00
|
|
|
in the current interfaces, we would end up flooding UIs with events
|
2004-04-17 02:48:25 +02:00
|
|
|
because select_frame() is used extensively internally.
|
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* stack.c (selected_frame, select_frame): Move from here ...
* frame.c (selected_frame, select_frame): ... to here. Include
"language.h".
* Makefile.in (frame.o): Update dependencies.
* frame.c (get_selected_frame): New function.
* frame.h (get_selected_frame): Declare.
(deprecated_selected_frame): Rename selected_frame.
* ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update.
* eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update.
* h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update.
* inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update.
* mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update.
* remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update.
* stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update.
* z8k-tdep.c, cli/cli-cmds.c: Update.
Index: mi/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* mi/mi-cmd-stack.c, mi/mi-main.c: Update to use
deprecated_selected_frame.
Index: tui/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* tui/tui-hooks.c: Update to use deprecated_selected_frame.
* tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto.
* tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
2002-11-29 20:15:16 +01:00
|
|
|
|
|
|
|
Once we have frame-parameterized frame (and frame-related) commands,
|
|
|
|
the event notification can be moved here, since this function will only
|
2004-04-17 02:48:25 +02:00
|
|
|
be called when the user's selected frame is being changed. */
|
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* stack.c (selected_frame, select_frame): Move from here ...
* frame.c (selected_frame, select_frame): ... to here. Include
"language.h".
* Makefile.in (frame.o): Update dependencies.
* frame.c (get_selected_frame): New function.
* frame.h (get_selected_frame): Declare.
(deprecated_selected_frame): Rename selected_frame.
* ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update.
* eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update.
* h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update.
* inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update.
* mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update.
* remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update.
* stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update.
* z8k-tdep.c, cli/cli-cmds.c: Update.
Index: mi/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* mi/mi-cmd-stack.c, mi/mi-main.c: Update to use
deprecated_selected_frame.
Index: tui/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* tui/tui-hooks.c: Update to use deprecated_selected_frame.
* tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto.
* tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
2002-11-29 20:15:16 +01:00
|
|
|
|
|
|
|
/* Ensure that symbols for this frame are read in. Also, determine the
|
|
|
|
source language of this frame, and switch to it if desired. */
|
|
|
|
if (fi)
|
|
|
|
{
|
2003-12-10 18:40:43 +01:00
|
|
|
/* We retrieve the frame's symtab by using the frame PC. However
|
2004-04-17 02:48:25 +02:00
|
|
|
we cannot use the frame PC as-is, because it usually points to
|
2003-12-10 18:40:43 +01:00
|
|
|
the instruction following the "call", which is sometimes the
|
|
|
|
first instruction of another function. So we rely on
|
|
|
|
get_frame_address_in_block() which provides us with a PC which
|
|
|
|
is guaranteed to be inside the frame's code block. */
|
|
|
|
s = find_pc_symtab (get_frame_address_in_block (fi));
|
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* stack.c (selected_frame, select_frame): Move from here ...
* frame.c (selected_frame, select_frame): ... to here. Include
"language.h".
* Makefile.in (frame.o): Update dependencies.
* frame.c (get_selected_frame): New function.
* frame.h (get_selected_frame): Declare.
(deprecated_selected_frame): Rename selected_frame.
* ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update.
* eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update.
* h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update.
* inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update.
* mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update.
* remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update.
* stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update.
* z8k-tdep.c, cli/cli-cmds.c: Update.
Index: mi/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* mi/mi-cmd-stack.c, mi/mi-main.c: Update to use
deprecated_selected_frame.
Index: tui/ChangeLog
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* tui/tui-hooks.c: Update to use deprecated_selected_frame.
* tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto.
* tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
2002-11-29 20:15:16 +01:00
|
|
|
if (s
|
|
|
|
&& s->language != current_language->la_language
|
|
|
|
&& s->language != language_unknown
|
|
|
|
&& language_mode == language_mode_auto)
|
|
|
|
{
|
|
|
|
set_language (s->language);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2002-12-13 17:40:25 +01:00
|
|
|
|
2002-11-08 21:48:55 +01:00
|
|
|
/* Create an arbitrary (i.e. address specified by user) or innermost frame.
|
|
|
|
Always returns a non-NULL value. */
|
|
|
|
|
|
|
|
struct frame_info *
|
|
|
|
create_new_frame (CORE_ADDR addr, CORE_ADDR pc)
|
|
|
|
{
|
|
|
|
struct frame_info *fi;
|
|
|
|
|
2003-04-10 17:32:27 +02:00
|
|
|
if (frame_debug)
|
|
|
|
{
|
|
|
|
fprintf_unfiltered (gdb_stdlog,
|
|
|
|
"{ create_new_frame (addr=0x%s, pc=0x%s) ",
|
|
|
|
paddr_nz (addr), paddr_nz (pc));
|
|
|
|
}
|
|
|
|
|
2006-07-31 19:33:30 +02:00
|
|
|
fi = FRAME_OBSTACK_ZALLOC (struct frame_info);
|
2002-11-08 21:48:55 +01:00
|
|
|
|
2007-06-16 19:16:26 +02:00
|
|
|
fi->next = create_sentinel_frame (get_current_regcache ());
|
2003-04-05 05:56:00 +02:00
|
|
|
|
|
|
|
/* Select/initialize both the unwind function and the frame's type
|
|
|
|
based on the PC. */
|
2004-03-21 23:28:52 +01:00
|
|
|
fi->unwind = frame_unwind_find_by_frame (fi->next, &fi->prologue_cache);
|
2003-04-05 05:56:00 +02:00
|
|
|
|
2003-04-12 06:27:29 +02:00
|
|
|
fi->this_id.p = 1;
|
2003-04-04 23:04:33 +02:00
|
|
|
deprecated_update_frame_base_hack (fi, addr);
|
|
|
|
deprecated_update_frame_pc_hack (fi, pc);
|
2002-11-08 21:48:55 +01:00
|
|
|
|
2003-04-10 17:32:27 +02:00
|
|
|
if (frame_debug)
|
|
|
|
{
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "-> ");
|
|
|
|
fprint_frame (gdb_stdlog, fi);
|
|
|
|
fprintf_unfiltered (gdb_stdlog, " }\n");
|
|
|
|
}
|
|
|
|
|
2002-11-08 21:48:55 +01:00
|
|
|
return fi;
|
|
|
|
}
|
|
|
|
|
2003-03-13 00:55:36 +01:00
|
|
|
/* Return the frame that THIS_FRAME calls (NULL if THIS_FRAME is the
|
|
|
|
innermost frame). Be careful to not fall off the bottom of the
|
|
|
|
frame chain and onto the sentinel frame. */
|
2002-11-08 21:48:55 +01:00
|
|
|
|
|
|
|
struct frame_info *
|
2003-03-13 00:55:36 +01:00
|
|
|
get_next_frame (struct frame_info *this_frame)
|
2002-11-08 21:48:55 +01:00
|
|
|
{
|
2003-03-13 00:55:36 +01:00
|
|
|
if (this_frame->level > 0)
|
|
|
|
return this_frame->next;
|
2003-01-27 22:41:41 +01:00
|
|
|
else
|
|
|
|
return NULL;
|
2002-11-08 21:48:55 +01:00
|
|
|
}
|
|
|
|
|
2004-04-26 11:49:36 +02:00
|
|
|
/* Observer for the target_changed event. */
|
|
|
|
|
|
|
|
void
|
|
|
|
frame_observer_target_changed (struct target_ops *target)
|
|
|
|
{
|
2007-02-28 18:35:01 +01:00
|
|
|
reinit_frame_cache ();
|
2004-04-26 11:49:36 +02:00
|
|
|
}
|
|
|
|
|
2002-11-08 21:48:55 +01:00
|
|
|
/* Flush the entire frame cache. */
|
|
|
|
|
|
|
|
void
|
2007-02-28 18:35:01 +01:00
|
|
|
reinit_frame_cache (void)
|
2002-11-08 21:48:55 +01:00
|
|
|
{
|
2007-06-12 17:21:27 +02:00
|
|
|
struct frame_info *fi;
|
|
|
|
|
|
|
|
/* Tear down all frame caches. */
|
|
|
|
for (fi = current_frame; fi != NULL; fi = fi->prev)
|
|
|
|
{
|
|
|
|
if (fi->prologue_cache && fi->unwind->dealloc_cache)
|
|
|
|
fi->unwind->dealloc_cache (fi, fi->prologue_cache);
|
|
|
|
if (fi->base_cache && fi->base->unwind->dealloc_cache)
|
|
|
|
fi->base->unwind->dealloc_cache (fi, fi->base_cache);
|
|
|
|
}
|
|
|
|
|
2002-11-08 21:48:55 +01:00
|
|
|
/* Since we can't really be sure what the first object allocated was */
|
|
|
|
obstack_free (&frame_cache_obstack, 0);
|
|
|
|
obstack_init (&frame_cache_obstack);
|
|
|
|
|
|
|
|
current_frame = NULL; /* Invalidate cache */
|
|
|
|
select_frame (NULL);
|
|
|
|
annotate_frames_invalid ();
|
2003-04-10 17:32:27 +02:00
|
|
|
if (frame_debug)
|
2007-02-28 18:35:01 +01:00
|
|
|
fprintf_unfiltered (gdb_stdlog, "{ reinit_frame_cache () }\n");
|
2002-11-08 21:48:55 +01:00
|
|
|
}
|
|
|
|
|
2006-11-10 21:11:35 +01:00
|
|
|
/* Find where a register is saved (in memory or another register).
|
|
|
|
The result of frame_register_unwind is just where it is saved
|
2007-01-09 21:19:15 +01:00
|
|
|
relative to this particular frame. */
|
2006-11-10 21:11:35 +01:00
|
|
|
|
|
|
|
static void
|
|
|
|
frame_register_unwind_location (struct frame_info *this_frame, int regnum,
|
|
|
|
int *optimizedp, enum lval_type *lvalp,
|
|
|
|
CORE_ADDR *addrp, int *realnump)
|
|
|
|
{
|
|
|
|
gdb_assert (this_frame == NULL || this_frame->level >= 0);
|
|
|
|
|
|
|
|
while (this_frame != NULL)
|
|
|
|
{
|
|
|
|
frame_register_unwind (this_frame, regnum, optimizedp, lvalp,
|
|
|
|
addrp, realnump, NULL);
|
|
|
|
|
|
|
|
if (*optimizedp)
|
|
|
|
break;
|
|
|
|
|
|
|
|
if (*lvalp != lval_register)
|
|
|
|
break;
|
|
|
|
|
|
|
|
regnum = *realnump;
|
|
|
|
this_frame = get_next_frame (this_frame);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-03-31 21:40:28 +02:00
|
|
|
/* Return a "struct frame_info" corresponding to the frame that called
|
|
|
|
THIS_FRAME. Returns NULL if there is no such frame.
|
2004-01-11 17:52:16 +01:00
|
|
|
|
2004-03-31 21:40:28 +02:00
|
|
|
Unlike get_prev_frame, this function always tries to unwind the
|
|
|
|
frame. */
|
2003-01-21 20:32:42 +01:00
|
|
|
|
2004-03-31 21:40:28 +02:00
|
|
|
static struct frame_info *
|
|
|
|
get_prev_frame_1 (struct frame_info *this_frame)
|
2003-01-21 20:32:42 +01:00
|
|
|
{
|
|
|
|
struct frame_info *prev_frame;
|
2004-05-08 01:19:14 +02:00
|
|
|
struct frame_id this_id;
|
2007-10-09 20:14:09 +02:00
|
|
|
struct gdbarch *gdbarch;
|
2003-01-21 20:32:42 +01:00
|
|
|
|
2004-03-31 21:40:28 +02:00
|
|
|
gdb_assert (this_frame != NULL);
|
2007-10-09 20:14:09 +02:00
|
|
|
gdbarch = get_frame_arch (this_frame);
|
2004-03-31 21:40:28 +02:00
|
|
|
|
2003-04-10 17:32:27 +02:00
|
|
|
if (frame_debug)
|
|
|
|
{
|
2004-03-31 21:40:28 +02:00
|
|
|
fprintf_unfiltered (gdb_stdlog, "{ get_prev_frame_1 (this_frame=");
|
2003-04-10 17:32:27 +02:00
|
|
|
if (this_frame != NULL)
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "%d", this_frame->level);
|
|
|
|
else
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "<NULL>");
|
|
|
|
fprintf_unfiltered (gdb_stdlog, ") ");
|
|
|
|
}
|
|
|
|
|
2004-03-31 21:40:28 +02:00
|
|
|
/* Only try to do the unwind once. */
|
|
|
|
if (this_frame->prev_p)
|
|
|
|
{
|
|
|
|
if (frame_debug)
|
|
|
|
{
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "-> ");
|
|
|
|
fprint_frame (gdb_stdlog, this_frame->prev);
|
|
|
|
fprintf_unfiltered (gdb_stdlog, " // cached \n");
|
|
|
|
}
|
|
|
|
return this_frame->prev;
|
|
|
|
}
|
|
|
|
this_frame->prev_p = 1;
|
2006-10-18 21:52:05 +02:00
|
|
|
this_frame->stop_reason = UNWIND_NO_REASON;
|
2004-03-31 21:40:28 +02:00
|
|
|
|
|
|
|
/* Check that this frame's ID was valid. If it wasn't, don't try to
|
|
|
|
unwind to the prev frame. Be careful to not apply this test to
|
|
|
|
the sentinel frame. */
|
2004-05-08 01:19:14 +02:00
|
|
|
this_id = get_frame_id (this_frame);
|
|
|
|
if (this_frame->level >= 0 && !frame_id_p (this_id))
|
2004-03-31 21:40:28 +02:00
|
|
|
{
|
|
|
|
if (frame_debug)
|
|
|
|
{
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "-> ");
|
|
|
|
fprint_frame (gdb_stdlog, NULL);
|
|
|
|
fprintf_unfiltered (gdb_stdlog, " // this ID is NULL }\n");
|
|
|
|
}
|
2006-10-18 21:52:05 +02:00
|
|
|
this_frame->stop_reason = UNWIND_NULL_ID;
|
2004-03-31 21:40:28 +02:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Check that this frame's ID isn't inner to (younger, below, next)
|
|
|
|
the next frame. This happens when a frame unwind goes backwards.
|
2004-04-02 22:21:07 +02:00
|
|
|
Exclude signal trampolines (due to sigaltstack the frame ID can
|
|
|
|
go backwards) and sentinel frames (the test is meaningless). */
|
|
|
|
if (this_frame->next->level >= 0
|
2004-07-31 23:41:50 +02:00
|
|
|
&& this_frame->next->unwind->type != SIGTRAMP_FRAME
|
2007-11-02 15:47:28 +01:00
|
|
|
&& frame_id_inner (get_frame_arch (this_frame), this_id,
|
|
|
|
get_frame_id (this_frame->next)))
|
2006-10-18 21:52:05 +02:00
|
|
|
{
|
|
|
|
if (frame_debug)
|
|
|
|
{
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "-> ");
|
|
|
|
fprint_frame (gdb_stdlog, NULL);
|
|
|
|
fprintf_unfiltered (gdb_stdlog, " // this frame ID is inner }\n");
|
|
|
|
}
|
|
|
|
this_frame->stop_reason = UNWIND_INNER_ID;
|
|
|
|
return NULL;
|
|
|
|
}
|
2004-03-31 21:40:28 +02:00
|
|
|
|
|
|
|
/* Check that this and the next frame are not identical. If they
|
|
|
|
are, there is most likely a stack cycle. As with the inner-than
|
|
|
|
test above, avoid comparing the inner-most and sentinel frames. */
|
|
|
|
if (this_frame->level > 0
|
2004-05-08 01:19:14 +02:00
|
|
|
&& frame_id_eq (this_id, get_frame_id (this_frame->next)))
|
2006-10-18 21:52:05 +02:00
|
|
|
{
|
|
|
|
if (frame_debug)
|
|
|
|
{
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "-> ");
|
|
|
|
fprint_frame (gdb_stdlog, NULL);
|
|
|
|
fprintf_unfiltered (gdb_stdlog, " // this frame has same ID }\n");
|
|
|
|
}
|
|
|
|
this_frame->stop_reason = UNWIND_SAME_ID;
|
|
|
|
return NULL;
|
|
|
|
}
|
2004-03-31 21:40:28 +02:00
|
|
|
|
2006-11-10 21:11:35 +01:00
|
|
|
/* Check that this and the next frame do not unwind the PC register
|
|
|
|
to the same memory location. If they do, then even though they
|
|
|
|
have different frame IDs, the new frame will be bogus; two
|
|
|
|
functions can't share a register save slot for the PC. This can
|
|
|
|
happen when the prologue analyzer finds a stack adjustment, but
|
2007-01-11 18:18:22 +01:00
|
|
|
no PC save.
|
|
|
|
|
|
|
|
This check does assume that the "PC register" is roughly a
|
|
|
|
traditional PC, even if the gdbarch_unwind_pc method adjusts
|
|
|
|
it (we do not rely on the value, only on the unwound PC being
|
|
|
|
dependent on this value). A potential improvement would be
|
|
|
|
to have the frame prev_pc method and the gdbarch unwind_pc
|
|
|
|
method set the same lval and location information as
|
|
|
|
frame_register_unwind. */
|
2006-11-10 21:11:35 +01:00
|
|
|
if (this_frame->level > 0
|
2007-10-09 20:14:09 +02:00
|
|
|
&& gdbarch_pc_regnum (gdbarch) >= 0
|
2006-11-10 21:11:35 +01:00
|
|
|
&& get_frame_type (this_frame) == NORMAL_FRAME
|
|
|
|
&& get_frame_type (this_frame->next) == NORMAL_FRAME)
|
|
|
|
{
|
2007-09-24 23:34:58 +02:00
|
|
|
int optimized, realnum, nrealnum;
|
2006-11-10 21:11:35 +01:00
|
|
|
enum lval_type lval, nlval;
|
|
|
|
CORE_ADDR addr, naddr;
|
|
|
|
|
2007-06-18 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (SP_REGNUM): Replace by gdbarch_sp_regnum.
* v850-tdep.c (v850_unwind_sp): Likewise.
* std-regs.c (value_of_builtin_frame_sp_reg): Likewise.
* stack.c (frame_info): Likewise.
* stabsread.c (define_symbol): Likewise.
* sh-tdep.c (sh_push_dummy_call_fpu, sh_push_dummy_call_nofpu)
(sh_dwarf2_frame_init_reg, sh_frame_cache, sh_frame_prev_register)
(sh_unwind_sp): Likewise.
* sh64-tdep.c (sh64_push_dummy_call, sh64_frame_cache)
(sh64_frame_prev_register, sh64_unwind_sp): Likewise.
* rs6000-tdep.c (rs6000_push_dummy_call, rs6000_unwind_dummy_id)
(rs6000_frame_cache): Likewise.
* rs6000-nat.c (store_register): Likewise.
* remote-mips.c (mips_wait): Likewise.
* procfs.c (procfs_fetch_registers, procfs_store_registers): Likewise.
* ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call)
(ppc64_sysv_abi_push_dummy_call): Likewise.
* ppcobsd-tdep.c (ppcobsd_sigtramp_frame_cache): Likewise.
* ppcobsd-nat.c (ppcobsd_supply_pcb): Likewise.
* ppcnbsd-tdep.c (ppcnbsd_sigtramp_cache_init): Likewise.
* ppc-linux-tdep.c (ppc_linux_sigtramp_cache): Likewise.
* m32r-rom.c (m32r_supply_register): Likewise.
* frame.c (frame_sp_unwind): Likewise.
* mips-tdep.c (mips_insn16_frame_cache)
(mips_insn32_frame_cache): Likewise (comment).
* m68klinux-nat.c (supply_gregset): Likewise.
* m68k-tdep.c (m68k_get_longjmp_target): Likewise.
* ia64-tdep.c (ia64_frame_prev_register): Likewise.
* i386-tdep.c (i386_get_longjmp_target): Likewise.
* dwarf2-frame.c (dwarf2_frame_default_init_reg): Likewise.
* cris-tdep.c (cris_regnums, cris_sigcontext_addr)
(cris_sigtramp_frame_unwind_cache, cris_push_dummy_call)
(cris_scan_prologue, crisv32_scan_prologue, cris_unwind_sp)
(cris_register_type, crisv32_register_type)
(cris_dwarf2_frame_init_reg): Likewise.
* arch-utils.c (legacy_virtual_frame_pointer): Likewise.
* amd64-tdep.c (amd64_frame_prev_register): Likewise.
* amd64-linux-tdep.c (amd64_linux_sigcontext_addr): Likewise.
* libunwind-frame.c (libunwind_frame_cache): Likewise.
* gdbarch.sh (PC_REGNUM): Replace by gdbarch_pc_regnum.
* regcache.c (read_pc_pid, generic_target_write_pc): Likewise.
* xtensa-tdep.c (xtensa_register_type, xtensa_supply_gregset)
(xtensa_unwind_pc, xtensa_frame_cache, xtensa_frame_prev_register)
(xtensa_extract_return_value, xtensa_store_return_value): Likewise.
* v850-tdep.c (v850_unwind_pc): Likewise.
* stack.c (frame_info): Likewise.
* sh-tdep.c (sh_generic_show_regs, sh3_show_regs, sh2e_show_regs)
(sh2a_show_regs, sh2a_nofpu_show_regs, sh3e_show_regs)
(sh3_dsp_show_regs, sh4_show_regs, sh4_nofpu_show_regs)
(sh_dwarf2_frame_init_reg, sh_frame_prev_register, sh_unwind_pc)
(sh_dsp_show_regs): Likewise.
* shnbsd-tdep.c (shnbsd_supply_gregset)
(shnbsd_collect_gregset): Likewise.
* shnbsd-nat.c (GETREGS_SUPPLIES): Likewise.
* sh64-tdep.c (sh64_compact_reg_base_num, sh64_show_media_regs)
(sh64_frame_prev_register, sh64_unwind_pc): Likewise.
* rs6000-tdep.c (ppc_supply_gregset, ppc_collect_gregset)
(6000_register_reggroup_p, rs6000_unwind_pc)
(rs6000_frame_cache): Likewise.
* rs6000-nat.c (regmap, rs6000_fetch_inferior_registers)
(rs6000_store_inferior_registers): Likewise.
* remote-mips.c (mips_wait, mips_load): Likewise.
* procfs.c (procfs_fetch_registers, procfs_store_registers): Likewise.
* ppcobsd-tdep.c (ppcobsd_sigtramp_frame_cache): Likewise.
* ppcobsd-nat.c (ppcobsd_supply_pcb): Likewise.
* ppcnbsd-tdep.c (ppcnbsd_sigtramp_cache_init): Likewise.
* ppcnbsd-nat.c (getregs_supplies, ppcnbsd_supply_pcb): Likewise.
* ppc-linux-tdep.c (ppc_linux_sigtramp_cache): Likewise.
* ppc-linux-nat.c (ppc_register_u_addr, fetch_ppc_registers)
(store_ppc_registers, fill_gregset): Likewise.
* mips-tdep.c (mips_stub_frame_cache, mips_gdbarch_init): Likewise.
* mipsnbsd-tdep.c (mipsnbsd_supply_reg, mipsnbsd_fill_reg): Likewise.
* mipsnbsd-nat.c (getregs_supplies): Likewise.
* m68k-tdep.c (m68k_register_type, m68k_unwind_pc): Likewise.
* m68klinux-nat.c (supply_gregset): Likewise.
* irix5-nat.c (fill_gregset): Likewise.
* i386-tdep.c (i386_unwind_pc): Likewise.
* i386-linux-nat.c (i386_linux_resume): Likewise.
* frame.c (get_prev_frame_1): Likewise.
* dwarf2-frame.c (dwarf2_frame_default_init_reg): Likewise.
* dbug-rom.c (dbug_supply_register): Likewise.
* cris-tdep.c (cris_sigtramp_frame_unwind_cache, cris_scan_prologue)
(crisv32_scan_prologue, cris_unwind_pc, cris_register_size)
(cris_register_type, crisv32_register_type, crisv32_register_name)
(cris_dwarf2_frame_init_reg, find_step_target)
(cris_software_single_step, cris_supply_gregset)
(cris_regnums): Likewise.
* alpha-linux-nat.c (alpha_linux_register_u_offset): Likewise.
* aix-thread.c (special_register_p, supply_sprs64, supply_sprs32)
(fill_sprs64, fill_sprs32, store_regs_user_thread): Likewise.
* mips-linux-tdep.c (mips_linux_write_pc): Likewise.
* gdbarch.sh (PS_REGNUM): Replace by gdbarch_ps_regnum.
* dbug-rom.c (dbug_supply_register): Likewise.
* xtensa-tdep.c (xtensa_supply_gregset, xtensa_frame_cache)
(xtensa_frame_prev_register, xtensa_push_dummy_call): Likewise.
* win32-nat.c (win32_resume): Likewise.
* std-regs.c (value_of_builtin_frame_ps_reg)
(value_of_builtin_frame_pc_reg): Likewise.
* m68k-tdep.c (m68k_register_type): Likewise.
* m68klinux-nat.c (supply_gregset): Likewise.
* gdbarch.sh (FP0_REGNUM): Replace by gdbarch_fp0_regnum.
* sh-tdep.c (sh_extract_return_value_fpu, sh_store_return_value_fpu)
(sh2e_show_regs, sh2a_show_regs, sh3e_show_regs, sh4_show_regs)
(sh_sh2a_register_type, sh_sh3e_register_type, sh_sh4_register_type)
(fv_reg_base_num, dr_reg_base_num): Likewise.
* sh64-tdep.c (sh64_fv_reg_base_num, sh64_dr_reg_base_num)
(sh64_fpp_reg_base_num, sh64_compact_reg_base_num, sh64_push_dummy_call)
(sh64_extract_return_value, sh64_store_return_value)
(sh64_show_media_regs, sh64_show_compact_regs, sh64_register_type)
(sh64_do_fp_register, sh64_media_print_registers_info): Likewise.
* procfs.c (procfs_fetch_registers, procfs_store_registers)
(invalidate_cache): Likewise.
* ppc-linux-tdep.c (ppc_linux_sigtramp_cache): Likewise.
* mipsnbsd-tdep.c (mipsnbsd_supply_fpreg)
(mipsnbsd_fill_fpreg): Likewise.
* mipsnbsd-nat.c (mipsnbsd_fetch_inferior_registers)
(mipsnbsd_store_inferior_registers): Likewise.
* mips-linux-tdep.c (mips_supply_fpregset, mips_fill_fpregset)
(mips64_supply_fpregset, mips64_fill_fpregset): Likewise.
* mips-linux-nat.c (mips64_linux_register_addr): Likewise.
* m68k-tdep.c (m68k_register_type, m68k_convert_register_p): Likewise.
* m68klinux-nat.c (getfpregs_supplies, supply_fpregset)
(fill_fpregset): Likewise.
* irix5-nat.c (supply_fpregset, fill_fpregset): Likewise.
* i386-tdep.h (struct_return): Likewise (comment).
* i386-nto-tdep.c (i386nto_register_area): Likewise.
* go32-nat.c (fetch_register, go32_fetch_registers, store_register)
(go32_store_registers): Likewise.
* alpha-tdep.c (alpha_next_pc): Likewise.
* alpha-linux-nat.c (alpha_linux_register_u_offset): Likewise.
* alphabsd-nat.c (alphabsd_fetch_inferior_registers)
(alphabsd_store_inferior_registers): Likewise.
* core-regset.c (fetch_core_registers): Likewise.
* i386v4-nat.c (supply_fpregset, fill_fpregset): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.
2007-06-18 19:45:26 +02:00
|
|
|
frame_register_unwind_location (this_frame,
|
2007-10-09 20:14:09 +02:00
|
|
|
gdbarch_pc_regnum (gdbarch),
|
2007-06-18 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (SP_REGNUM): Replace by gdbarch_sp_regnum.
* v850-tdep.c (v850_unwind_sp): Likewise.
* std-regs.c (value_of_builtin_frame_sp_reg): Likewise.
* stack.c (frame_info): Likewise.
* stabsread.c (define_symbol): Likewise.
* sh-tdep.c (sh_push_dummy_call_fpu, sh_push_dummy_call_nofpu)
(sh_dwarf2_frame_init_reg, sh_frame_cache, sh_frame_prev_register)
(sh_unwind_sp): Likewise.
* sh64-tdep.c (sh64_push_dummy_call, sh64_frame_cache)
(sh64_frame_prev_register, sh64_unwind_sp): Likewise.
* rs6000-tdep.c (rs6000_push_dummy_call, rs6000_unwind_dummy_id)
(rs6000_frame_cache): Likewise.
* rs6000-nat.c (store_register): Likewise.
* remote-mips.c (mips_wait): Likewise.
* procfs.c (procfs_fetch_registers, procfs_store_registers): Likewise.
* ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call)
(ppc64_sysv_abi_push_dummy_call): Likewise.
* ppcobsd-tdep.c (ppcobsd_sigtramp_frame_cache): Likewise.
* ppcobsd-nat.c (ppcobsd_supply_pcb): Likewise.
* ppcnbsd-tdep.c (ppcnbsd_sigtramp_cache_init): Likewise.
* ppc-linux-tdep.c (ppc_linux_sigtramp_cache): Likewise.
* m32r-rom.c (m32r_supply_register): Likewise.
* frame.c (frame_sp_unwind): Likewise.
* mips-tdep.c (mips_insn16_frame_cache)
(mips_insn32_frame_cache): Likewise (comment).
* m68klinux-nat.c (supply_gregset): Likewise.
* m68k-tdep.c (m68k_get_longjmp_target): Likewise.
* ia64-tdep.c (ia64_frame_prev_register): Likewise.
* i386-tdep.c (i386_get_longjmp_target): Likewise.
* dwarf2-frame.c (dwarf2_frame_default_init_reg): Likewise.
* cris-tdep.c (cris_regnums, cris_sigcontext_addr)
(cris_sigtramp_frame_unwind_cache, cris_push_dummy_call)
(cris_scan_prologue, crisv32_scan_prologue, cris_unwind_sp)
(cris_register_type, crisv32_register_type)
(cris_dwarf2_frame_init_reg): Likewise.
* arch-utils.c (legacy_virtual_frame_pointer): Likewise.
* amd64-tdep.c (amd64_frame_prev_register): Likewise.
* amd64-linux-tdep.c (amd64_linux_sigcontext_addr): Likewise.
* libunwind-frame.c (libunwind_frame_cache): Likewise.
* gdbarch.sh (PC_REGNUM): Replace by gdbarch_pc_regnum.
* regcache.c (read_pc_pid, generic_target_write_pc): Likewise.
* xtensa-tdep.c (xtensa_register_type, xtensa_supply_gregset)
(xtensa_unwind_pc, xtensa_frame_cache, xtensa_frame_prev_register)
(xtensa_extract_return_value, xtensa_store_return_value): Likewise.
* v850-tdep.c (v850_unwind_pc): Likewise.
* stack.c (frame_info): Likewise.
* sh-tdep.c (sh_generic_show_regs, sh3_show_regs, sh2e_show_regs)
(sh2a_show_regs, sh2a_nofpu_show_regs, sh3e_show_regs)
(sh3_dsp_show_regs, sh4_show_regs, sh4_nofpu_show_regs)
(sh_dwarf2_frame_init_reg, sh_frame_prev_register, sh_unwind_pc)
(sh_dsp_show_regs): Likewise.
* shnbsd-tdep.c (shnbsd_supply_gregset)
(shnbsd_collect_gregset): Likewise.
* shnbsd-nat.c (GETREGS_SUPPLIES): Likewise.
* sh64-tdep.c (sh64_compact_reg_base_num, sh64_show_media_regs)
(sh64_frame_prev_register, sh64_unwind_pc): Likewise.
* rs6000-tdep.c (ppc_supply_gregset, ppc_collect_gregset)
(6000_register_reggroup_p, rs6000_unwind_pc)
(rs6000_frame_cache): Likewise.
* rs6000-nat.c (regmap, rs6000_fetch_inferior_registers)
(rs6000_store_inferior_registers): Likewise.
* remote-mips.c (mips_wait, mips_load): Likewise.
* procfs.c (procfs_fetch_registers, procfs_store_registers): Likewise.
* ppcobsd-tdep.c (ppcobsd_sigtramp_frame_cache): Likewise.
* ppcobsd-nat.c (ppcobsd_supply_pcb): Likewise.
* ppcnbsd-tdep.c (ppcnbsd_sigtramp_cache_init): Likewise.
* ppcnbsd-nat.c (getregs_supplies, ppcnbsd_supply_pcb): Likewise.
* ppc-linux-tdep.c (ppc_linux_sigtramp_cache): Likewise.
* ppc-linux-nat.c (ppc_register_u_addr, fetch_ppc_registers)
(store_ppc_registers, fill_gregset): Likewise.
* mips-tdep.c (mips_stub_frame_cache, mips_gdbarch_init): Likewise.
* mipsnbsd-tdep.c (mipsnbsd_supply_reg, mipsnbsd_fill_reg): Likewise.
* mipsnbsd-nat.c (getregs_supplies): Likewise.
* m68k-tdep.c (m68k_register_type, m68k_unwind_pc): Likewise.
* m68klinux-nat.c (supply_gregset): Likewise.
* irix5-nat.c (fill_gregset): Likewise.
* i386-tdep.c (i386_unwind_pc): Likewise.
* i386-linux-nat.c (i386_linux_resume): Likewise.
* frame.c (get_prev_frame_1): Likewise.
* dwarf2-frame.c (dwarf2_frame_default_init_reg): Likewise.
* dbug-rom.c (dbug_supply_register): Likewise.
* cris-tdep.c (cris_sigtramp_frame_unwind_cache, cris_scan_prologue)
(crisv32_scan_prologue, cris_unwind_pc, cris_register_size)
(cris_register_type, crisv32_register_type, crisv32_register_name)
(cris_dwarf2_frame_init_reg, find_step_target)
(cris_software_single_step, cris_supply_gregset)
(cris_regnums): Likewise.
* alpha-linux-nat.c (alpha_linux_register_u_offset): Likewise.
* aix-thread.c (special_register_p, supply_sprs64, supply_sprs32)
(fill_sprs64, fill_sprs32, store_regs_user_thread): Likewise.
* mips-linux-tdep.c (mips_linux_write_pc): Likewise.
* gdbarch.sh (PS_REGNUM): Replace by gdbarch_ps_regnum.
* dbug-rom.c (dbug_supply_register): Likewise.
* xtensa-tdep.c (xtensa_supply_gregset, xtensa_frame_cache)
(xtensa_frame_prev_register, xtensa_push_dummy_call): Likewise.
* win32-nat.c (win32_resume): Likewise.
* std-regs.c (value_of_builtin_frame_ps_reg)
(value_of_builtin_frame_pc_reg): Likewise.
* m68k-tdep.c (m68k_register_type): Likewise.
* m68klinux-nat.c (supply_gregset): Likewise.
* gdbarch.sh (FP0_REGNUM): Replace by gdbarch_fp0_regnum.
* sh-tdep.c (sh_extract_return_value_fpu, sh_store_return_value_fpu)
(sh2e_show_regs, sh2a_show_regs, sh3e_show_regs, sh4_show_regs)
(sh_sh2a_register_type, sh_sh3e_register_type, sh_sh4_register_type)
(fv_reg_base_num, dr_reg_base_num): Likewise.
* sh64-tdep.c (sh64_fv_reg_base_num, sh64_dr_reg_base_num)
(sh64_fpp_reg_base_num, sh64_compact_reg_base_num, sh64_push_dummy_call)
(sh64_extract_return_value, sh64_store_return_value)
(sh64_show_media_regs, sh64_show_compact_regs, sh64_register_type)
(sh64_do_fp_register, sh64_media_print_registers_info): Likewise.
* procfs.c (procfs_fetch_registers, procfs_store_registers)
(invalidate_cache): Likewise.
* ppc-linux-tdep.c (ppc_linux_sigtramp_cache): Likewise.
* mipsnbsd-tdep.c (mipsnbsd_supply_fpreg)
(mipsnbsd_fill_fpreg): Likewise.
* mipsnbsd-nat.c (mipsnbsd_fetch_inferior_registers)
(mipsnbsd_store_inferior_registers): Likewise.
* mips-linux-tdep.c (mips_supply_fpregset, mips_fill_fpregset)
(mips64_supply_fpregset, mips64_fill_fpregset): Likewise.
* mips-linux-nat.c (mips64_linux_register_addr): Likewise.
* m68k-tdep.c (m68k_register_type, m68k_convert_register_p): Likewise.
* m68klinux-nat.c (getfpregs_supplies, supply_fpregset)
(fill_fpregset): Likewise.
* irix5-nat.c (supply_fpregset, fill_fpregset): Likewise.
* i386-tdep.h (struct_return): Likewise (comment).
* i386-nto-tdep.c (i386nto_register_area): Likewise.
* go32-nat.c (fetch_register, go32_fetch_registers, store_register)
(go32_store_registers): Likewise.
* alpha-tdep.c (alpha_next_pc): Likewise.
* alpha-linux-nat.c (alpha_linux_register_u_offset): Likewise.
* alphabsd-nat.c (alphabsd_fetch_inferior_registers)
(alphabsd_store_inferior_registers): Likewise.
* core-regset.c (fetch_core_registers): Likewise.
* i386v4-nat.c (supply_fpregset, fill_fpregset): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.
2007-06-18 19:45:26 +02:00
|
|
|
&optimized, &lval, &addr, &realnum);
|
|
|
|
frame_register_unwind_location (get_next_frame (this_frame),
|
2007-10-09 20:14:09 +02:00
|
|
|
gdbarch_pc_regnum (gdbarch),
|
2007-09-24 23:34:58 +02:00
|
|
|
&optimized, &nlval, &naddr, &nrealnum);
|
2006-11-10 21:11:35 +01:00
|
|
|
|
2007-09-24 23:34:58 +02:00
|
|
|
if ((lval == lval_memory && lval == nlval && addr == naddr)
|
|
|
|
|| (lval == lval_register && lval == nlval && realnum == nrealnum))
|
2006-11-10 21:11:35 +01:00
|
|
|
{
|
|
|
|
if (frame_debug)
|
|
|
|
{
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "-> ");
|
|
|
|
fprint_frame (gdb_stdlog, NULL);
|
|
|
|
fprintf_unfiltered (gdb_stdlog, " // no saved PC }\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
this_frame->stop_reason = UNWIND_NO_SAVED_PC;
|
|
|
|
this_frame->prev = NULL;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-03-31 21:40:28 +02:00
|
|
|
/* Allocate the new frame but do not wire it in to the frame chain.
|
|
|
|
Some (bad) code in INIT_FRAME_EXTRA_INFO tries to look along
|
|
|
|
frame->next to pull some fancy tricks (of course such code is, by
|
|
|
|
definition, recursive). Try to prevent it.
|
|
|
|
|
|
|
|
There is no reason to worry about memory leaks, should the
|
|
|
|
remainder of the function fail. The allocated memory will be
|
|
|
|
quickly reclaimed when the frame cache is flushed, and the `we've
|
|
|
|
been here before' check above will stop repeated memory
|
|
|
|
allocation calls. */
|
|
|
|
prev_frame = FRAME_OBSTACK_ZALLOC (struct frame_info);
|
|
|
|
prev_frame->level = this_frame->level + 1;
|
|
|
|
|
|
|
|
/* Don't yet compute ->unwind (and hence ->type). It is computed
|
|
|
|
on-demand in get_frame_type, frame_register_unwind, and
|
|
|
|
get_frame_id. */
|
|
|
|
|
|
|
|
/* Don't yet compute the frame's ID. It is computed on-demand by
|
|
|
|
get_frame_id(). */
|
|
|
|
|
|
|
|
/* The unwound frame ID is validate at the start of this function,
|
|
|
|
as part of the logic to decide if that frame should be further
|
|
|
|
unwound, and not here while the prev frame is being created.
|
|
|
|
Doing this makes it possible for the user to examine a frame that
|
|
|
|
has an invalid frame ID.
|
|
|
|
|
|
|
|
Some very old VAX code noted: [...] For the sake of argument,
|
|
|
|
suppose that the stack is somewhat trashed (which is one reason
|
|
|
|
that "info frame" exists). So, return 0 (indicating we don't
|
|
|
|
know the address of the arglist) if we don't know what frame this
|
|
|
|
frame calls. */
|
|
|
|
|
|
|
|
/* Link it in. */
|
|
|
|
this_frame->prev = prev_frame;
|
|
|
|
prev_frame->next = this_frame;
|
|
|
|
|
|
|
|
if (frame_debug)
|
|
|
|
{
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "-> ");
|
|
|
|
fprint_frame (gdb_stdlog, prev_frame);
|
|
|
|
fprintf_unfiltered (gdb_stdlog, " }\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
return prev_frame;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Debug routine to print a NULL frame being returned. */
|
|
|
|
|
|
|
|
static void
|
|
|
|
frame_debug_got_null_frame (struct ui_file *file,
|
|
|
|
struct frame_info *this_frame,
|
|
|
|
const char *reason)
|
|
|
|
{
|
|
|
|
if (frame_debug)
|
|
|
|
{
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "{ get_prev_frame (this_frame=");
|
|
|
|
if (this_frame != NULL)
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "%d", this_frame->level);
|
|
|
|
else
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "<NULL>");
|
|
|
|
fprintf_unfiltered (gdb_stdlog, ") -> // %s}\n", reason);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-09-01 16:13:33 +02:00
|
|
|
/* Is this (non-sentinel) frame in the "main"() function? */
|
|
|
|
|
|
|
|
static int
|
|
|
|
inside_main_func (struct frame_info *this_frame)
|
|
|
|
{
|
|
|
|
struct minimal_symbol *msymbol;
|
|
|
|
CORE_ADDR maddr;
|
|
|
|
|
|
|
|
if (symfile_objfile == 0)
|
|
|
|
return 0;
|
|
|
|
msymbol = lookup_minimal_symbol (main_name (), NULL, symfile_objfile);
|
|
|
|
if (msymbol == NULL)
|
|
|
|
return 0;
|
|
|
|
/* Make certain that the code, and not descriptor, address is
|
|
|
|
returned. */
|
2007-10-09 20:14:09 +02:00
|
|
|
maddr = gdbarch_convert_from_func_ptr_addr (get_frame_arch (this_frame),
|
2004-09-01 16:13:33 +02:00
|
|
|
SYMBOL_VALUE_ADDRESS (msymbol),
|
|
|
|
¤t_target);
|
|
|
|
return maddr == get_frame_func (this_frame);
|
|
|
|
}
|
|
|
|
|
2004-11-10 22:17:58 +01:00
|
|
|
/* Test whether THIS_FRAME is inside the process entry point function. */
|
|
|
|
|
|
|
|
static int
|
|
|
|
inside_entry_func (struct frame_info *this_frame)
|
|
|
|
{
|
|
|
|
return (get_frame_func (this_frame) == entry_point_address ());
|
|
|
|
}
|
|
|
|
|
2004-03-31 21:40:28 +02:00
|
|
|
/* Return a structure containing various interesting information about
|
|
|
|
the frame that called THIS_FRAME. Returns NULL if there is entier
|
|
|
|
no such frame or the frame fails any of a set of target-independent
|
|
|
|
condition that should terminate the frame chain (e.g., as unwinding
|
|
|
|
past main()).
|
|
|
|
|
|
|
|
This function should not contain target-dependent tests, such as
|
|
|
|
checking whether the program-counter is zero. */
|
|
|
|
|
|
|
|
struct frame_info *
|
|
|
|
get_prev_frame (struct frame_info *this_frame)
|
|
|
|
{
|
|
|
|
struct frame_info *prev_frame;
|
|
|
|
|
2003-01-21 20:32:42 +01:00
|
|
|
/* Return the inner-most frame, when the caller passes in NULL. */
|
|
|
|
/* NOTE: cagney/2002-11-09: Not sure how this would happen. The
|
|
|
|
caller should have previously obtained a valid frame using
|
|
|
|
get_selected_frame() and then called this code - only possibility
|
|
|
|
I can think of is code behaving badly.
|
|
|
|
|
|
|
|
NOTE: cagney/2003-01-10: Talk about code behaving badly. Check
|
|
|
|
block_innermost_frame(). It does the sequence: frame = NULL;
|
|
|
|
while (1) { frame = get_prev_frame (frame); .... }. Ulgh! Why
|
|
|
|
it couldn't be written better, I don't know.
|
|
|
|
|
2004-04-17 02:48:25 +02:00
|
|
|
NOTE: cagney/2003-01-11: I suspect what is happening in
|
2003-01-21 20:32:42 +01:00
|
|
|
block_innermost_frame() is, when the target has no state
|
2004-04-17 02:48:25 +02:00
|
|
|
(registers, memory, ...), it is still calling this function. The
|
2003-01-21 20:32:42 +01:00
|
|
|
assumption being that this function will return NULL indicating
|
|
|
|
that a frame isn't possible, rather than checking that the target
|
|
|
|
has state and then calling get_current_frame() and
|
|
|
|
get_prev_frame(). This is a guess mind. */
|
2003-03-13 00:55:36 +01:00
|
|
|
if (this_frame == NULL)
|
2003-01-21 20:32:42 +01:00
|
|
|
{
|
|
|
|
/* NOTE: cagney/2002-11-09: There was a code segment here that
|
|
|
|
would error out when CURRENT_FRAME was NULL. The comment
|
|
|
|
that went with it made the claim ...
|
|
|
|
|
|
|
|
``This screws value_of_variable, which just wants a nice
|
|
|
|
clean NULL return from block_innermost_frame if there are no
|
|
|
|
frames. I don't think I've ever seen this message happen
|
|
|
|
otherwise. And returning NULL here is a perfectly legitimate
|
|
|
|
thing to do.''
|
|
|
|
|
|
|
|
Per the above, this code shouldn't even be called with a NULL
|
2003-03-13 00:55:36 +01:00
|
|
|
THIS_FRAME. */
|
2004-03-31 21:40:28 +02:00
|
|
|
frame_debug_got_null_frame (gdb_stdlog, this_frame, "this_frame NULL");
|
2003-01-21 20:32:42 +01:00
|
|
|
return current_frame;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* There is always a frame. If this assertion fails, suspect that
|
|
|
|
something should be calling get_selected_frame() or
|
|
|
|
get_current_frame(). */
|
2003-03-13 00:55:36 +01:00
|
|
|
gdb_assert (this_frame != NULL);
|
2003-01-21 20:32:42 +01:00
|
|
|
|
2004-12-08 02:56:16 +01:00
|
|
|
/* tausq/2004-12-07: Dummy frames are skipped because it doesn't make much
|
|
|
|
sense to stop unwinding at a dummy frame. One place where a dummy
|
|
|
|
frame may have an address "inside_main_func" is on HPUX. On HPUX, the
|
|
|
|
pcsqh register (space register for the instruction at the head of the
|
|
|
|
instruction queue) cannot be written directly; the only way to set it
|
|
|
|
is to branch to code that is in the target space. In order to implement
|
|
|
|
frame dummies on HPUX, the called function is made to jump back to where
|
|
|
|
the inferior was when the user function was called. If gdb was inside
|
|
|
|
the main function when we created the dummy frame, the dummy frame will
|
|
|
|
point inside the main function. */
|
2003-03-13 00:55:36 +01:00
|
|
|
if (this_frame->level >= 0
|
2004-12-08 02:56:16 +01:00
|
|
|
&& get_frame_type (this_frame) != DUMMY_FRAME
|
2003-08-09 17:10:09 +02:00
|
|
|
&& !backtrace_past_main
|
2004-09-01 16:13:33 +02:00
|
|
|
&& inside_main_func (this_frame))
|
|
|
|
/* Don't unwind past main(). Note, this is done _before_ the
|
|
|
|
frame has been marked as previously unwound. That way if the
|
|
|
|
user later decides to enable unwinds past main(), that will
|
|
|
|
automatically happen. */
|
2003-02-26 00:12:22 +01:00
|
|
|
{
|
2004-03-31 21:40:28 +02:00
|
|
|
frame_debug_got_null_frame (gdb_stdlog, this_frame, "inside main func");
|
2003-02-26 00:12:22 +01:00
|
|
|
return NULL;
|
|
|
|
}
|
2003-01-21 20:32:42 +01:00
|
|
|
|
2005-05-29 00:51:37 +02:00
|
|
|
/* If the user's backtrace limit has been exceeded, stop. We must
|
|
|
|
add two to the current level; one of those accounts for backtrace_limit
|
|
|
|
being 1-based and the level being 0-based, and the other accounts for
|
|
|
|
the level of the new frame instead of the level of the current
|
|
|
|
frame. */
|
|
|
|
if (this_frame->level + 2 > backtrace_limit)
|
2003-08-09 17:10:09 +02:00
|
|
|
{
|
2005-05-29 00:51:37 +02:00
|
|
|
frame_debug_got_null_frame (gdb_stdlog, this_frame,
|
|
|
|
"backtrace limit exceeded");
|
|
|
|
return NULL;
|
2003-08-09 17:10:09 +02:00
|
|
|
}
|
|
|
|
|
2003-07-15 19:23:32 +02:00
|
|
|
/* If we're already inside the entry function for the main objfile,
|
|
|
|
then it isn't valid. Don't apply this test to a dummy frame -
|
2004-04-17 02:48:25 +02:00
|
|
|
dummy frame PCs typically land in the entry func. Don't apply
|
2003-07-15 19:23:32 +02:00
|
|
|
this test to the sentinel frame. Sentinel frames should always
|
|
|
|
be allowed to unwind. */
|
2004-04-30 22:44:59 +02:00
|
|
|
/* NOTE: cagney/2003-07-07: Fixed a bug in inside_main_func() -
|
|
|
|
wasn't checking for "main" in the minimal symbols. With that
|
|
|
|
fixed asm-source tests now stop in "main" instead of halting the
|
2004-04-17 02:48:25 +02:00
|
|
|
backtrace in weird and wonderful ways somewhere inside the entry
|
2004-04-30 22:44:59 +02:00
|
|
|
file. Suspect that tests for inside the entry file/func were
|
|
|
|
added to work around that (now fixed) case. */
|
2003-07-15 19:23:32 +02:00
|
|
|
/* NOTE: cagney/2003-07-15: danielj (if I'm reading it right)
|
|
|
|
suggested having the inside_entry_func test use the
|
2004-04-17 02:48:25 +02:00
|
|
|
inside_main_func() msymbol trick (along with entry_point_address()
|
|
|
|
I guess) to determine the address range of the start function.
|
2003-07-15 19:23:32 +02:00
|
|
|
That should provide a far better stopper than the current
|
|
|
|
heuristics. */
|
2004-11-10 22:17:58 +01:00
|
|
|
/* NOTE: tausq/2004-10-09: this is needed if, for example, the compiler
|
|
|
|
applied tail-call optimizations to main so that a function called
|
|
|
|
from main returns directly to the caller of main. Since we don't
|
|
|
|
stop at main, we should at least stop at the entry point of the
|
|
|
|
application. */
|
|
|
|
if (!backtrace_past_entry
|
2004-11-11 00:26:33 +01:00
|
|
|
&& get_frame_type (this_frame) != DUMMY_FRAME && this_frame->level >= 0
|
2004-02-04 17:34:51 +01:00
|
|
|
&& inside_entry_func (this_frame))
|
2003-07-15 19:23:32 +02:00
|
|
|
{
|
2004-03-31 21:40:28 +02:00
|
|
|
frame_debug_got_null_frame (gdb_stdlog, this_frame, "inside entry func");
|
2003-07-15 19:23:32 +02:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2004-12-12 17:26:17 +01:00
|
|
|
/* Assume that the only way to get a zero PC is through something
|
|
|
|
like a SIGSEGV or a dummy frame, and hence that NORMAL frames
|
|
|
|
will never unwind a zero PC. */
|
|
|
|
if (this_frame->level > 0
|
|
|
|
&& get_frame_type (this_frame) == NORMAL_FRAME
|
|
|
|
&& get_frame_type (get_next_frame (this_frame)) == NORMAL_FRAME
|
|
|
|
&& get_frame_pc (this_frame) == 0)
|
|
|
|
{
|
|
|
|
frame_debug_got_null_frame (gdb_stdlog, this_frame, "zero PC");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2004-03-31 21:40:28 +02:00
|
|
|
return get_prev_frame_1 (this_frame);
|
2003-01-21 20:32:42 +01:00
|
|
|
}
|
|
|
|
|
2002-11-08 21:48:55 +01:00
|
|
|
CORE_ADDR
|
|
|
|
get_frame_pc (struct frame_info *frame)
|
|
|
|
{
|
2003-04-09 22:49:22 +02:00
|
|
|
gdb_assert (frame->next != NULL);
|
|
|
|
return frame_pc_unwind (frame->next);
|
2002-11-08 21:48:55 +01:00
|
|
|
}
|
|
|
|
|
* dwarf2-frame.c (dwarf2_frame_cache, dwarf2_frame_this_id)
(dwarf2_frame_sniffer): Update.
(dwarf2_signal_frame_this_id): New function.
(dwarf2_signal_frame_unwind): Use it.
(dwarf2_frame_base_sniffer): Use frame_unwind_address_in_block.
* frame.c (frame_func_unwind): Add this_type argument.
(get_frame_func): Update.
(frame_unwind_address_in_block): Add this_type argument and check it.
Fix a typo.
(get_frame_address_in_block): Update.
* frame.h (enum frame_type): Move higher in the file.
(frame_unwind_address_in_block, frame_func_unwind): Add enum frame_type
argument.
* alpha-mdebug-tdep.c, alpha-tdep.c, amd64-tdep.c, amd64obsd-tdep.c,
arm-tdep.c, avr-tdep.c, cris-tdep.c, frv-tdep.c, h8300-tdep.c,
hppa-tdep.c, i386-tdep.c, i386obsd-tdep.c, ia64-tdep.c,
libunwind-frame.c, m32c-tdep.c, m32r-linux-tdep.c, m32r-tdep.c,
m68hc11-tdep.c, m68k-tdep.c, m88k-tdep.c, mips-mdebug-tdep.c,
mips-tdep.c, mn10300-tdep.c, mt-tdep.c, rs6000-tdep.c, s390-tdep.c,
score-tdep.c, sh-tdep.c, sh64-tdep.c, sparc-tdep.c,
sparc64obsd-tdep.c, spu-tdep.c, v850-tdep.c, vax-tdep.c,
xstormy16-tdep.c, xtensa-tdep.c: Update calls to
frame_func_unwind and frame_unwind_address_in_block to specify
the frame type. Use frame_unwind_address_in_block instead of
frame_pc_unwind in sniffers.
* gdb.arch/i386-signal.c, gdb.arch/i386-signal.exp: New files.
2007-02-27 21:17:19 +01:00
|
|
|
/* Return an address that falls within NEXT_FRAME's caller's code
|
|
|
|
block, assuming that the caller is a THIS_TYPE frame. */
|
2003-07-11 16:52:17 +02:00
|
|
|
|
|
|
|
CORE_ADDR
|
* dwarf2-frame.c (dwarf2_frame_cache, dwarf2_frame_this_id)
(dwarf2_frame_sniffer): Update.
(dwarf2_signal_frame_this_id): New function.
(dwarf2_signal_frame_unwind): Use it.
(dwarf2_frame_base_sniffer): Use frame_unwind_address_in_block.
* frame.c (frame_func_unwind): Add this_type argument.
(get_frame_func): Update.
(frame_unwind_address_in_block): Add this_type argument and check it.
Fix a typo.
(get_frame_address_in_block): Update.
* frame.h (enum frame_type): Move higher in the file.
(frame_unwind_address_in_block, frame_func_unwind): Add enum frame_type
argument.
* alpha-mdebug-tdep.c, alpha-tdep.c, amd64-tdep.c, amd64obsd-tdep.c,
arm-tdep.c, avr-tdep.c, cris-tdep.c, frv-tdep.c, h8300-tdep.c,
hppa-tdep.c, i386-tdep.c, i386obsd-tdep.c, ia64-tdep.c,
libunwind-frame.c, m32c-tdep.c, m32r-linux-tdep.c, m32r-tdep.c,
m68hc11-tdep.c, m68k-tdep.c, m88k-tdep.c, mips-mdebug-tdep.c,
mips-tdep.c, mn10300-tdep.c, mt-tdep.c, rs6000-tdep.c, s390-tdep.c,
score-tdep.c, sh-tdep.c, sh64-tdep.c, sparc-tdep.c,
sparc64obsd-tdep.c, spu-tdep.c, v850-tdep.c, vax-tdep.c,
xstormy16-tdep.c, xtensa-tdep.c: Update calls to
frame_func_unwind and frame_unwind_address_in_block to specify
the frame type. Use frame_unwind_address_in_block instead of
frame_pc_unwind in sniffers.
* gdb.arch/i386-signal.c, gdb.arch/i386-signal.exp: New files.
2007-02-27 21:17:19 +01:00
|
|
|
frame_unwind_address_in_block (struct frame_info *next_frame,
|
|
|
|
enum frame_type this_type)
|
2003-07-11 16:52:17 +02:00
|
|
|
{
|
|
|
|
/* A draft address. */
|
|
|
|
CORE_ADDR pc = frame_pc_unwind (next_frame);
|
|
|
|
|
* dwarf2-frame.c (dwarf2_frame_cache, dwarf2_frame_this_id)
(dwarf2_frame_sniffer): Update.
(dwarf2_signal_frame_this_id): New function.
(dwarf2_signal_frame_unwind): Use it.
(dwarf2_frame_base_sniffer): Use frame_unwind_address_in_block.
* frame.c (frame_func_unwind): Add this_type argument.
(get_frame_func): Update.
(frame_unwind_address_in_block): Add this_type argument and check it.
Fix a typo.
(get_frame_address_in_block): Update.
* frame.h (enum frame_type): Move higher in the file.
(frame_unwind_address_in_block, frame_func_unwind): Add enum frame_type
argument.
* alpha-mdebug-tdep.c, alpha-tdep.c, amd64-tdep.c, amd64obsd-tdep.c,
arm-tdep.c, avr-tdep.c, cris-tdep.c, frv-tdep.c, h8300-tdep.c,
hppa-tdep.c, i386-tdep.c, i386obsd-tdep.c, ia64-tdep.c,
libunwind-frame.c, m32c-tdep.c, m32r-linux-tdep.c, m32r-tdep.c,
m68hc11-tdep.c, m68k-tdep.c, m88k-tdep.c, mips-mdebug-tdep.c,
mips-tdep.c, mn10300-tdep.c, mt-tdep.c, rs6000-tdep.c, s390-tdep.c,
score-tdep.c, sh-tdep.c, sh64-tdep.c, sparc-tdep.c,
sparc64obsd-tdep.c, spu-tdep.c, v850-tdep.c, vax-tdep.c,
xstormy16-tdep.c, xtensa-tdep.c: Update calls to
frame_func_unwind and frame_unwind_address_in_block to specify
the frame type. Use frame_unwind_address_in_block instead of
frame_pc_unwind in sniffers.
* gdb.arch/i386-signal.c, gdb.arch/i386-signal.exp: New files.
2007-02-27 21:17:19 +01:00
|
|
|
/* If NEXT_FRAME was called by a signal frame or dummy frame, then
|
|
|
|
we shold not adjust the unwound PC. These frames may not call
|
|
|
|
their next frame in the normal way; the operating system or GDB
|
|
|
|
may have pushed their resume address manually onto the stack, so
|
|
|
|
it may be the very first instruction. Even if the resume address
|
|
|
|
was not manually pushed, they expect to be returned to. */
|
|
|
|
if (this_type != NORMAL_FRAME)
|
|
|
|
return pc;
|
|
|
|
|
2003-07-11 16:52:17 +02:00
|
|
|
/* If THIS frame is not inner most (i.e., NEXT isn't the sentinel),
|
|
|
|
and NEXT is `normal' (i.e., not a sigtramp, dummy, ....) THIS
|
|
|
|
frame's PC ends up pointing at the instruction fallowing the
|
|
|
|
"call". Adjust that PC value so that it falls on the call
|
|
|
|
instruction (which, hopefully, falls within THIS frame's code
|
* dwarf2-frame.c (dwarf2_frame_cache, dwarf2_frame_this_id)
(dwarf2_frame_sniffer): Update.
(dwarf2_signal_frame_this_id): New function.
(dwarf2_signal_frame_unwind): Use it.
(dwarf2_frame_base_sniffer): Use frame_unwind_address_in_block.
* frame.c (frame_func_unwind): Add this_type argument.
(get_frame_func): Update.
(frame_unwind_address_in_block): Add this_type argument and check it.
Fix a typo.
(get_frame_address_in_block): Update.
* frame.h (enum frame_type): Move higher in the file.
(frame_unwind_address_in_block, frame_func_unwind): Add enum frame_type
argument.
* alpha-mdebug-tdep.c, alpha-tdep.c, amd64-tdep.c, amd64obsd-tdep.c,
arm-tdep.c, avr-tdep.c, cris-tdep.c, frv-tdep.c, h8300-tdep.c,
hppa-tdep.c, i386-tdep.c, i386obsd-tdep.c, ia64-tdep.c,
libunwind-frame.c, m32c-tdep.c, m32r-linux-tdep.c, m32r-tdep.c,
m68hc11-tdep.c, m68k-tdep.c, m88k-tdep.c, mips-mdebug-tdep.c,
mips-tdep.c, mn10300-tdep.c, mt-tdep.c, rs6000-tdep.c, s390-tdep.c,
score-tdep.c, sh-tdep.c, sh64-tdep.c, sparc-tdep.c,
sparc64obsd-tdep.c, spu-tdep.c, v850-tdep.c, vax-tdep.c,
xstormy16-tdep.c, xtensa-tdep.c: Update calls to
frame_func_unwind and frame_unwind_address_in_block to specify
the frame type. Use frame_unwind_address_in_block instead of
frame_pc_unwind in sniffers.
* gdb.arch/i386-signal.c, gdb.arch/i386-signal.exp: New files.
2007-02-27 21:17:19 +01:00
|
|
|
block). So far it's proved to be a very good approximation. See
|
2004-04-17 02:48:25 +02:00
|
|
|
get_frame_type() for why ->type can't be used. */
|
2003-07-11 16:52:17 +02:00
|
|
|
if (next_frame->level >= 0
|
|
|
|
&& get_frame_type (next_frame) == NORMAL_FRAME)
|
|
|
|
--pc;
|
|
|
|
return pc;
|
|
|
|
}
|
|
|
|
|
|
|
|
CORE_ADDR
|
|
|
|
get_frame_address_in_block (struct frame_info *this_frame)
|
|
|
|
{
|
* dwarf2-frame.c (dwarf2_frame_cache, dwarf2_frame_this_id)
(dwarf2_frame_sniffer): Update.
(dwarf2_signal_frame_this_id): New function.
(dwarf2_signal_frame_unwind): Use it.
(dwarf2_frame_base_sniffer): Use frame_unwind_address_in_block.
* frame.c (frame_func_unwind): Add this_type argument.
(get_frame_func): Update.
(frame_unwind_address_in_block): Add this_type argument and check it.
Fix a typo.
(get_frame_address_in_block): Update.
* frame.h (enum frame_type): Move higher in the file.
(frame_unwind_address_in_block, frame_func_unwind): Add enum frame_type
argument.
* alpha-mdebug-tdep.c, alpha-tdep.c, amd64-tdep.c, amd64obsd-tdep.c,
arm-tdep.c, avr-tdep.c, cris-tdep.c, frv-tdep.c, h8300-tdep.c,
hppa-tdep.c, i386-tdep.c, i386obsd-tdep.c, ia64-tdep.c,
libunwind-frame.c, m32c-tdep.c, m32r-linux-tdep.c, m32r-tdep.c,
m68hc11-tdep.c, m68k-tdep.c, m88k-tdep.c, mips-mdebug-tdep.c,
mips-tdep.c, mn10300-tdep.c, mt-tdep.c, rs6000-tdep.c, s390-tdep.c,
score-tdep.c, sh-tdep.c, sh64-tdep.c, sparc-tdep.c,
sparc64obsd-tdep.c, spu-tdep.c, v850-tdep.c, vax-tdep.c,
xstormy16-tdep.c, xtensa-tdep.c: Update calls to
frame_func_unwind and frame_unwind_address_in_block to specify
the frame type. Use frame_unwind_address_in_block instead of
frame_pc_unwind in sniffers.
* gdb.arch/i386-signal.c, gdb.arch/i386-signal.exp: New files.
2007-02-27 21:17:19 +01:00
|
|
|
return frame_unwind_address_in_block (this_frame->next,
|
|
|
|
get_frame_type (this_frame));
|
2003-07-11 16:52:17 +02:00
|
|
|
}
|
|
|
|
|
2002-11-29 02:52:02 +01:00
|
|
|
static int
|
|
|
|
pc_notcurrent (struct frame_info *frame)
|
|
|
|
{
|
|
|
|
/* If FRAME is not the innermost frame, that normally means that
|
|
|
|
FRAME->pc points at the return instruction (which is *after* the
|
|
|
|
call instruction), and we want to get the line containing the
|
|
|
|
call (because the call is where the user thinks the program is).
|
|
|
|
However, if the next frame is either a SIGTRAMP_FRAME or a
|
|
|
|
DUMMY_FRAME, then the next frame will contain a saved interrupt
|
|
|
|
PC and such a PC indicates the current (rather than next)
|
|
|
|
instruction/line, consequently, for such cases, want to get the
|
|
|
|
line containing fi->pc. */
|
|
|
|
struct frame_info *next = get_next_frame (frame);
|
|
|
|
int notcurrent = (next != NULL && get_frame_type (next) == NORMAL_FRAME);
|
|
|
|
return notcurrent;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
find_frame_sal (struct frame_info *frame, struct symtab_and_line *sal)
|
|
|
|
{
|
2003-04-04 23:04:33 +02:00
|
|
|
(*sal) = find_pc_line (get_frame_pc (frame), pc_notcurrent (frame));
|
2002-11-29 02:52:02 +01:00
|
|
|
}
|
|
|
|
|
2002-11-19 Andrew Cagney <ac131313@redhat.com>
* frame.h (FRAME_FP): Delete macro.
(get_frame_base): New function declaration.
* frame.c (get_frame_base): New function.
(get_frame_id): Use ->frame.
(frame_find_by_id): Rewrite to use get_frame_id.
* blockframe.c: Use get_frame_base instead of FRAME_FP.
* cris-tdep.c, d10v-tdep.c, findvar.c, h8500-tdep.c: Ditto.
* hppa-tdep.c, i386-tdep.c, infcmd.c, infrun.c: Ditto.
* m68hc11-tdep.c, m68k-tdep.c, mcore-tdep.c, mips-tdep.c: Ditto.
* mn10200-tdep.c, mn10300-tdep.c, rs6000-tdep.c: Ditto.
* sh-tdep.c, sparc-tdep.c, stack.c, tracepoint.c: Ditto.
* v850-tdep.c, valops.c, z8k-tdep.c: Ditto.
2002-11-24 20:48:13 +01:00
|
|
|
/* Per "frame.h", return the ``address'' of the frame. Code should
|
|
|
|
really be using get_frame_id(). */
|
|
|
|
CORE_ADDR
|
|
|
|
get_frame_base (struct frame_info *fi)
|
|
|
|
{
|
2003-04-10 05:30:36 +02:00
|
|
|
return get_frame_id (fi).stack_addr;
|
2002-11-19 Andrew Cagney <ac131313@redhat.com>
* frame.h (FRAME_FP): Delete macro.
(get_frame_base): New function declaration.
* frame.c (get_frame_base): New function.
(get_frame_id): Use ->frame.
(frame_find_by_id): Rewrite to use get_frame_id.
* blockframe.c: Use get_frame_base instead of FRAME_FP.
* cris-tdep.c, d10v-tdep.c, findvar.c, h8500-tdep.c: Ditto.
* hppa-tdep.c, i386-tdep.c, infcmd.c, infrun.c: Ditto.
* m68hc11-tdep.c, m68k-tdep.c, mcore-tdep.c, mips-tdep.c: Ditto.
* mn10200-tdep.c, mn10300-tdep.c, rs6000-tdep.c: Ditto.
* sh-tdep.c, sparc-tdep.c, stack.c, tracepoint.c: Ditto.
* v850-tdep.c, valops.c, z8k-tdep.c: Ditto.
2002-11-24 20:48:13 +01:00
|
|
|
}
|
|
|
|
|
2003-04-01 21:11:01 +02:00
|
|
|
/* High-level offsets into the frame. Used by the debug info. */
|
|
|
|
|
|
|
|
CORE_ADDR
|
|
|
|
get_frame_base_address (struct frame_info *fi)
|
|
|
|
{
|
2003-04-05 05:56:00 +02:00
|
|
|
if (get_frame_type (fi) != NORMAL_FRAME)
|
2003-04-01 21:11:01 +02:00
|
|
|
return 0;
|
|
|
|
if (fi->base == NULL)
|
2003-07-15 19:35:00 +02:00
|
|
|
fi->base = frame_base_find_by_frame (fi->next);
|
2003-04-01 21:11:01 +02:00
|
|
|
/* Sneaky: If the low-level unwind and high-level base code share a
|
|
|
|
common unwinder, let them share the prologue cache. */
|
|
|
|
if (fi->base->unwind == fi->unwind)
|
|
|
|
return fi->base->this_base (fi->next, &fi->prologue_cache);
|
|
|
|
return fi->base->this_base (fi->next, &fi->base_cache);
|
|
|
|
}
|
|
|
|
|
|
|
|
CORE_ADDR
|
|
|
|
get_frame_locals_address (struct frame_info *fi)
|
|
|
|
{
|
|
|
|
void **cache;
|
2003-04-05 05:56:00 +02:00
|
|
|
if (get_frame_type (fi) != NORMAL_FRAME)
|
2003-04-01 21:11:01 +02:00
|
|
|
return 0;
|
|
|
|
/* If there isn't a frame address method, find it. */
|
|
|
|
if (fi->base == NULL)
|
2003-07-15 19:35:00 +02:00
|
|
|
fi->base = frame_base_find_by_frame (fi->next);
|
2003-04-01 21:11:01 +02:00
|
|
|
/* Sneaky: If the low-level unwind and high-level base code share a
|
|
|
|
common unwinder, let them share the prologue cache. */
|
|
|
|
if (fi->base->unwind == fi->unwind)
|
|
|
|
cache = &fi->prologue_cache;
|
|
|
|
else
|
|
|
|
cache = &fi->base_cache;
|
|
|
|
return fi->base->this_locals (fi->next, cache);
|
|
|
|
}
|
|
|
|
|
|
|
|
CORE_ADDR
|
|
|
|
get_frame_args_address (struct frame_info *fi)
|
|
|
|
{
|
|
|
|
void **cache;
|
2003-04-05 05:56:00 +02:00
|
|
|
if (get_frame_type (fi) != NORMAL_FRAME)
|
2003-04-01 21:11:01 +02:00
|
|
|
return 0;
|
|
|
|
/* If there isn't a frame address method, find it. */
|
|
|
|
if (fi->base == NULL)
|
2003-07-15 19:35:00 +02:00
|
|
|
fi->base = frame_base_find_by_frame (fi->next);
|
2003-04-01 21:11:01 +02:00
|
|
|
/* Sneaky: If the low-level unwind and high-level base code share a
|
|
|
|
common unwinder, let them share the prologue cache. */
|
|
|
|
if (fi->base->unwind == fi->unwind)
|
|
|
|
cache = &fi->prologue_cache;
|
|
|
|
else
|
|
|
|
cache = &fi->base_cache;
|
|
|
|
return fi->base->this_args (fi->next, cache);
|
|
|
|
}
|
|
|
|
|
2002-11-19 01:46:00 +01:00
|
|
|
/* Level of the selected frame: 0 for innermost, 1 for its caller, ...
|
|
|
|
or -1 for a NULL frame. */
|
|
|
|
|
|
|
|
int
|
|
|
|
frame_relative_level (struct frame_info *fi)
|
|
|
|
{
|
|
|
|
if (fi == NULL)
|
|
|
|
return -1;
|
|
|
|
else
|
|
|
|
return fi->level;
|
|
|
|
}
|
|
|
|
|
2002-11-18 23:19:33 +01:00
|
|
|
enum frame_type
|
|
|
|
get_frame_type (struct frame_info *frame)
|
|
|
|
{
|
2004-07-31 23:41:50 +02:00
|
|
|
if (frame->unwind == NULL)
|
|
|
|
/* Initialize the frame's unwinder because that's what
|
|
|
|
provides the frame's type. */
|
|
|
|
frame->unwind = frame_unwind_find_by_frame (frame->next,
|
|
|
|
&frame->prologue_cache);
|
|
|
|
return frame->unwind->type;
|
2002-11-18 23:19:33 +01:00
|
|
|
}
|
|
|
|
|
2002-12-13 22:57:40 +01:00
|
|
|
void
|
2002-12-18 19:03:42 +01:00
|
|
|
deprecated_update_frame_pc_hack (struct frame_info *frame, CORE_ADDR pc)
|
2002-12-13 22:57:40 +01:00
|
|
|
{
|
2003-04-10 17:32:27 +02:00
|
|
|
if (frame_debug)
|
|
|
|
fprintf_unfiltered (gdb_stdlog,
|
|
|
|
"{ deprecated_update_frame_pc_hack (frame=%d,pc=0x%s) }\n",
|
|
|
|
frame->level, paddr_nz (pc));
|
2003-03-11 18:47:13 +01:00
|
|
|
/* NOTE: cagney/2003-03-11: Some architectures (e.g., Arm) are
|
2004-04-17 02:48:25 +02:00
|
|
|
maintaining a locally allocated frame object. Since such frames
|
2003-03-11 18:47:13 +01:00
|
|
|
are not in the frame chain, it isn't possible to assume that the
|
|
|
|
frame has a next. Sigh. */
|
|
|
|
if (frame->next != NULL)
|
|
|
|
{
|
|
|
|
/* While we're at it, update this frame's cached PC value, found
|
|
|
|
in the next frame. Oh for the day when "struct frame_info"
|
|
|
|
is opaque and this hack on hack can just go away. */
|
2003-04-09 22:49:22 +02:00
|
|
|
frame->next->prev_pc.value = pc;
|
|
|
|
frame->next->prev_pc.p = 1;
|
2003-03-11 18:47:13 +01:00
|
|
|
}
|
2002-12-18 19:03:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
deprecated_update_frame_base_hack (struct frame_info *frame, CORE_ADDR base)
|
|
|
|
{
|
2003-04-10 17:32:27 +02:00
|
|
|
if (frame_debug)
|
|
|
|
fprintf_unfiltered (gdb_stdlog,
|
|
|
|
"{ deprecated_update_frame_base_hack (frame=%d,base=0x%s) }\n",
|
|
|
|
frame->level, paddr_nz (base));
|
2002-12-18 19:03:42 +01:00
|
|
|
/* See comment in "frame.h". */
|
2003-04-10 05:30:36 +02:00
|
|
|
frame->this_id.value.stack_addr = base;
|
2002-12-13 22:57:40 +01:00
|
|
|
}
|
|
|
|
|
2003-06-03 20:53:37 +02:00
|
|
|
/* Memory access methods. */
|
|
|
|
|
|
|
|
void
|
2005-05-22 Andrew Cagney <cagney@gnu.org>
* frame.h (frame_register_unwind, frame_unwind_register)
(get_frame_register, frame_register, put_frame_register)
(get_frame_memory, safe_frame_unwind_memory)
(frame_register_read): Use gdb_byte for byte buffer parameters.
* trad-frame.h (trad_frame_get_register)
(frame_get_prev_register): Ditto.
* frame-unwind.h (frame_prev_register_ftype): Ditto.
* frame.c (frame_pop, frame_register, frame_unwind_register)
(get_frame_register, frame_unwind_register_signed)
(frame_unwind_register_unsigned, frame_unwind_unsigned_register)
(frame_register_read, get_frame_memory): Update.
* trad-frame.c (trad_frame_get_prev_register): Update.
(trad_frame_get_register): Update.
* gdbcore.h (deprecated_read_memory_nobpt, read_memory): Ditto.
* breakpoint.c (deprecated_read_memory_nobpt): Update.
* corefile.c (read_memory): Update.
* tramp-frame.c (tramp_frame_prev_register): Update.
* valops.c (value_assign): Update.
* sentinel-frame.c (sentinel_frame_prev_register): Update.
* std-regs.c (value_of_builtin_frame_fp_reg)
(value_of_builtin_frame_pc_reg): Update.
* infcmd.c (default_print_registers_info): Update
* dummy-frame.c (dummy_frame_prev_register): Update.
* findvar.c (value_of_register, value_from_register): Update.
* tui/tui-regs.c (tui_register_format, tui_get_register): Update.
* mi/mi-main.c (register_changed_p, get_register): Update.
2005-05-22 16:53:35 +02:00
|
|
|
get_frame_memory (struct frame_info *this_frame, CORE_ADDR addr,
|
|
|
|
gdb_byte *buf, int len)
|
2003-06-03 20:53:37 +02:00
|
|
|
{
|
|
|
|
read_memory (addr, buf, len);
|
|
|
|
}
|
|
|
|
|
|
|
|
LONGEST
|
|
|
|
get_frame_memory_signed (struct frame_info *this_frame, CORE_ADDR addr,
|
|
|
|
int len)
|
|
|
|
{
|
|
|
|
return read_memory_integer (addr, len);
|
|
|
|
}
|
|
|
|
|
|
|
|
ULONGEST
|
|
|
|
get_frame_memory_unsigned (struct frame_info *this_frame, CORE_ADDR addr,
|
|
|
|
int len)
|
|
|
|
{
|
|
|
|
return read_memory_unsigned_integer (addr, len);
|
|
|
|
}
|
|
|
|
|
2004-04-02 21:44:25 +02:00
|
|
|
int
|
|
|
|
safe_frame_unwind_memory (struct frame_info *this_frame,
|
2005-05-22 Andrew Cagney <cagney@gnu.org>
* frame.h (frame_register_unwind, frame_unwind_register)
(get_frame_register, frame_register, put_frame_register)
(get_frame_memory, safe_frame_unwind_memory)
(frame_register_read): Use gdb_byte for byte buffer parameters.
* trad-frame.h (trad_frame_get_register)
(frame_get_prev_register): Ditto.
* frame-unwind.h (frame_prev_register_ftype): Ditto.
* frame.c (frame_pop, frame_register, frame_unwind_register)
(get_frame_register, frame_unwind_register_signed)
(frame_unwind_register_unsigned, frame_unwind_unsigned_register)
(frame_register_read, get_frame_memory): Update.
* trad-frame.c (trad_frame_get_prev_register): Update.
(trad_frame_get_register): Update.
* gdbcore.h (deprecated_read_memory_nobpt, read_memory): Ditto.
* breakpoint.c (deprecated_read_memory_nobpt): Update.
* corefile.c (read_memory): Update.
* tramp-frame.c (tramp_frame_prev_register): Update.
* valops.c (value_assign): Update.
* sentinel-frame.c (sentinel_frame_prev_register): Update.
* std-regs.c (value_of_builtin_frame_fp_reg)
(value_of_builtin_frame_pc_reg): Update.
* infcmd.c (default_print_registers_info): Update
* dummy-frame.c (dummy_frame_prev_register): Update.
* findvar.c (value_of_register, value_from_register): Update.
* tui/tui-regs.c (tui_register_format, tui_get_register): Update.
* mi/mi-main.c (register_changed_p, get_register): Update.
2005-05-22 16:53:35 +02:00
|
|
|
CORE_ADDR addr, gdb_byte *buf, int len)
|
2004-04-02 21:44:25 +02:00
|
|
|
{
|
2006-08-08 23:32:48 +02:00
|
|
|
/* NOTE: read_memory_nobpt returns zero on success! */
|
|
|
|
return !read_memory_nobpt (addr, buf, len);
|
2004-04-02 21:44:25 +02:00
|
|
|
}
|
|
|
|
|
2003-06-03 20:53:37 +02:00
|
|
|
/* Architecture method. */
|
|
|
|
|
|
|
|
struct gdbarch *
|
|
|
|
get_frame_arch (struct frame_info *this_frame)
|
|
|
|
{
|
|
|
|
return current_gdbarch;
|
|
|
|
}
|
|
|
|
|
2003-06-09 03:02:07 +02:00
|
|
|
/* Stack pointer methods. */
|
|
|
|
|
|
|
|
CORE_ADDR
|
|
|
|
get_frame_sp (struct frame_info *this_frame)
|
|
|
|
{
|
|
|
|
return frame_sp_unwind (this_frame->next);
|
|
|
|
}
|
|
|
|
|
|
|
|
CORE_ADDR
|
|
|
|
frame_sp_unwind (struct frame_info *next_frame)
|
|
|
|
{
|
2007-10-09 20:14:09 +02:00
|
|
|
struct gdbarch *gdbarch = get_frame_arch (next_frame);
|
2004-04-17 02:48:25 +02:00
|
|
|
/* Normality - an architecture that provides a way of obtaining any
|
2003-06-09 03:02:07 +02:00
|
|
|
frame inner-most address. */
|
2007-10-09 20:14:09 +02:00
|
|
|
if (gdbarch_unwind_sp_p (gdbarch))
|
|
|
|
return gdbarch_unwind_sp (gdbarch, next_frame);
|
2003-06-09 03:02:07 +02:00
|
|
|
/* Now things are really are grim. Hope that the value returned by
|
2007-06-18 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (SP_REGNUM): Replace by gdbarch_sp_regnum.
* v850-tdep.c (v850_unwind_sp): Likewise.
* std-regs.c (value_of_builtin_frame_sp_reg): Likewise.
* stack.c (frame_info): Likewise.
* stabsread.c (define_symbol): Likewise.
* sh-tdep.c (sh_push_dummy_call_fpu, sh_push_dummy_call_nofpu)
(sh_dwarf2_frame_init_reg, sh_frame_cache, sh_frame_prev_register)
(sh_unwind_sp): Likewise.
* sh64-tdep.c (sh64_push_dummy_call, sh64_frame_cache)
(sh64_frame_prev_register, sh64_unwind_sp): Likewise.
* rs6000-tdep.c (rs6000_push_dummy_call, rs6000_unwind_dummy_id)
(rs6000_frame_cache): Likewise.
* rs6000-nat.c (store_register): Likewise.
* remote-mips.c (mips_wait): Likewise.
* procfs.c (procfs_fetch_registers, procfs_store_registers): Likewise.
* ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call)
(ppc64_sysv_abi_push_dummy_call): Likewise.
* ppcobsd-tdep.c (ppcobsd_sigtramp_frame_cache): Likewise.
* ppcobsd-nat.c (ppcobsd_supply_pcb): Likewise.
* ppcnbsd-tdep.c (ppcnbsd_sigtramp_cache_init): Likewise.
* ppc-linux-tdep.c (ppc_linux_sigtramp_cache): Likewise.
* m32r-rom.c (m32r_supply_register): Likewise.
* frame.c (frame_sp_unwind): Likewise.
* mips-tdep.c (mips_insn16_frame_cache)
(mips_insn32_frame_cache): Likewise (comment).
* m68klinux-nat.c (supply_gregset): Likewise.
* m68k-tdep.c (m68k_get_longjmp_target): Likewise.
* ia64-tdep.c (ia64_frame_prev_register): Likewise.
* i386-tdep.c (i386_get_longjmp_target): Likewise.
* dwarf2-frame.c (dwarf2_frame_default_init_reg): Likewise.
* cris-tdep.c (cris_regnums, cris_sigcontext_addr)
(cris_sigtramp_frame_unwind_cache, cris_push_dummy_call)
(cris_scan_prologue, crisv32_scan_prologue, cris_unwind_sp)
(cris_register_type, crisv32_register_type)
(cris_dwarf2_frame_init_reg): Likewise.
* arch-utils.c (legacy_virtual_frame_pointer): Likewise.
* amd64-tdep.c (amd64_frame_prev_register): Likewise.
* amd64-linux-tdep.c (amd64_linux_sigcontext_addr): Likewise.
* libunwind-frame.c (libunwind_frame_cache): Likewise.
* gdbarch.sh (PC_REGNUM): Replace by gdbarch_pc_regnum.
* regcache.c (read_pc_pid, generic_target_write_pc): Likewise.
* xtensa-tdep.c (xtensa_register_type, xtensa_supply_gregset)
(xtensa_unwind_pc, xtensa_frame_cache, xtensa_frame_prev_register)
(xtensa_extract_return_value, xtensa_store_return_value): Likewise.
* v850-tdep.c (v850_unwind_pc): Likewise.
* stack.c (frame_info): Likewise.
* sh-tdep.c (sh_generic_show_regs, sh3_show_regs, sh2e_show_regs)
(sh2a_show_regs, sh2a_nofpu_show_regs, sh3e_show_regs)
(sh3_dsp_show_regs, sh4_show_regs, sh4_nofpu_show_regs)
(sh_dwarf2_frame_init_reg, sh_frame_prev_register, sh_unwind_pc)
(sh_dsp_show_regs): Likewise.
* shnbsd-tdep.c (shnbsd_supply_gregset)
(shnbsd_collect_gregset): Likewise.
* shnbsd-nat.c (GETREGS_SUPPLIES): Likewise.
* sh64-tdep.c (sh64_compact_reg_base_num, sh64_show_media_regs)
(sh64_frame_prev_register, sh64_unwind_pc): Likewise.
* rs6000-tdep.c (ppc_supply_gregset, ppc_collect_gregset)
(6000_register_reggroup_p, rs6000_unwind_pc)
(rs6000_frame_cache): Likewise.
* rs6000-nat.c (regmap, rs6000_fetch_inferior_registers)
(rs6000_store_inferior_registers): Likewise.
* remote-mips.c (mips_wait, mips_load): Likewise.
* procfs.c (procfs_fetch_registers, procfs_store_registers): Likewise.
* ppcobsd-tdep.c (ppcobsd_sigtramp_frame_cache): Likewise.
* ppcobsd-nat.c (ppcobsd_supply_pcb): Likewise.
* ppcnbsd-tdep.c (ppcnbsd_sigtramp_cache_init): Likewise.
* ppcnbsd-nat.c (getregs_supplies, ppcnbsd_supply_pcb): Likewise.
* ppc-linux-tdep.c (ppc_linux_sigtramp_cache): Likewise.
* ppc-linux-nat.c (ppc_register_u_addr, fetch_ppc_registers)
(store_ppc_registers, fill_gregset): Likewise.
* mips-tdep.c (mips_stub_frame_cache, mips_gdbarch_init): Likewise.
* mipsnbsd-tdep.c (mipsnbsd_supply_reg, mipsnbsd_fill_reg): Likewise.
* mipsnbsd-nat.c (getregs_supplies): Likewise.
* m68k-tdep.c (m68k_register_type, m68k_unwind_pc): Likewise.
* m68klinux-nat.c (supply_gregset): Likewise.
* irix5-nat.c (fill_gregset): Likewise.
* i386-tdep.c (i386_unwind_pc): Likewise.
* i386-linux-nat.c (i386_linux_resume): Likewise.
* frame.c (get_prev_frame_1): Likewise.
* dwarf2-frame.c (dwarf2_frame_default_init_reg): Likewise.
* dbug-rom.c (dbug_supply_register): Likewise.
* cris-tdep.c (cris_sigtramp_frame_unwind_cache, cris_scan_prologue)
(crisv32_scan_prologue, cris_unwind_pc, cris_register_size)
(cris_register_type, crisv32_register_type, crisv32_register_name)
(cris_dwarf2_frame_init_reg, find_step_target)
(cris_software_single_step, cris_supply_gregset)
(cris_regnums): Likewise.
* alpha-linux-nat.c (alpha_linux_register_u_offset): Likewise.
* aix-thread.c (special_register_p, supply_sprs64, supply_sprs32)
(fill_sprs64, fill_sprs32, store_regs_user_thread): Likewise.
* mips-linux-tdep.c (mips_linux_write_pc): Likewise.
* gdbarch.sh (PS_REGNUM): Replace by gdbarch_ps_regnum.
* dbug-rom.c (dbug_supply_register): Likewise.
* xtensa-tdep.c (xtensa_supply_gregset, xtensa_frame_cache)
(xtensa_frame_prev_register, xtensa_push_dummy_call): Likewise.
* win32-nat.c (win32_resume): Likewise.
* std-regs.c (value_of_builtin_frame_ps_reg)
(value_of_builtin_frame_pc_reg): Likewise.
* m68k-tdep.c (m68k_register_type): Likewise.
* m68klinux-nat.c (supply_gregset): Likewise.
* gdbarch.sh (FP0_REGNUM): Replace by gdbarch_fp0_regnum.
* sh-tdep.c (sh_extract_return_value_fpu, sh_store_return_value_fpu)
(sh2e_show_regs, sh2a_show_regs, sh3e_show_regs, sh4_show_regs)
(sh_sh2a_register_type, sh_sh3e_register_type, sh_sh4_register_type)
(fv_reg_base_num, dr_reg_base_num): Likewise.
* sh64-tdep.c (sh64_fv_reg_base_num, sh64_dr_reg_base_num)
(sh64_fpp_reg_base_num, sh64_compact_reg_base_num, sh64_push_dummy_call)
(sh64_extract_return_value, sh64_store_return_value)
(sh64_show_media_regs, sh64_show_compact_regs, sh64_register_type)
(sh64_do_fp_register, sh64_media_print_registers_info): Likewise.
* procfs.c (procfs_fetch_registers, procfs_store_registers)
(invalidate_cache): Likewise.
* ppc-linux-tdep.c (ppc_linux_sigtramp_cache): Likewise.
* mipsnbsd-tdep.c (mipsnbsd_supply_fpreg)
(mipsnbsd_fill_fpreg): Likewise.
* mipsnbsd-nat.c (mipsnbsd_fetch_inferior_registers)
(mipsnbsd_store_inferior_registers): Likewise.
* mips-linux-tdep.c (mips_supply_fpregset, mips_fill_fpregset)
(mips64_supply_fpregset, mips64_fill_fpregset): Likewise.
* mips-linux-nat.c (mips64_linux_register_addr): Likewise.
* m68k-tdep.c (m68k_register_type, m68k_convert_register_p): Likewise.
* m68klinux-nat.c (getfpregs_supplies, supply_fpregset)
(fill_fpregset): Likewise.
* irix5-nat.c (supply_fpregset, fill_fpregset): Likewise.
* i386-tdep.h (struct_return): Likewise (comment).
* i386-nto-tdep.c (i386nto_register_area): Likewise.
* go32-nat.c (fetch_register, go32_fetch_registers, store_register)
(go32_store_registers): Likewise.
* alpha-tdep.c (alpha_next_pc): Likewise.
* alpha-linux-nat.c (alpha_linux_register_u_offset): Likewise.
* alphabsd-nat.c (alphabsd_fetch_inferior_registers)
(alphabsd_store_inferior_registers): Likewise.
* core-regset.c (fetch_core_registers): Likewise.
* i386v4-nat.c (supply_fpregset, fill_fpregset): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.
2007-06-18 19:45:26 +02:00
|
|
|
the gdbarch_sp_regnum register is meaningful. */
|
2007-10-09 20:14:09 +02:00
|
|
|
if (gdbarch_sp_regnum (gdbarch) >= 0)
|
2007-10-17 15:36:45 +02:00
|
|
|
return frame_unwind_register_unsigned (next_frame,
|
|
|
|
gdbarch_sp_regnum (gdbarch));
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up error_no_arg, query, perror_with_name, complaint, and
internal_error.
* breakpoint.c, cp-abi.c, cp-namespace.c, cp-support.c: Update.
* cris-tdep.c, dbxread.c, dictionary.c, dsrec.c: Update.
* dummy-frame.c, dve3900-rom.c, dwarf2-frame.c, dwarf2expr.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, event-loop.c: Update.
* exceptions.c, exec.c, f-lang.c, findvar.c, fork-child.c: Update.
* frame-unwind.c, frame.c, frv-linux-tdep.c, frv-tdep.c: Update.
* gdb_assert.h, gdbarch.c, gdbtypes.c, gnu-nat.c: Update.
* go32-nat.c, hppa-tdep.c, hppabsd-nat.c, hpread.c: Update.
* i386-linux-nat.c, i386-nat.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386fbsd-nat.c, inf-ptrace.c, inf-ttrace.c, infcall.c: Update.
* infcmd.c, inflow.c, infptrace.c, infrun.c, inftarg.c: Update.
* interps.c, language.c, linespec.c, linux-nat.c: Update.
* m32r-linux-nat.c, m68k-tdep.c, m68kbsd-nat.c: Update.
* m68klinux-nat.c, m88kbsd-nat.c, macroexp.c, macroscope.c: Update.
* macrotab.c, maint.c, mdebugread.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mips64obsd-nat.c: Update.
* mipsnbsd-nat.c, mn10300-tdep.c, monitor.c, nto-procfs.c: Update.
* objc-lang.c, objfiles.c, objfiles.h, ocd.c, osabi.c: Update.
* parse.c, ppc-bdm.c, ppc-linux-nat.c, ppc-sysv-tdep.c: Update.
* ppcnbsd-nat.c, ppcobsd-nat.c, printcmd.c, procfs.c: Update.
* regcache.c, reggroups.c, remote-e7000.c, remote-mips.c: Update.
* remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote.c, rs6000-nat.c, rs6000-tdep.c: Update.
* s390-nat.c, s390-tdep.c, sentinel-frame.c, serial.c: Update.
* sh-tdep.c, sh3-rom.c, sh64-tdep.c, shnbsd-nat.c: Update.
* solib-aix5.c, solib-svr4.c, solib.c, source.c: Update.
* sparc-nat.c, stabsread.c, stack.c, symfile.c, symtab.c: Update.
* symtab.h, target.c, tracepoint.c, ui-file.c, ui-out.c: Update.
* utils.c, valops.c, valprint.c, vax-nat.c, vaxbsd-nat.c: Update.
* win32-nat.c, xcoffread.c, xstormy16-tdep.c: Update.
* cli/cli-cmds.c, cli/cli-logging.c, cli/cli-script.c: Update.
* cli/cli-setshow.c, mi/mi-cmd-break.c, mi/mi-cmds.c: Update.
* mi/mi-console.c, mi/mi-getopt.c, mi/mi-out.c: Update.
* tui/tui-file.c, tui/tui-interp.c: Update.
2005-02-11 19:13:55 +01:00
|
|
|
internal_error (__FILE__, __LINE__, _("Missing unwind SP method"));
|
2003-06-09 03:02:07 +02:00
|
|
|
}
|
|
|
|
|
2006-10-18 21:52:05 +02:00
|
|
|
/* Return the reason why we can't unwind past FRAME. */
|
|
|
|
|
|
|
|
enum unwind_stop_reason
|
|
|
|
get_frame_unwind_stop_reason (struct frame_info *frame)
|
|
|
|
{
|
|
|
|
/* If we haven't tried to unwind past this point yet, then assume
|
|
|
|
that unwinding would succeed. */
|
|
|
|
if (frame->prev_p == 0)
|
|
|
|
return UNWIND_NO_REASON;
|
|
|
|
|
|
|
|
/* Otherwise, we set a reason when we succeeded (or failed) to
|
|
|
|
unwind. */
|
|
|
|
return frame->stop_reason;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return a string explaining REASON. */
|
|
|
|
|
|
|
|
const char *
|
|
|
|
frame_stop_reason_string (enum unwind_stop_reason reason)
|
|
|
|
{
|
|
|
|
switch (reason)
|
|
|
|
{
|
|
|
|
case UNWIND_NULL_ID:
|
|
|
|
return _("unwinder did not report frame ID");
|
|
|
|
|
|
|
|
case UNWIND_INNER_ID:
|
|
|
|
return _("previous frame inner to this frame (corrupt stack?)");
|
|
|
|
|
|
|
|
case UNWIND_SAME_ID:
|
|
|
|
return _("previous frame identical to this frame (corrupt stack?)");
|
|
|
|
|
2006-11-10 21:11:35 +01:00
|
|
|
case UNWIND_NO_SAVED_PC:
|
|
|
|
return _("frame did not save the PC");
|
|
|
|
|
2006-10-18 21:52:05 +02:00
|
|
|
case UNWIND_NO_REASON:
|
|
|
|
case UNWIND_FIRST_ERROR:
|
|
|
|
default:
|
|
|
|
internal_error (__FILE__, __LINE__,
|
|
|
|
"Invalid frame stop reason");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-06-08 Andrew Cagney <cagney@redhat.com>
* acinclude.m4 (gcc_AC_CHECK_DECL, (gcc_AC_CHECK_DECL): Stolen
from GCC's acinclude.m4.
* configure.in: Check for getopt's delcaration.
* aclocal.m4, config.in, configure: Re-generate.
* main.c (error_init): Delete declaration.
* defs.h (error_init): Declare.
* rs6000-tdep.c (rs6000_fetch_pointer_argument): Make static.
(rs6000_convert_from_func_ptr_addr): Make static.
(_initialize_rs6000_tdep): Add declaration.
* cli/cli-cmds.c (dont_repeat): Delete declaration.
(show_commands, set_verbose, show_history): Delete declaration.
* top.h (set_verbose): Add declaration.
(show_history, set_history, show_commands): Add declaration.
(do_restore_instream_cleanup): Add declaration.
* objc-lang.c (specialcmp): Make static.
(print_object_command): Make static.
(find_objc_msgsend): Make static.
(find_objc_msgcall_submethod_helper): Make static.
(find_objc_msgcall_submethod): Make static.
(_initialize_objc_language): Add declaration.
(find_implementation_from_class): Make static.
(find_implementation): Make static.
* objc-exp.y (yylex): Delete lookup_struct_typedef declaration.
* objc-lang.h (lookup_struct_typedef): Add declaration.
* cli/cli-interp.c (_initialize_cli_interp): Add declaration.
* cli/cli-script.c (clear_hook_in_cleanup): Make static.
(do_restore_user_call_depth): Make static.
(do_restore_instream_cleanup): Delete declaration.
(dont_repeat): Delete declaration.
* cli/cli-decode.c (add_abbrev_cmd): Delete function.
* cli/cli-dump.c (_initialize_cli_dump): Add declaration.
* reggroups.c (_initialize_reggroup): Add declaration.
* cp-support.c (_initialize_cp_support): Add declaration.
* cp-abi.c (_initialize_cp_abi): Add declaration.
* hpacc-abi.c (_initialize_hpacc_abi): Add declaration.
* gnu-v3-abi.c (gnuv3_baseclass_offset): Make static.
(_initialize_gnu_v3_abi): Add declaration.
* gnu-v2-abi.c (gnuv2_value_rtti_type): Make static.
(_initialize_gnu_v2_abi): Add declaration.
* frame-base.c (_initialize_frame_base): Add declaration.
* doublest.c (floatformat_from_length): Make static.
* frame-unwind.c (_initialize_frame_unwind): Add declaration.
* frame.c (create_sentinel_frame): Make static.
(_initialize_frame): Add declaration.
* top.c (do_catch_errors): Make static.
(gdb_rl_operate_and_get_next_completion): Make static.
* typeprint.c: Include "typeprint.h".
* sentinel-frame.c (sentinel_frame_prev_register): Make static.
(sentinel_frame_this_id): Make static.
* p-valprint.c (_initialize_pascal_valprint): Add declaration.
* ui-out.c (make_cleanup_ui_out_begin_end): Delete function.
* dwarf2-frame.c (dwarf2_frame_cache): Make static.
* p-exp.y (push_current_type, pop_current_type): ISO C declaration.
* dwarf2expr.h (dwarf_expr_context): ISO C declaration.
* maint.c (maintenance_print_architecture): Make static.
* signals/signals.c (_initialize_signals): Add declaration.
* std-regs.c (_initialize_frame_reg): Add declaration.
* jv-exp.y (push_variable): ISO C definition.
(push_qualified_expression_name): Ditto.
* memattr.c (_initialize_mem): Add declaration.
* remote.c (remote_check_watch_resources): Make static.
(remote_stopped_by_watchpoint): Make static.
(remote_stopped_data_address): Make static.
* d10v-tdep.c (nr_dmap_regs): Make static.
(a0_regnum): Make static.
(d10v_frame_unwind_cache): Make static.
(d10v_frame_p): Make static.
* osabi.c (show_osabi): Make static.
(_initialize_gdb_osabi): Add extern declaration.
* gdbtypes.c (make_qualified_type): Make static.
(safe_parse_type): Make static.
* macrocmd.c (_initialize_macrocmd): Add extern declaration.
* macrotab.c (macro_bcache_free): Make static.
* interps.c (interp_set_quiet): Make static.
(interpreter_exec_cmd): Make static.
* stack.h (select_frame_command): New file.
* stack.c: Include "stack.h".
(select_frame_command_wrapper): Delete function.
(select_frame_command): Make global.
* infcall.c: Include "infcall.h".
* linespec.c: Include "linespec.h".
* symfile.c (sections_overlap): Make static.
* cp-support.h (cp_initialize_namespace): ISO C declaration.
* charset.c (_initialize_charset): Add missing prototype.
* regcache.c (init_legacy_regcache_descr): Make static.
(do_regcache_xfree): Make static.
(regcache_xfer_part): Make static.
(_initialize_regcache): Add missing prototype.
* breakpoint.c (parse_breakpoint_sals): Make static.
(breakpoint_sals_to_pc): Make static.
* interps.h (clear_interpreter_hooks): ISO C declaration.
* Makefile.in (stack_h): Define.
(stack.o, typeprint.o, mi-main.o): Update dependencies.
(mi-cmd-stack.o, infcall.o, linespec.o): Update dependencies.
Index: mi/ChangeLog
2003-06-08 Andrew Cagney <cagney@redhat.com>
* mi-parse.c (_initialize_mi_parse): Delete function.
* mi-main.c: Include "mi-main.h".
* mi-interp.c (_initialize_mi_interp): Add declaration.
* mi-cmd-stack.c: Include "stack.h".
(select_frame_command_wrapper): Delete extern declaration.
(mi_cmd_stack_select_frame): Replace select_frame_command_wrapper
with select_frame_command.
2003-06-08 20:27:14 +02:00
|
|
|
extern initialize_file_ftype _initialize_frame; /* -Wmissing-prototypes */
|
|
|
|
|
2003-08-09 17:10:09 +02:00
|
|
|
static struct cmd_list_element *set_backtrace_cmdlist;
|
|
|
|
static struct cmd_list_element *show_backtrace_cmdlist;
|
|
|
|
|
|
|
|
static void
|
|
|
|
set_backtrace_cmd (char *args, int from_tty)
|
|
|
|
{
|
|
|
|
help_list (set_backtrace_cmdlist, "set backtrace ", -1, gdb_stdout);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
show_backtrace_cmd (char *args, int from_tty)
|
|
|
|
{
|
|
|
|
cmd_show_list (show_backtrace_cmdlist, from_tty, "");
|
|
|
|
}
|
|
|
|
|
2002-11-08 21:48:55 +01:00
|
|
|
void
|
|
|
|
_initialize_frame (void)
|
|
|
|
{
|
|
|
|
obstack_init (&frame_cache_obstack);
|
2003-01-21 20:32:42 +01:00
|
|
|
|
2004-04-26 11:49:36 +02:00
|
|
|
observer_attach_target_changed (frame_observer_target_changed);
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
add_prefix_cmd ("backtrace", class_maintenance, set_backtrace_cmd, _("\
|
2003-08-09 17:10:09 +02:00
|
|
|
Set backtrace specific variables.\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
Configure backtrace variables such as the backtrace limit"),
|
2003-08-09 17:10:09 +02:00
|
|
|
&set_backtrace_cmdlist, "set backtrace ",
|
|
|
|
0/*allow-unknown*/, &setlist);
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
add_prefix_cmd ("backtrace", class_maintenance, show_backtrace_cmd, _("\
|
2003-08-09 17:10:09 +02:00
|
|
|
Show backtrace specific variables\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
Show backtrace variables such as the backtrace limit"),
|
2003-08-09 17:10:09 +02:00
|
|
|
&show_backtrace_cmdlist, "show backtrace ",
|
|
|
|
0/*allow-unknown*/, &showlist);
|
|
|
|
|
|
|
|
add_setshow_boolean_cmd ("past-main", class_obscure,
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_setshow functions, replace "PRINT:" comment prefix
with "FIXME: i18n:".
* aix-thread.c, alpha-tdep.c, arm-tdep.c, breakpoint.c: Update.
* cris-tdep.c, dwarf2read.c, frame.c, hppa-tdep.c: Update.
* infcall.c, m32r-rom.c, maint.c, mips-tdep.c: Update.
* nto-tdep.c, observer.c, remote-rdi.c, remote.c: Update.
* target.c, cli/cli-logging.c: Update.
2005-02-14 17:18:43 +01:00
|
|
|
&backtrace_past_main, _("\
|
|
|
|
Set whether backtraces should continue past \"main\"."), _("\
|
|
|
|
Show whether backtraces should continue past \"main\"."), _("\
|
2003-01-21 20:32:42 +01:00
|
|
|
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\
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_setshow functions, replace "PRINT:" comment prefix
with "FIXME: i18n:".
* aix-thread.c, alpha-tdep.c, arm-tdep.c, breakpoint.c: Update.
* cris-tdep.c, dwarf2read.c, frame.c, hppa-tdep.c: Update.
* infcall.c, m32r-rom.c, maint.c, mips-tdep.c: Update.
* nto-tdep.c, observer.c, remote-rdi.c, remote.c: Update.
* target.c, cli/cli-logging.c: Update.
2005-02-14 17:18:43 +01:00
|
|
|
of the stack trace."),
|
2005-02-17 Andrew Cagney <cagney@gnu.org>
* cli/cli-decode.c (add_setshow_cmd_full, add_setshow_enum_cmd)
(add_setshow_auto_boolean_cmd, add_setshow_boolean_cmd)
(add_setshow_filename_cmd, add_setshow_string_cmd)
(add_setshow_uinteger_cmd, add_setshow_zinteger_cmd): Delete
fprint_setshow parameter.
* command.h (fprint_setshow_ftype): Delete.
(add_setshow_cmd_full, add_setshow_enum_cmd)
(add_setshow_auto_boolean_cmd, add_setshow_boolean_cmd)
(add_setshow_filename_cmd, add_setshow_string_cmd)
(add_setshow_uinteger_cmd, add_setshow_zinteger_cmd): Delete
fprint_setshow parameter.
* aix-thread.c, alpha-tdep.c, arm-tdep.c, breakpoint.c: Update.
* complaints.c, cris-tdep.c, dwarf2read.c, frame.c: Update.
* hppa-tdep.c, infcall.c, m32r-rom.c, maint.c: Update.
* mips-tdep.c, nto-tdep.c, observer.c, remote-rdi.c: Update
* remote.c, target.c, cli/cli-logging.c: Update.
2005-02-17 14:49:56 +01:00
|
|
|
NULL,
|
2005-02-24 Andrew Cagney <cagney@gnu.org>
Add show_VARIABLE functions, update add_setshow call.
* varobj.c (_initialize_varobj, show_varobjdebug): Add and update.
* valprint.c (_initialize_valprint, show_print_max)
(show_stop_print_at_null, show_repeat_count_threshold)
(show_prettyprint_structs, show_unionprint)
(show_prettyprint_arrays, show_addressprint, show_input_radix)
(show_output_radix): Ditto.
* valops.c (_initialize_valops, show_overload_resolution): Ditto.
* utils.c (initialize_utils, show_chars_per_line)
(show_lines_per_page, show_demangle, show_pagination_enabled)
(show_sevenbit_strings, show_asm_demangle): Ditto
* tui/tui-win.c (_initialize_tui_win, show_tui_border_kind)
(show_tui_border_mode, show_tui_active_border_mode): Ditto.
* top.c (init_main, show_new_async_prompt)
(show_async_command_editing_p, show_write_history_p)
(show_history_size, show_history_filename, show_caution)
(show_annotation_level, init_main): Ditto.
* target.c (initialize_targets, show_targetdebug)
(show_trust_readonly): Ditto.
* symfile.c (_initialize_symfile, show_symbol_reloading)
(show_ext_args, show_download_write_size)
(show_debug_file_directory): Ditto.
* source.c (_initialize_source, show_lines_to_list): Ditto.
* solib.c (_initialize_solib, show_auto_solib_add)
(show_solib_search_path): Ditto.
* p-valprint.c (_initialize_pascal_valprint)
(show_pascal_static_field_print): Ditto.
* printcmd.c (_initialize_printcmd, show_max_symbolic_offset)
(show_print_symbol_filename): Add and update.
* parse.c (_initialize_parse, show_expressiondebug): Dito.
* observer.c (_initialize_observer, show_observer_debug): Dito.
* maint.c (_initialize_maint_cmds, show_watchdog)
(show_maintenance_profile_p): Dito.
* linux-nat.c (_initialize_linux_nat, show_debug_linux_nat): Dito.
* infrun.c (_initialize_infrun, show_debug_infrun)
(show_stop_on_solib_events, show_follow_fork_mode_string)
(show_scheduler_mode, show_step_stop_if_no_debug): Ditto.
* infcall.c (_initialize_infcall, show_coerce_float_to_double_p)
(show_unwind_on_signal_p): Ditto.
* gdbtypes.c (build_gdbtypes, show_opaque_type_resolution)
(_initialize_gdbtypes, show_overload_debug): Ditto.
* gdb-events.c, gdb-events.sh (_initialize_gdb_events)
(show_gdb_events_debug): Ditto.
* gdbarch.c, gdbarch.sh (show_gdbarch_debug)
(_initialize_gdbarch): Ditto.
* frame.c (_initialize_frame, show_backtrace_past_main)
(show_backtrace_past_entry, show_backtrace_limit)
(show_frame_debug): Ditto.
* exec.c (_initialize_exec, show_write_files): Ditto.
* dwarf2read.c (_initialize_dwarf2_read)
(show_dwarf2_max_cache_age): Ditto.
* demangle.c (_initialize_demangler)
(show_demangling_style_names): Ditto.
* dcache.c (_initialize_dcache, show_dcache_enabled_p): Ditto.
* cp-valprint.c (show_static_field_print)
(_initialize_cp_valprint, show_vtblprint, show_objectprint): Ditto.
* corefile.c (_initialize_core, show_gnutarget_string): Ditto.
* cli/cli-logging.c (_initialize_cli_logging)
(show_logging_overwrite, show_logging_redirect)
(show_logging_filename): Ditto.
* cli/cli-cmds.c (show_info_verbose, show_history_expansion_p)
(init_cli_cmds, show_baud_rate, show_remote_debug)
(show_remote_timeout, show_max_user_call_depth): Ditto.
* charset.c (show_host_charset_name, show_target_charset_name)
(initialize_charset): Ditto.
* breakpoint.c (show_can_use_hw_watchpoints)
(show_pending_break_support, _initialize_breakpoint): Ditto.
2005-02-24 14:51:36 +01:00
|
|
|
show_backtrace_past_main,
|
2005-02-17 Andrew Cagney <cagney@gnu.org>
* cli/cli-decode.c (add_setshow_cmd_full, add_setshow_enum_cmd)
(add_setshow_auto_boolean_cmd, add_setshow_boolean_cmd)
(add_setshow_filename_cmd, add_setshow_string_cmd)
(add_setshow_uinteger_cmd, add_setshow_zinteger_cmd): Delete
fprint_setshow parameter.
* command.h (fprint_setshow_ftype): Delete.
(add_setshow_cmd_full, add_setshow_enum_cmd)
(add_setshow_auto_boolean_cmd, add_setshow_boolean_cmd)
(add_setshow_filename_cmd, add_setshow_string_cmd)
(add_setshow_uinteger_cmd, add_setshow_zinteger_cmd): Delete
fprint_setshow parameter.
* aix-thread.c, alpha-tdep.c, arm-tdep.c, breakpoint.c: Update.
* complaints.c, cris-tdep.c, dwarf2read.c, frame.c: Update.
* hppa-tdep.c, infcall.c, m32r-rom.c, maint.c: Update.
* mips-tdep.c, nto-tdep.c, observer.c, remote-rdi.c: Update
* remote.c, target.c, cli/cli-logging.c: Update.
2005-02-17 14:49:56 +01:00
|
|
|
&set_backtrace_cmdlist,
|
2003-08-09 17:10:09 +02:00
|
|
|
&show_backtrace_cmdlist);
|
|
|
|
|
2004-11-10 22:17:58 +01:00
|
|
|
add_setshow_boolean_cmd ("past-entry", class_obscure,
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_setshow functions, replace "PRINT:" comment prefix
with "FIXME: i18n:".
* aix-thread.c, alpha-tdep.c, arm-tdep.c, breakpoint.c: Update.
* cris-tdep.c, dwarf2read.c, frame.c, hppa-tdep.c: Update.
* infcall.c, m32r-rom.c, maint.c, mips-tdep.c: Update.
* nto-tdep.c, observer.c, remote-rdi.c, remote.c: Update.
* target.c, cli/cli-logging.c: Update.
2005-02-14 17:18:43 +01:00
|
|
|
&backtrace_past_entry, _("\
|
|
|
|
Set whether backtraces should continue past the entry point of a program."),
|
|
|
|
_("\
|
|
|
|
Show whether backtraces should continue past the entry point of a program."),
|
|
|
|
_("\
|
2004-11-10 22:17:58 +01:00
|
|
|
Normally there are no callers beyond the entry point of a program, so GDB\n\
|
|
|
|
will terminate the backtrace there. Set this variable if you need to see \n\
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_setshow functions, replace "PRINT:" comment prefix
with "FIXME: i18n:".
* aix-thread.c, alpha-tdep.c, arm-tdep.c, breakpoint.c: Update.
* cris-tdep.c, dwarf2read.c, frame.c, hppa-tdep.c: Update.
* infcall.c, m32r-rom.c, maint.c, mips-tdep.c: Update.
* nto-tdep.c, observer.c, remote-rdi.c, remote.c: Update.
* target.c, cli/cli-logging.c: Update.
2005-02-14 17:18:43 +01:00
|
|
|
the rest of the stack trace."),
|
2005-02-17 Andrew Cagney <cagney@gnu.org>
* cli/cli-decode.c (add_setshow_cmd_full, add_setshow_enum_cmd)
(add_setshow_auto_boolean_cmd, add_setshow_boolean_cmd)
(add_setshow_filename_cmd, add_setshow_string_cmd)
(add_setshow_uinteger_cmd, add_setshow_zinteger_cmd): Delete
fprint_setshow parameter.
* command.h (fprint_setshow_ftype): Delete.
(add_setshow_cmd_full, add_setshow_enum_cmd)
(add_setshow_auto_boolean_cmd, add_setshow_boolean_cmd)
(add_setshow_filename_cmd, add_setshow_string_cmd)
(add_setshow_uinteger_cmd, add_setshow_zinteger_cmd): Delete
fprint_setshow parameter.
* aix-thread.c, alpha-tdep.c, arm-tdep.c, breakpoint.c: Update.
* complaints.c, cris-tdep.c, dwarf2read.c, frame.c: Update.
* hppa-tdep.c, infcall.c, m32r-rom.c, maint.c: Update.
* mips-tdep.c, nto-tdep.c, observer.c, remote-rdi.c: Update
* remote.c, target.c, cli/cli-logging.c: Update.
2005-02-17 14:49:56 +01:00
|
|
|
NULL,
|
2005-02-24 Andrew Cagney <cagney@gnu.org>
Add show_VARIABLE functions, update add_setshow call.
* varobj.c (_initialize_varobj, show_varobjdebug): Add and update.
* valprint.c (_initialize_valprint, show_print_max)
(show_stop_print_at_null, show_repeat_count_threshold)
(show_prettyprint_structs, show_unionprint)
(show_prettyprint_arrays, show_addressprint, show_input_radix)
(show_output_radix): Ditto.
* valops.c (_initialize_valops, show_overload_resolution): Ditto.
* utils.c (initialize_utils, show_chars_per_line)
(show_lines_per_page, show_demangle, show_pagination_enabled)
(show_sevenbit_strings, show_asm_demangle): Ditto
* tui/tui-win.c (_initialize_tui_win, show_tui_border_kind)
(show_tui_border_mode, show_tui_active_border_mode): Ditto.
* top.c (init_main, show_new_async_prompt)
(show_async_command_editing_p, show_write_history_p)
(show_history_size, show_history_filename, show_caution)
(show_annotation_level, init_main): Ditto.
* target.c (initialize_targets, show_targetdebug)
(show_trust_readonly): Ditto.
* symfile.c (_initialize_symfile, show_symbol_reloading)
(show_ext_args, show_download_write_size)
(show_debug_file_directory): Ditto.
* source.c (_initialize_source, show_lines_to_list): Ditto.
* solib.c (_initialize_solib, show_auto_solib_add)
(show_solib_search_path): Ditto.
* p-valprint.c (_initialize_pascal_valprint)
(show_pascal_static_field_print): Ditto.
* printcmd.c (_initialize_printcmd, show_max_symbolic_offset)
(show_print_symbol_filename): Add and update.
* parse.c (_initialize_parse, show_expressiondebug): Dito.
* observer.c (_initialize_observer, show_observer_debug): Dito.
* maint.c (_initialize_maint_cmds, show_watchdog)
(show_maintenance_profile_p): Dito.
* linux-nat.c (_initialize_linux_nat, show_debug_linux_nat): Dito.
* infrun.c (_initialize_infrun, show_debug_infrun)
(show_stop_on_solib_events, show_follow_fork_mode_string)
(show_scheduler_mode, show_step_stop_if_no_debug): Ditto.
* infcall.c (_initialize_infcall, show_coerce_float_to_double_p)
(show_unwind_on_signal_p): Ditto.
* gdbtypes.c (build_gdbtypes, show_opaque_type_resolution)
(_initialize_gdbtypes, show_overload_debug): Ditto.
* gdb-events.c, gdb-events.sh (_initialize_gdb_events)
(show_gdb_events_debug): Ditto.
* gdbarch.c, gdbarch.sh (show_gdbarch_debug)
(_initialize_gdbarch): Ditto.
* frame.c (_initialize_frame, show_backtrace_past_main)
(show_backtrace_past_entry, show_backtrace_limit)
(show_frame_debug): Ditto.
* exec.c (_initialize_exec, show_write_files): Ditto.
* dwarf2read.c (_initialize_dwarf2_read)
(show_dwarf2_max_cache_age): Ditto.
* demangle.c (_initialize_demangler)
(show_demangling_style_names): Ditto.
* dcache.c (_initialize_dcache, show_dcache_enabled_p): Ditto.
* cp-valprint.c (show_static_field_print)
(_initialize_cp_valprint, show_vtblprint, show_objectprint): Ditto.
* corefile.c (_initialize_core, show_gnutarget_string): Ditto.
* cli/cli-logging.c (_initialize_cli_logging)
(show_logging_overwrite, show_logging_redirect)
(show_logging_filename): Ditto.
* cli/cli-cmds.c (show_info_verbose, show_history_expansion_p)
(init_cli_cmds, show_baud_rate, show_remote_debug)
(show_remote_timeout, show_max_user_call_depth): Ditto.
* charset.c (show_host_charset_name, show_target_charset_name)
(initialize_charset): Ditto.
* breakpoint.c (show_can_use_hw_watchpoints)
(show_pending_break_support, _initialize_breakpoint): Ditto.
2005-02-24 14:51:36 +01:00
|
|
|
show_backtrace_past_entry,
|
2005-02-17 Andrew Cagney <cagney@gnu.org>
* cli/cli-decode.c (add_setshow_cmd_full, add_setshow_enum_cmd)
(add_setshow_auto_boolean_cmd, add_setshow_boolean_cmd)
(add_setshow_filename_cmd, add_setshow_string_cmd)
(add_setshow_uinteger_cmd, add_setshow_zinteger_cmd): Delete
fprint_setshow parameter.
* command.h (fprint_setshow_ftype): Delete.
(add_setshow_cmd_full, add_setshow_enum_cmd)
(add_setshow_auto_boolean_cmd, add_setshow_boolean_cmd)
(add_setshow_filename_cmd, add_setshow_string_cmd)
(add_setshow_uinteger_cmd, add_setshow_zinteger_cmd): Delete
fprint_setshow parameter.
* aix-thread.c, alpha-tdep.c, arm-tdep.c, breakpoint.c: Update.
* complaints.c, cris-tdep.c, dwarf2read.c, frame.c: Update.
* hppa-tdep.c, infcall.c, m32r-rom.c, maint.c: Update.
* mips-tdep.c, nto-tdep.c, observer.c, remote-rdi.c: Update
* remote.c, target.c, cli/cli-logging.c: Update.
2005-02-17 14:49:56 +01:00
|
|
|
&set_backtrace_cmdlist,
|
2004-11-10 22:17:58 +01:00
|
|
|
&show_backtrace_cmdlist);
|
|
|
|
|
2005-05-29 00:51:37 +02:00
|
|
|
add_setshow_integer_cmd ("limit", class_obscure,
|
|
|
|
&backtrace_limit, _("\
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_setshow functions, replace "PRINT:" comment prefix
with "FIXME: i18n:".
* aix-thread.c, alpha-tdep.c, arm-tdep.c, breakpoint.c: Update.
* cris-tdep.c, dwarf2read.c, frame.c, hppa-tdep.c: Update.
* infcall.c, m32r-rom.c, maint.c, mips-tdep.c: Update.
* nto-tdep.c, observer.c, remote-rdi.c, remote.c: Update.
* target.c, cli/cli-logging.c: Update.
2005-02-14 17:18:43 +01:00
|
|
|
Set an upper bound on the number of backtrace levels."), _("\
|
|
|
|
Show the upper bound on the number of backtrace levels."), _("\
|
2003-08-10 16:56:23 +02:00
|
|
|
No more than the specified number of frames can be displayed or examined.\n\
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_setshow functions, replace "PRINT:" comment prefix
with "FIXME: i18n:".
* aix-thread.c, alpha-tdep.c, arm-tdep.c, breakpoint.c: Update.
* cris-tdep.c, dwarf2read.c, frame.c, hppa-tdep.c: Update.
* infcall.c, m32r-rom.c, maint.c, mips-tdep.c: Update.
* nto-tdep.c, observer.c, remote-rdi.c, remote.c: Update.
* target.c, cli/cli-logging.c: Update.
2005-02-14 17:18:43 +01:00
|
|
|
Zero is unlimited."),
|
2005-05-29 00:51:37 +02:00
|
|
|
NULL,
|
|
|
|
show_backtrace_limit,
|
|
|
|
&set_backtrace_cmdlist,
|
|
|
|
&show_backtrace_cmdlist);
|
2003-02-26 00:12:22 +01:00
|
|
|
|
|
|
|
/* Debug this files internals. */
|
2005-02-18 Andrew Cagney <cagney@gnu.org>
Use add_setshow_zinteger_cmd through out. Re-sync gdbarch.sh
and gdbarch.c.
* breakpoint.c, frame.c, gdb-events.sh, gdbarch.sh: Update.
* gdbtypes.c, infrun.c, linux-nat.c, maint.c, monitor.c: Update.
* pa64solib.c, parse.c, remote-mips.c, ser-go32.c: Update.
* serial.c, solib-frv.c, somsolib.c, target.c, top.c: Update.
* varobj.c, cli/cli-cmds.c: Update.
* gdbarch.c, gdb-events.c: Regenerate.
2005-02-18 19:58:56 +01:00
|
|
|
add_setshow_zinteger_cmd ("frame", class_maintenance, &frame_debug, _("\
|
|
|
|
Set frame debugging."), _("\
|
|
|
|
Show frame debugging."), _("\
|
|
|
|
When non-zero, frame specific internal debugging is enabled."),
|
|
|
|
NULL,
|
2005-02-24 Andrew Cagney <cagney@gnu.org>
Add show_VARIABLE functions, update add_setshow call.
* varobj.c (_initialize_varobj, show_varobjdebug): Add and update.
* valprint.c (_initialize_valprint, show_print_max)
(show_stop_print_at_null, show_repeat_count_threshold)
(show_prettyprint_structs, show_unionprint)
(show_prettyprint_arrays, show_addressprint, show_input_radix)
(show_output_radix): Ditto.
* valops.c (_initialize_valops, show_overload_resolution): Ditto.
* utils.c (initialize_utils, show_chars_per_line)
(show_lines_per_page, show_demangle, show_pagination_enabled)
(show_sevenbit_strings, show_asm_demangle): Ditto
* tui/tui-win.c (_initialize_tui_win, show_tui_border_kind)
(show_tui_border_mode, show_tui_active_border_mode): Ditto.
* top.c (init_main, show_new_async_prompt)
(show_async_command_editing_p, show_write_history_p)
(show_history_size, show_history_filename, show_caution)
(show_annotation_level, init_main): Ditto.
* target.c (initialize_targets, show_targetdebug)
(show_trust_readonly): Ditto.
* symfile.c (_initialize_symfile, show_symbol_reloading)
(show_ext_args, show_download_write_size)
(show_debug_file_directory): Ditto.
* source.c (_initialize_source, show_lines_to_list): Ditto.
* solib.c (_initialize_solib, show_auto_solib_add)
(show_solib_search_path): Ditto.
* p-valprint.c (_initialize_pascal_valprint)
(show_pascal_static_field_print): Ditto.
* printcmd.c (_initialize_printcmd, show_max_symbolic_offset)
(show_print_symbol_filename): Add and update.
* parse.c (_initialize_parse, show_expressiondebug): Dito.
* observer.c (_initialize_observer, show_observer_debug): Dito.
* maint.c (_initialize_maint_cmds, show_watchdog)
(show_maintenance_profile_p): Dito.
* linux-nat.c (_initialize_linux_nat, show_debug_linux_nat): Dito.
* infrun.c (_initialize_infrun, show_debug_infrun)
(show_stop_on_solib_events, show_follow_fork_mode_string)
(show_scheduler_mode, show_step_stop_if_no_debug): Ditto.
* infcall.c (_initialize_infcall, show_coerce_float_to_double_p)
(show_unwind_on_signal_p): Ditto.
* gdbtypes.c (build_gdbtypes, show_opaque_type_resolution)
(_initialize_gdbtypes, show_overload_debug): Ditto.
* gdb-events.c, gdb-events.sh (_initialize_gdb_events)
(show_gdb_events_debug): Ditto.
* gdbarch.c, gdbarch.sh (show_gdbarch_debug)
(_initialize_gdbarch): Ditto.
* frame.c (_initialize_frame, show_backtrace_past_main)
(show_backtrace_past_entry, show_backtrace_limit)
(show_frame_debug): Ditto.
* exec.c (_initialize_exec, show_write_files): Ditto.
* dwarf2read.c (_initialize_dwarf2_read)
(show_dwarf2_max_cache_age): Ditto.
* demangle.c (_initialize_demangler)
(show_demangling_style_names): Ditto.
* dcache.c (_initialize_dcache, show_dcache_enabled_p): Ditto.
* cp-valprint.c (show_static_field_print)
(_initialize_cp_valprint, show_vtblprint, show_objectprint): Ditto.
* corefile.c (_initialize_core, show_gnutarget_string): Ditto.
* cli/cli-logging.c (_initialize_cli_logging)
(show_logging_overwrite, show_logging_redirect)
(show_logging_filename): Ditto.
* cli/cli-cmds.c (show_info_verbose, show_history_expansion_p)
(init_cli_cmds, show_baud_rate, show_remote_debug)
(show_remote_timeout, show_max_user_call_depth): Ditto.
* charset.c (show_host_charset_name, show_target_charset_name)
(initialize_charset): Ditto.
* breakpoint.c (show_can_use_hw_watchpoints)
(show_pending_break_support, _initialize_breakpoint): Ditto.
2005-02-24 14:51:36 +01:00
|
|
|
show_frame_debug,
|
2005-02-18 Andrew Cagney <cagney@gnu.org>
Use add_setshow_zinteger_cmd through out. Re-sync gdbarch.sh
and gdbarch.c.
* breakpoint.c, frame.c, gdb-events.sh, gdbarch.sh: Update.
* gdbtypes.c, infrun.c, linux-nat.c, maint.c, monitor.c: Update.
* pa64solib.c, parse.c, remote-mips.c, ser-go32.c: Update.
* serial.c, solib-frv.c, somsolib.c, target.c, top.c: Update.
* varobj.c, cli/cli-cmds.c: Update.
* gdbarch.c, gdb-events.c: Regenerate.
2005-02-18 19:58:56 +01:00
|
|
|
&setdebuglist, &showdebuglist);
|
2002-11-08 21:48:55 +01:00
|
|
|
}
|