binutils-gdb/gdb/stack.h

97 lines
3.3 KiB
C
Raw Permalink Normal View History

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
/* Stack manipulation commands, for GDB the GNU Debugger.
Copyright (C) 2003-2020 Free Software Foundation, Inc.
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
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
the Free Software Foundation; either version 3 of the License, or
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
(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
along with this program. If not, see <http://www.gnu.org/licenses/>. */
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
#ifndef STACK_H
#define STACK_H
gdb: Change how frames are selected for 'frame' and 'info frame'. The 'frame' command, and thanks to code reuse the 'info frame' and 'select-frame' commands, currently have an overloaded mechanism for selecting a frame. These commands take one or two parameters, if it's one parameter then we first try to use the parameter as an integer to select a frame by level (or depth in the stack). If that fails then we treat the parameter as an address and try to select a stack frame by stack-address. If we still have not selected a stack frame, or we initially had two parameters, then GDB allows the user to view a stack frame that is not part of the current backtrace. Internally, a new frame is created with the given stack and pc addresses, and this is shown to the user. The result of this is that a typo by the user, entering the wrong stack frame level for example, can result in a brand new frame being viewed rather than an error. The purpose of this commit is to remove this overloading, while still offering the same functionality through some new sub-commands. By making the default behaviour of 'frame' (and friends) be to select a stack frame by level index, it is hoped that enough backwards-compatibility is maintained that users will not be overly inconvenienced. The 'frame', 'select-frame', and 'info frame' commands now all take a frame specification string as an argument, this string can be any of the following: (1) An integer. This is treated as a frame level. If a frame for that level does not exist then the user gets an error. (2) A string like 'level <LEVEL>', where <LEVEL> is a frame level as in option (1) above. (3) A string like 'address <STACK-ADDRESS>', where <STACK-ADDRESS> is a stack-frame address. If there is no frame for this address then the user gets an error. (4) A string like 'function <NAME>', where <NAME> is a function name, the inner most frame for function <NAME> is selected. If there is no frame for function <NAME> then the user gets an error. (5) A string like 'view <STACK-ADDRESS>', this views a new frame with stack address <STACK-ADDRESS>. (6) A string like 'view <STACK-ADDRESS> <PC-ADDRESS>', this views a new frame with stack address <STACK-ADDRESS> and the pc <PC-ADDRESS>. This change assumes that the most common use of the commands like 'frame' is to select a frame by frame level, it is for this reason that this is the behaviour that is kept for backwards compatibility. Any of the alternative behaviours, which are assumed to be less used, now require a change in user behaviour. The MI command '-stack-select-frame' has not been changed. This ensures that we maintain backwards compatibility for existing frontends. gdb/ChangeLog: (NEWS): Mention changes to frame related commands. * cli/cli-decode.c (add_cmd_suppress_notification): New function. (add_prefix_cmd_suppress_notification): New function. (add_com_suppress_notification): Call add_cmd_suppress_notification. * command.h (add_cmd_suppress_notification): Declare. (add_prefix_cmd_suppress_notification): Declare. * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include. (parse_frame_specification): Moved from stack.c, with simplification to handle a single argument. (mi_cmd_stack_select_frame): Use parse_frame_specification, the switch to the selected frame. Add a header comment. * stack.c: Remove 'safe-ctype.h' include. (find_frame_for_function): Add declaration. (find_frame_for_address): New function. (parse_frame_specification): Moved into mi/mi-cmd-stack.c. (frame_selection_by_function_completer): New function. (info_frame_command): Rename to... (info_frame_command_core): ...this, and update parameter types. (select_frame_command): Rename to... (select_frame_command_core): ...this, and update parameter types. (frame_command): Rename to... (frame_command_core): ...this, and update parameter types. (class frame_command_helper): New class to wrap implementations of frame related sub-commands. (frame_apply_cmd_list): New static global. (frame_cmd_list): Make static. (select_frame_cmd_list): New global for sub-commands. (info_frame_cmd_list): New global for sub-commands. (_initialize_stack): Register sub-commands for 'frame', 'select-frame', and 'info frame'. Update 'frame apply' commands to use frame_apply_cmd_list. Move function local static frame_apply_list to file static frame_apply_cmd_list for consistency. * stack.h (select_frame_command): Delete declarationn. (select_frame_for_mi): Declare new function. gdb/doc/ChangeLog: * gdb.texinfo (Frames): Rewrite the description of 'frame number' to highlight that the number is also the frame's level. (Selection): Rewrite documentation for 'frame' and 'select-frame' commands. (Frame Info): Rewrite documentation for 'info frame' command. gdb/testsuite/ChangeLog: * gdb.base/frame-selection.exp: New file. * gdb.base/frame-selection.c: New file.
2015-09-10 14:06:16 +02:00
/* Access method used by the MI -stack-select-frame command to switch to
frame FI. This differs from SELECT_FRAME in that the observers for a
user selected context change will be triggered. */
void select_frame_for_mi (struct frame_info *fi);
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
gdb::unique_xmalloc_ptr<char> find_frame_funname (struct frame_info *frame,
enum language *funlang,
struct symbol **funcp);
2011-01-05 Michael Snyder <msnyder@vmware.com> * addrmap.c: Shorten lines of >= 80 columns. * arch-utils.c: Ditto. * arch-utils.h: Ditto. * ax-gdb.c: Ditto. * ax-general.c: Ditto. * bcache.c: Ditto. * blockframe.c: Ditto. * breakpoint.c: Ditto. * buildsym.c: Ditto. * c-lang.c: Ditto. * c-typeprint.c: Ditto. * charset.c: Ditto. * coffread.c: Ditto. * command.h: Ditto. * corelow.c: Ditto. * cp-abi.c: Ditto. * cp-namespace.c: Ditto. * cp-support.c: Ditto. * dbug-rom.c: Ditto. * dbxread.c: Ditto. * defs.h: Ditto. * dfp.c: Ditto. * dfp.h: Ditto. * dictionary.c: Ditto. * disasm.c: Ditto. * doublest.c: Ditto. * dwarf2-frame.c: Ditto. * dwarf2expr.c: Ditto. * dwarf2loc.c: Ditto. * dwarf2read.c: Ditto. * elfread.c: Ditto. * eval.c: Ditto. * event-loop.c: Ditto. * event-loop.h: Ditto. * exceptions.h: Ditto. * exec.c: Ditto. * expprint.c: Ditto. * expression.h: Ditto. * f-lang.c: Ditto. * f-valprint.c: Ditto. * findcmd.c: Ditto. * frame-base.c: Ditto. * frame-unwind.c: Ditto. * frame-unwind.h: Ditto. * frame.c: Ditto. * frame.h: Ditto. * gcore.c: Ditto. * gdb-stabs.h: Ditto. * gdb_assert.h: Ditto. * gdb_dirent.h: Ditto. * gdb_obstack.h: Ditto. * gdbcore.h: Ditto. * gdbtypes.c: Ditto. * gdbtypes.h: Ditto. * inf-ttrace.c: Ditto. * infcall.c: Ditto. * infcmd.c: Ditto. * inflow.c: Ditto. * infrun.c: Ditto. * inline-frame.h: Ditto. * language.c: Ditto. * language.h: Ditto. * libunwind-frame.c: Ditto. * libunwind-frame.h: Ditto. * linespec.c: Ditto. * linux-nat.c: Ditto. * linux-nat.h: Ditto. * linux-thread-db.c: Ditto. * machoread.c: Ditto. * macroexp.c: Ditto. * macrotab.c: Ditto. * main.c: Ditto. * maint.c: Ditto. * mdebugread.c: Ditto. * memattr.c: Ditto. * minsyms.c: Ditto. * monitor.c: Ditto. * monitor.h: Ditto. * objfiles.c: Ditto. * objfiles.h: Ditto. * osabi.c: Ditto. * p-typeprint.c: Ditto. * p-valprint.c: Ditto. * parse.c: Ditto. * printcmd.c: Ditto. * proc-events.c: Ditto. * procfs.c: Ditto. * progspace.c: Ditto. * progspace.h: Ditto. * psympriv.h: Ditto. * psymtab.c: Ditto. * record.c: Ditto. * regcache.c: Ditto. * regcache.h: Ditto. * remote-fileio.c: Ditto. * remote.c: Ditto. * ser-mingw.c: Ditto. * ser-tcp.c: Ditto. * ser-unix.c: Ditto. * serial.c: Ditto. * serial.h: Ditto. * solib-frv.c: Ditto. * solib-irix.c: Ditto. * solib-osf.c: Ditto. * solib-pa64.c: Ditto. * solib-som.c: Ditto. * solib-sunos.c: Ditto. * solib-svr4.c: Ditto. * solib-target.c: Ditto. * solib.c: Ditto. * somread.c: Ditto. * source.c: Ditto. * stabsread.c: Ditto. * stabsread.c: Ditto. * stack.c: Ditto. * stack.h: Ditto. * symfile-mem.c: Ditto. * symfile.c: Ditto. * symfile.h: Ditto. * symmisc.c: Ditto. * symtab.c: Ditto. * symtab.h: Ditto. * target-descriptions.c: Ditto. * target-memory.c: Ditto. * target.c: Ditto. * target.h: Ditto. * terminal.h: Ditto. * thread.c: Ditto. * top.c: Ditto. * tracepoint.c: Ditto. * tracepoint.h: Ditto. * ui-file.c: Ditto. * ui-file.h: Ditto. * ui-out.h: Ditto. * user-regs.c: Ditto. * user-regs.h: Ditto. * utils.c: Ditto. * valarith.c: Ditto. * valops.c: Ditto. * valprint.c: Ditto. * valprint.h: Ditto. * value.c: Ditto. * varobj.c: Ditto. * varobj.h: Ditto. * vec.h: Ditto. * xcoffread.c: Ditto. * xcoffsolib.c: Ditto. * xcoffsolib.h: Ditto. * xml-syscall.c: Ditto. * xml-tdesc.c: Ditto.
2011-01-05 23:22:53 +01:00
typedef void (*iterate_over_block_arg_local_vars_cb) (const char *print_name,
struct symbol *sym,
void *cb_data);
constify struct block in some places This makes some spots in gdb, particularly general_symbol_info, use a "const struct block", then fixes the fallout. The justification is that, ordinarily, blocks ought to be readonly. Note though that we can't add "const" in the blockvector due to block relocation. This can be done once blocks are made independent of the program space. 2014-06-18 Tom Tromey <tromey@redhat.com> * varobj.c (varobj_create): Update. * valops.c (value_of_this): Update. * tracepoint.c (add_local_symbols, scope_info): Update. * symtab.h (struct general_symbol_info) <block>: Now const. * symtab.c (skip_prologue_sal) (default_make_symbol_completion_list_break_on) (skip_prologue_using_sal): Update. * stack.h (iterate_over_block_locals) (iterate_over_block_local_vars): Update. * stack.c (print_frame_args): Update. (iterate_over_block_locals, iterate_over_block_local_vars): Make parameter const. (get_selected_block): Make return type const. * python/py-frame.c (frapy_block): Update. * python/py-block.c (gdbpy_block_for_pc): Update. * p-exp.y (%union) <bval>: Now const. * mi/mi-cmd-stack.c (list_args_or_locals): Update. * mdebugread.c (mylookup_symbol, parse_procedure): Update. * m2-exp.y (%union) <bval>: Now const. * linespec.c (get_current_search_block): Make return type const. (create_sals_line_offset, find_label_symbols): Update. * inline-frame.c (inline_frame_sniffer, skip_inline_frames): Update. (block_starting_point_at): Make "block" const. * infrun.c (insert_exception_resume_breakpoint): Make "b" const. (check_exception_resume): Update. * guile/scm-frame.c (gdbscm_frame_block): Update. * guile/scm-block.c (gdbscm_lookup_block): Update. * frame.h (get_frame_block): Update. (get_selected_block): Make return type const. * frame.c (frame_id_inner): Update. * f-valprint.c (info_common_command_for_block) (info_common_command): Update. * dwarf2loc.c (dwarf2_find_location_expression) (dwarf_expr_frame_base, dwarf2_compile_expr_to_ax) (locexpr_describe_location_piece): Update. * c-exp.y (%union) <bval>: Now const. * breakpoint.c (resolve_sal_pc): Update. * blockframe.c (get_frame_block):Make return type const. (get_pc_function_start, get_frame_function, find_pc_sect_function) (block_innermost_frame): Update. * block.h (blockvector_for_pc, blockvector_for_pc_sect) (block_for_pc, block_for_pc_sect): Update. * block.c (blockvector_for_pc_sect, blockvector_for_pc): Make 'pblock' const. (block_for_pc_sect, block_for_pc): Make return type const. * ax-gdb.c (gen_expr): Update. * alpha-mdebug-tdep.c (find_proc_desc): Update. * ada-lang.c (ada_read_renaming_var_value): Make 'block' const. (ada_make_symbol_completion_list, ada_add_exceptions_from_frame) (ada_read_var_value): Update. * ada-exp.y (struct name_info) <block>: Now const. (%union): Likewise. (block_lookup): Constify.
2013-03-12 16:51:37 +01:00
void iterate_over_block_arg_vars (const struct block *block,
iterate_over_block_arg_local_vars_cb cb,
void *cb_data);
constify struct block in some places This makes some spots in gdb, particularly general_symbol_info, use a "const struct block", then fixes the fallout. The justification is that, ordinarily, blocks ought to be readonly. Note though that we can't add "const" in the blockvector due to block relocation. This can be done once blocks are made independent of the program space. 2014-06-18 Tom Tromey <tromey@redhat.com> * varobj.c (varobj_create): Update. * valops.c (value_of_this): Update. * tracepoint.c (add_local_symbols, scope_info): Update. * symtab.h (struct general_symbol_info) <block>: Now const. * symtab.c (skip_prologue_sal) (default_make_symbol_completion_list_break_on) (skip_prologue_using_sal): Update. * stack.h (iterate_over_block_locals) (iterate_over_block_local_vars): Update. * stack.c (print_frame_args): Update. (iterate_over_block_locals, iterate_over_block_local_vars): Make parameter const. (get_selected_block): Make return type const. * python/py-frame.c (frapy_block): Update. * python/py-block.c (gdbpy_block_for_pc): Update. * p-exp.y (%union) <bval>: Now const. * mi/mi-cmd-stack.c (list_args_or_locals): Update. * mdebugread.c (mylookup_symbol, parse_procedure): Update. * m2-exp.y (%union) <bval>: Now const. * linespec.c (get_current_search_block): Make return type const. (create_sals_line_offset, find_label_symbols): Update. * inline-frame.c (inline_frame_sniffer, skip_inline_frames): Update. (block_starting_point_at): Make "block" const. * infrun.c (insert_exception_resume_breakpoint): Make "b" const. (check_exception_resume): Update. * guile/scm-frame.c (gdbscm_frame_block): Update. * guile/scm-block.c (gdbscm_lookup_block): Update. * frame.h (get_frame_block): Update. (get_selected_block): Make return type const. * frame.c (frame_id_inner): Update. * f-valprint.c (info_common_command_for_block) (info_common_command): Update. * dwarf2loc.c (dwarf2_find_location_expression) (dwarf_expr_frame_base, dwarf2_compile_expr_to_ax) (locexpr_describe_location_piece): Update. * c-exp.y (%union) <bval>: Now const. * breakpoint.c (resolve_sal_pc): Update. * blockframe.c (get_frame_block):Make return type const. (get_pc_function_start, get_frame_function, find_pc_sect_function) (block_innermost_frame): Update. * block.h (blockvector_for_pc, blockvector_for_pc_sect) (block_for_pc, block_for_pc_sect): Update. * block.c (blockvector_for_pc_sect, blockvector_for_pc): Make 'pblock' const. (block_for_pc_sect, block_for_pc): Make return type const. * ax-gdb.c (gen_expr): Update. * alpha-mdebug-tdep.c (find_proc_desc): Update. * ada-lang.c (ada_read_renaming_var_value): Make 'block' const. (ada_make_symbol_completion_list, ada_add_exceptions_from_frame) (ada_read_var_value): Update. * ada-exp.y (struct name_info) <block>: Now const. (%union): Likewise. (block_lookup): Constify.
2013-03-12 16:51:37 +01:00
void iterate_over_block_local_vars (const struct block *block,
iterate_over_block_arg_local_vars_cb cb,
void *cb_data);
Implement 'set print frame-info|frame-arguments presence'. New settings allow to better control what frame information is printed. 'set print frame-info' allows to override the default frame information printed when a GDB command prints a frame. The backtrace command has a new option -frame-info to override this global setting. It is now possible to have very short frame information by using the new 'set print frame-arguments presence' and 'set print frame-info short-location'. Combined with 'set print address off', a backtrace will only show the essential information to see the function call chain, e.g.: (gdb) set print address off (gdb) set print frame-arguments presence (gdb) set print frame-info short-location (gdb) bt #0 break_me () #1 call_me (...) #2 main () (gdb) This is handy in particular for big backtraces with functions having many arguments. Python frame filter printing logic has been updated to respect the new setting in non MI mode. Also, the default frame information printed was inconsistent when backtrace was printing the frame information itself, or when the python frame filtering code was printing the frame information. This patch changes the default of python frame filtering to have a consistent behaviour regarding printed frame-information, whatever the presence/activity/matches of python filters. 2019-07-29 Philippe Waroquiers <philippe.waroquiers@skynet.be> * frame.h (enum print_what): New value 'SHORT_LOCATION', update comments. (print_frame_info_auto, print_frame_info_source_line, print_frame_info_location, print_frame_info_source_and_location, print_frame_info_location_and_address, print_frame_info_short_location): New declarations. (struct frame_print_options): New member print_frame_info. * extension.h (enum ext_lang_frame_args): New value CLI_PRESENCE. * stack.h (get_user_print_what_frame_info): New declaration. (frame_show_address): New declaration. * stack.c (print_frame_arguments_choices): New value 'presence'. (print_frame_info_auto, print_frame_info_source_line, print_frame_info_location, print_frame_info_source_and_location, print_frame_info_location_and_address, print_frame_info_short_location, print_frame_info_choices, print_frame_info_print_what): New definitions. (print_frame_args): Only print dots for args if print frame-arguments is 'presence'. (frame_print_option_defs): New element for "frame-info". (get_user_print_what_frame_info): New function. (frame_show_address): Make non static. Move comment to stack.h. (print_frame_info_to_print_what): New function. (print_frame_info): Update comment. Use fp_opts.print_frame_info to decide what to print. (backtrace_command_1): Handle the new print_frame_arguments_presence value. (_initialize_stack): Call add_setshow_enum_cmd for frame-info. * python/py-framefilter.c (py_print_args): Handle CLI_PRESENCE. (py_print_frame): In non-mi mode, use LOCATION as default for print_what, similarly to frame information printed directly by backtrace command. Handle frame-info user option in non MI mode.
2019-05-04 23:40:56 +02:00
/* Initialize *WHAT to be a copy of the user desired print what frame info.
If !WHAT.has_value (), the printing function chooses a default set of
information to print, otherwise the printing function should print
the relevant information. */
void get_user_print_what_frame_info (gdb::optional<enum print_what> *what);
/* Return true if we should display the address in addition to the location,
Implement 'set print frame-info|frame-arguments presence'. New settings allow to better control what frame information is printed. 'set print frame-info' allows to override the default frame information printed when a GDB command prints a frame. The backtrace command has a new option -frame-info to override this global setting. It is now possible to have very short frame information by using the new 'set print frame-arguments presence' and 'set print frame-info short-location'. Combined with 'set print address off', a backtrace will only show the essential information to see the function call chain, e.g.: (gdb) set print address off (gdb) set print frame-arguments presence (gdb) set print frame-info short-location (gdb) bt #0 break_me () #1 call_me (...) #2 main () (gdb) This is handy in particular for big backtraces with functions having many arguments. Python frame filter printing logic has been updated to respect the new setting in non MI mode. Also, the default frame information printed was inconsistent when backtrace was printing the frame information itself, or when the python frame filtering code was printing the frame information. This patch changes the default of python frame filtering to have a consistent behaviour regarding printed frame-information, whatever the presence/activity/matches of python filters. 2019-07-29 Philippe Waroquiers <philippe.waroquiers@skynet.be> * frame.h (enum print_what): New value 'SHORT_LOCATION', update comments. (print_frame_info_auto, print_frame_info_source_line, print_frame_info_location, print_frame_info_source_and_location, print_frame_info_location_and_address, print_frame_info_short_location): New declarations. (struct frame_print_options): New member print_frame_info. * extension.h (enum ext_lang_frame_args): New value CLI_PRESENCE. * stack.h (get_user_print_what_frame_info): New declaration. (frame_show_address): New declaration. * stack.c (print_frame_arguments_choices): New value 'presence'. (print_frame_info_auto, print_frame_info_source_line, print_frame_info_location, print_frame_info_source_and_location, print_frame_info_location_and_address, print_frame_info_short_location, print_frame_info_choices, print_frame_info_print_what): New definitions. (print_frame_args): Only print dots for args if print frame-arguments is 'presence'. (frame_print_option_defs): New element for "frame-info". (get_user_print_what_frame_info): New function. (frame_show_address): Make non static. Move comment to stack.h. (print_frame_info_to_print_what): New function. (print_frame_info): Update comment. Use fp_opts.print_frame_info to decide what to print. (backtrace_command_1): Handle the new print_frame_arguments_presence value. (_initialize_stack): Call add_setshow_enum_cmd for frame-info. * python/py-framefilter.c (py_print_args): Handle CLI_PRESENCE. (py_print_frame): In non-mi mode, use LOCATION as default for print_what, similarly to frame information printed directly by backtrace command. Handle frame-info user option in non MI mode.
2019-05-04 23:40:56 +02:00
because we are in the middle of a statement. */
bool frame_show_address (struct frame_info *frame, struct symtab_and_line sal);
Implement 'set print frame-info|frame-arguments presence'. New settings allow to better control what frame information is printed. 'set print frame-info' allows to override the default frame information printed when a GDB command prints a frame. The backtrace command has a new option -frame-info to override this global setting. It is now possible to have very short frame information by using the new 'set print frame-arguments presence' and 'set print frame-info short-location'. Combined with 'set print address off', a backtrace will only show the essential information to see the function call chain, e.g.: (gdb) set print address off (gdb) set print frame-arguments presence (gdb) set print frame-info short-location (gdb) bt #0 break_me () #1 call_me (...) #2 main () (gdb) This is handy in particular for big backtraces with functions having many arguments. Python frame filter printing logic has been updated to respect the new setting in non MI mode. Also, the default frame information printed was inconsistent when backtrace was printing the frame information itself, or when the python frame filtering code was printing the frame information. This patch changes the default of python frame filtering to have a consistent behaviour regarding printed frame-information, whatever the presence/activity/matches of python filters. 2019-07-29 Philippe Waroquiers <philippe.waroquiers@skynet.be> * frame.h (enum print_what): New value 'SHORT_LOCATION', update comments. (print_frame_info_auto, print_frame_info_source_line, print_frame_info_location, print_frame_info_source_and_location, print_frame_info_location_and_address, print_frame_info_short_location): New declarations. (struct frame_print_options): New member print_frame_info. * extension.h (enum ext_lang_frame_args): New value CLI_PRESENCE. * stack.h (get_user_print_what_frame_info): New declaration. (frame_show_address): New declaration. * stack.c (print_frame_arguments_choices): New value 'presence'. (print_frame_info_auto, print_frame_info_source_line, print_frame_info_location, print_frame_info_source_and_location, print_frame_info_location_and_address, print_frame_info_short_location, print_frame_info_choices, print_frame_info_print_what): New definitions. (print_frame_args): Only print dots for args if print frame-arguments is 'presence'. (frame_print_option_defs): New element for "frame-info". (get_user_print_what_frame_info): New function. (frame_show_address): Make non static. Move comment to stack.h. (print_frame_info_to_print_what): New function. (print_frame_info): Update comment. Use fp_opts.print_frame_info to decide what to print. (backtrace_command_1): Handle the new print_frame_arguments_presence value. (_initialize_stack): Call add_setshow_enum_cmd for frame-info. * python/py-framefilter.c (py_print_args): Handle CLI_PRESENCE. (py_print_frame): In non-mi mode, use LOCATION as default for print_what, similarly to frame information printed directly by backtrace command. Handle frame-info user option in non MI mode.
2019-05-04 23:40:56 +02:00
/* Forget the last sal we displayed. */
2011-10-06 Justin Lebar <justin.lebar@gmail.com> * Makefile.in: (SFILES): Add skip.c. (HFILES_NO_SRCDIR): Add skip.h. (COMMON_OBS): Add skip.o. * skip.h, skip.c: New. * breakpoint.h (set_default_breakpoint): Remove. (get_sal_arch): Declare. * breakpoint.c: Remove default_breakpoint_valid, default_breakpoint_address, default_breakpoint_symtab, default_breakpoint_line, default_breakpoint_pspace variables. (get_sal_arch): Make public. (set_default_breakpoint): Remove. (parse_breakpoint_sals, create_breakpoint, clear_command, decode_line_spec_1): Remove uses of default_breakpoint variables; replaced with function calls into stack.c. * cli/cli-cmds.h: Add cmd_list_element *skiplist. * cli/cli-cmds.c: Add skiplist. (init_cmd_lists): Initialize skiplist. (init_cli_cmds): Fix comment (classes of commands appear in alphabetical order). * infrun.c (handle_inferior_event): Add check that we don't step into a function whose pc is marked for skip. * stack.c: Declare last_displayed_sal_valid, last_displayed_pspace, last_displayed_addr, last_displayed_symtab, last_displayed_line variables. (set_last_displayed_sal): New static function. (print_frame_info): Switch call to set_default_breakpoint to call to set_last_displayed_sal. (clear_last_displayed_sal, last_displayed_sal_is_valid, get_last_displayed_pspace, get_last_displayed_addr, get_last_displayed_symtab, get_last_displayed_line, get_last_displayed_sal): New public functions. * stack.h (clear_last_displayed_sal, last_displayed_sal_is_valid, get_last_displayed_pspace, get_last_displayed_addr, get_last_displayed_symtab, get_last_displayed_line, get_last_displayed_sal): Declare. 2011-10-06 Justin Lebar <justin.lebar@gmail.com> Add tests for skip command. * testsuite/gdb.base/skip-solib-lib.c: New * testsuite/gdb.base/skip-solib-main.c: New * testsuite/gdb.base/skip-solib.exp: New * testsuite/gdb.base/skip.c: New * testsuite/gdb.base/skip.exp: New * testsuite/gdb.base/skip1.c: New * testsuite/gdb.base/Makefile.in: Adding new files.
2011-11-01 15:51:25 +01:00
void clear_last_displayed_sal (void);
/* Is our record of the last sal we displayed valid? If not, the
get_last_displayed_* functions will return NULL or 0, as appropriate. */
bool last_displayed_sal_is_valid (void);
/* Get the pspace of the last sal we displayed, if it's valid, otherwise
return nullptr. */
2011-10-06 Justin Lebar <justin.lebar@gmail.com> * Makefile.in: (SFILES): Add skip.c. (HFILES_NO_SRCDIR): Add skip.h. (COMMON_OBS): Add skip.o. * skip.h, skip.c: New. * breakpoint.h (set_default_breakpoint): Remove. (get_sal_arch): Declare. * breakpoint.c: Remove default_breakpoint_valid, default_breakpoint_address, default_breakpoint_symtab, default_breakpoint_line, default_breakpoint_pspace variables. (get_sal_arch): Make public. (set_default_breakpoint): Remove. (parse_breakpoint_sals, create_breakpoint, clear_command, decode_line_spec_1): Remove uses of default_breakpoint variables; replaced with function calls into stack.c. * cli/cli-cmds.h: Add cmd_list_element *skiplist. * cli/cli-cmds.c: Add skiplist. (init_cmd_lists): Initialize skiplist. (init_cli_cmds): Fix comment (classes of commands appear in alphabetical order). * infrun.c (handle_inferior_event): Add check that we don't step into a function whose pc is marked for skip. * stack.c: Declare last_displayed_sal_valid, last_displayed_pspace, last_displayed_addr, last_displayed_symtab, last_displayed_line variables. (set_last_displayed_sal): New static function. (print_frame_info): Switch call to set_default_breakpoint to call to set_last_displayed_sal. (clear_last_displayed_sal, last_displayed_sal_is_valid, get_last_displayed_pspace, get_last_displayed_addr, get_last_displayed_symtab, get_last_displayed_line, get_last_displayed_sal): New public functions. * stack.h (clear_last_displayed_sal, last_displayed_sal_is_valid, get_last_displayed_pspace, get_last_displayed_addr, get_last_displayed_symtab, get_last_displayed_line, get_last_displayed_sal): Declare. 2011-10-06 Justin Lebar <justin.lebar@gmail.com> Add tests for skip command. * testsuite/gdb.base/skip-solib-lib.c: New * testsuite/gdb.base/skip-solib-main.c: New * testsuite/gdb.base/skip-solib.exp: New * testsuite/gdb.base/skip.c: New * testsuite/gdb.base/skip.exp: New * testsuite/gdb.base/skip1.c: New * testsuite/gdb.base/Makefile.in: Adding new files.
2011-11-01 15:51:25 +01:00
struct program_space* get_last_displayed_pspace (void);
/* Get the address of the last sal we displayed, if it's valid, otherwise
return an address of 0. */
2011-10-06 Justin Lebar <justin.lebar@gmail.com> * Makefile.in: (SFILES): Add skip.c. (HFILES_NO_SRCDIR): Add skip.h. (COMMON_OBS): Add skip.o. * skip.h, skip.c: New. * breakpoint.h (set_default_breakpoint): Remove. (get_sal_arch): Declare. * breakpoint.c: Remove default_breakpoint_valid, default_breakpoint_address, default_breakpoint_symtab, default_breakpoint_line, default_breakpoint_pspace variables. (get_sal_arch): Make public. (set_default_breakpoint): Remove. (parse_breakpoint_sals, create_breakpoint, clear_command, decode_line_spec_1): Remove uses of default_breakpoint variables; replaced with function calls into stack.c. * cli/cli-cmds.h: Add cmd_list_element *skiplist. * cli/cli-cmds.c: Add skiplist. (init_cmd_lists): Initialize skiplist. (init_cli_cmds): Fix comment (classes of commands appear in alphabetical order). * infrun.c (handle_inferior_event): Add check that we don't step into a function whose pc is marked for skip. * stack.c: Declare last_displayed_sal_valid, last_displayed_pspace, last_displayed_addr, last_displayed_symtab, last_displayed_line variables. (set_last_displayed_sal): New static function. (print_frame_info): Switch call to set_default_breakpoint to call to set_last_displayed_sal. (clear_last_displayed_sal, last_displayed_sal_is_valid, get_last_displayed_pspace, get_last_displayed_addr, get_last_displayed_symtab, get_last_displayed_line, get_last_displayed_sal): New public functions. * stack.h (clear_last_displayed_sal, last_displayed_sal_is_valid, get_last_displayed_pspace, get_last_displayed_addr, get_last_displayed_symtab, get_last_displayed_line, get_last_displayed_sal): Declare. 2011-10-06 Justin Lebar <justin.lebar@gmail.com> Add tests for skip command. * testsuite/gdb.base/skip-solib-lib.c: New * testsuite/gdb.base/skip-solib-main.c: New * testsuite/gdb.base/skip-solib.exp: New * testsuite/gdb.base/skip.c: New * testsuite/gdb.base/skip.exp: New * testsuite/gdb.base/skip1.c: New * testsuite/gdb.base/Makefile.in: Adding new files.
2011-11-01 15:51:25 +01:00
CORE_ADDR get_last_displayed_addr (void);
/* Get the symtab of the last sal we displayed, if it's valid, otherwise
return nullptr. */
2011-10-06 Justin Lebar <justin.lebar@gmail.com> * Makefile.in: (SFILES): Add skip.c. (HFILES_NO_SRCDIR): Add skip.h. (COMMON_OBS): Add skip.o. * skip.h, skip.c: New. * breakpoint.h (set_default_breakpoint): Remove. (get_sal_arch): Declare. * breakpoint.c: Remove default_breakpoint_valid, default_breakpoint_address, default_breakpoint_symtab, default_breakpoint_line, default_breakpoint_pspace variables. (get_sal_arch): Make public. (set_default_breakpoint): Remove. (parse_breakpoint_sals, create_breakpoint, clear_command, decode_line_spec_1): Remove uses of default_breakpoint variables; replaced with function calls into stack.c. * cli/cli-cmds.h: Add cmd_list_element *skiplist. * cli/cli-cmds.c: Add skiplist. (init_cmd_lists): Initialize skiplist. (init_cli_cmds): Fix comment (classes of commands appear in alphabetical order). * infrun.c (handle_inferior_event): Add check that we don't step into a function whose pc is marked for skip. * stack.c: Declare last_displayed_sal_valid, last_displayed_pspace, last_displayed_addr, last_displayed_symtab, last_displayed_line variables. (set_last_displayed_sal): New static function. (print_frame_info): Switch call to set_default_breakpoint to call to set_last_displayed_sal. (clear_last_displayed_sal, last_displayed_sal_is_valid, get_last_displayed_pspace, get_last_displayed_addr, get_last_displayed_symtab, get_last_displayed_line, get_last_displayed_sal): New public functions. * stack.h (clear_last_displayed_sal, last_displayed_sal_is_valid, get_last_displayed_pspace, get_last_displayed_addr, get_last_displayed_symtab, get_last_displayed_line, get_last_displayed_sal): Declare. 2011-10-06 Justin Lebar <justin.lebar@gmail.com> Add tests for skip command. * testsuite/gdb.base/skip-solib-lib.c: New * testsuite/gdb.base/skip-solib-main.c: New * testsuite/gdb.base/skip-solib.exp: New * testsuite/gdb.base/skip.c: New * testsuite/gdb.base/skip.exp: New * testsuite/gdb.base/skip1.c: New * testsuite/gdb.base/Makefile.in: Adding new files.
2011-11-01 15:51:25 +01:00
struct symtab* get_last_displayed_symtab (void);
/* Get the line of the last sal we displayed, if it's valid, otherwise
return 0. */
2011-10-06 Justin Lebar <justin.lebar@gmail.com> * Makefile.in: (SFILES): Add skip.c. (HFILES_NO_SRCDIR): Add skip.h. (COMMON_OBS): Add skip.o. * skip.h, skip.c: New. * breakpoint.h (set_default_breakpoint): Remove. (get_sal_arch): Declare. * breakpoint.c: Remove default_breakpoint_valid, default_breakpoint_address, default_breakpoint_symtab, default_breakpoint_line, default_breakpoint_pspace variables. (get_sal_arch): Make public. (set_default_breakpoint): Remove. (parse_breakpoint_sals, create_breakpoint, clear_command, decode_line_spec_1): Remove uses of default_breakpoint variables; replaced with function calls into stack.c. * cli/cli-cmds.h: Add cmd_list_element *skiplist. * cli/cli-cmds.c: Add skiplist. (init_cmd_lists): Initialize skiplist. (init_cli_cmds): Fix comment (classes of commands appear in alphabetical order). * infrun.c (handle_inferior_event): Add check that we don't step into a function whose pc is marked for skip. * stack.c: Declare last_displayed_sal_valid, last_displayed_pspace, last_displayed_addr, last_displayed_symtab, last_displayed_line variables. (set_last_displayed_sal): New static function. (print_frame_info): Switch call to set_default_breakpoint to call to set_last_displayed_sal. (clear_last_displayed_sal, last_displayed_sal_is_valid, get_last_displayed_pspace, get_last_displayed_addr, get_last_displayed_symtab, get_last_displayed_line, get_last_displayed_sal): New public functions. * stack.h (clear_last_displayed_sal, last_displayed_sal_is_valid, get_last_displayed_pspace, get_last_displayed_addr, get_last_displayed_symtab, get_last_displayed_line, get_last_displayed_sal): Declare. 2011-10-06 Justin Lebar <justin.lebar@gmail.com> Add tests for skip command. * testsuite/gdb.base/skip-solib-lib.c: New * testsuite/gdb.base/skip-solib-main.c: New * testsuite/gdb.base/skip-solib.exp: New * testsuite/gdb.base/skip.c: New * testsuite/gdb.base/skip.exp: New * testsuite/gdb.base/skip1.c: New * testsuite/gdb.base/Makefile.in: Adding new files.
2011-11-01 15:51:25 +01:00
int get_last_displayed_line (void);
/* Get the last sal we displayed, if it's valid, otherwise return a
symtab_and_line constructed in its default state. */
Kill init_sal Instead, make symtab_and_line initialize its members itself. Many symtab_and_line declarations are moved to where the object is initialized at the same time both for clarity and to avoid double initialization. A few functions, like e.g., find_frame_sal are adjusted to return the sal using normal function return instead of an output parameter likewise to avoid having to default-construct a sal and then immediately have the object overwritten. gdb/ChangeLog: 2017-09-04 Pedro Alves <palves@redhat.com> * ada-lang.c (is_known_support_routine): Move sal declaration to where it is initialized. * breakpoint.c (create_internal_breakpoint, init_catchpoint) (parse_breakpoint_sals, decode_static_tracepoint_spec) (clear_command, update_static_tracepoint): Remove init_sal references. Move declarations closer to initializations. * cli/cli-cmds.c (list_command): Move sal declarations closer to initializations. * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal references. Move sal declarations closer to initializations. * frame.c (find_frame_sal): Return a symtab_and_line via function return instead of output parameter. Remove init_sal references. * frame.h (find_frame_sal): Return a symtab_and_line via function return instead of output parameter. * guile/scm-frame.c (gdbscm_frame_sal): Adjust. * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new instead of memset. (gdbscm_find_pc_line): Remove init_sal reference. * infcall.c (call_function_by_hand_dummy): Remove init_sal references. Move declarations closer to initializations. * infcmd.c (set_step_frame): Update. Move declarations closer to initializations. (finish_backward): Remove init_sal references. Move declarations closer to initializations. * infrun.c (process_event_stop_test, handle_step_into_function) (insert_hp_step_resume_breakpoint_at_frame) (insert_step_resume_breakpoint_at_caller): Likewise. * linespec.c (create_sals_line_offset, decode_digits_ordinary) (symbol_to_sal): Likewise. * probe.c (parse_probes_in_pspace): Remove init_sal reference. * python/py-frame.c (frapy_find_sal): Move sal declaration closer to its initialization. * reverse.c (save_bookmark_command): Use new/delete. Remove init_sal references. Move declarations closer to initializations. * source.c (get_current_source_symtab_and_line): Remove brace initialization. (set_current_source_symtab_and_line): Now takes the sal by const reference. Remove brace initialization. (line_info): Remove init_sal reference. * source.h (set_current_source_symtab_and_line): Now takes a symtab_and_line via const reference. * stack.c (set_current_sal_from_frame): Adjust. (print_frame_info): Adjust. (get_last_displayed_sal): Return the sal via function return instead of via output parameter. Simplify. (frame_info): Adjust. * stack.h (get_last_displayed_sal): Return the sal via function return instead of via output parameter. * symtab.c (init_sal): Delete. (find_pc_sect_line): Remove init_sal references. Move declarations closer to initializations. (find_function_start_sal): Remove init_sal references. Move declarations closer to initializations. * symtab.h (struct symtab_and_line): In-class initialize all fields. * tracepoint.c (set_traceframe_context) (print_one_static_tracepoint_marker): Remove init_sal references. Move declarations closer to initializations. * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust. * tui/tui-stack.c (tui_show_frame_info): Adjust. Move declarations closer to initializations. * tui/tui-winsource.c (tui_update_source_window_as_is): Remove init_sal references. Adjust.
2017-09-04 18:10:13 +02:00
symtab_and_line get_last_displayed_sal ();
2011-10-06 Justin Lebar <justin.lebar@gmail.com> * Makefile.in: (SFILES): Add skip.c. (HFILES_NO_SRCDIR): Add skip.h. (COMMON_OBS): Add skip.o. * skip.h, skip.c: New. * breakpoint.h (set_default_breakpoint): Remove. (get_sal_arch): Declare. * breakpoint.c: Remove default_breakpoint_valid, default_breakpoint_address, default_breakpoint_symtab, default_breakpoint_line, default_breakpoint_pspace variables. (get_sal_arch): Make public. (set_default_breakpoint): Remove. (parse_breakpoint_sals, create_breakpoint, clear_command, decode_line_spec_1): Remove uses of default_breakpoint variables; replaced with function calls into stack.c. * cli/cli-cmds.h: Add cmd_list_element *skiplist. * cli/cli-cmds.c: Add skiplist. (init_cmd_lists): Initialize skiplist. (init_cli_cmds): Fix comment (classes of commands appear in alphabetical order). * infrun.c (handle_inferior_event): Add check that we don't step into a function whose pc is marked for skip. * stack.c: Declare last_displayed_sal_valid, last_displayed_pspace, last_displayed_addr, last_displayed_symtab, last_displayed_line variables. (set_last_displayed_sal): New static function. (print_frame_info): Switch call to set_default_breakpoint to call to set_last_displayed_sal. (clear_last_displayed_sal, last_displayed_sal_is_valid, get_last_displayed_pspace, get_last_displayed_addr, get_last_displayed_symtab, get_last_displayed_line, get_last_displayed_sal): New public functions. * stack.h (clear_last_displayed_sal, last_displayed_sal_is_valid, get_last_displayed_pspace, get_last_displayed_addr, get_last_displayed_symtab, get_last_displayed_line, get_last_displayed_sal): Declare. 2011-10-06 Justin Lebar <justin.lebar@gmail.com> Add tests for skip command. * testsuite/gdb.base/skip-solib-lib.c: New * testsuite/gdb.base/skip-solib-main.c: New * testsuite/gdb.base/skip-solib.exp: New * testsuite/gdb.base/skip.c: New * testsuite/gdb.base/skip.exp: New * testsuite/gdb.base/skip1.c: New * testsuite/gdb.base/Makefile.in: Adding new files.
2011-11-01 15:51:25 +01:00
Make "frame apply" support -OPT options This adds support for '-'-style options to the "frame apply" family of commands -- "frame apply COUNT", "frame apply level", "frame apply all", "faas" and "tfaas". The -q/-c/-s flags were already supported, -past-main/-past-entry is new: ~~~ (gdb) help frame apply all Apply a command to all frames. Usage: frame apply all [OPTION]... COMMAND Prints the frame location information followed by COMMAND output. By default, an error raised during the execution of COMMAND aborts "frame apply". Options: -q Disables printing the frame location information. -c Print any error raised by COMMAND and continue. -s Silently ignore any errors or empty output produced by COMMAND. -past-main [on|off] Set whether backtraces should continue past "main". Normally the caller of "main" is not of interest, so GDB will terminate the backtrace at "main". Set this if you need to see the rest of the stack trace. -past-entry [on|off] Set whether backtraces should continue past the entry point of a program. Normally there are no callers beyond the entry point of a program, so GDB will terminate the backtrace there. Set this if you need to see the rest of the stack trace. ~~~ TAB completion of options is now supported. Also, TAB completion of COMMAND in "frame apply all COMMAND" does the right thing now, making use of complete_command, added by the previous patch. E.g.: (gdb) thread apply all -ascending frame apply all -past-main print -[TAB] -address -elements -pretty -symbol -array -null-stop -repeats -union -array-indexes -object -static-members -vtbl (gdb) thread apply all -ascending frame apply all -past-main print glo[TAB] global1 global2 The change to tfaas_command is necessary because otherwise you get this: (gdb) tfaas -- Unrecognized option at: frame apply all -s -- That's because the above is equivalent to: (gdb) thread apply all -s frame apply all -s -- and the "--" instructs "thread apply" to consider everything up to "--" as its command options. And from that view, "frame" is an invalid option. The change makes tfaas be equivalent to: (gdb) thread apply all -s -- frame apply all -s -- gdb/ChangeLog: 2019-06-13 Pedro Alves <palves@redhat.com> * cli/cli-utils.c (parse_flags_qcs): Use validate_flags_qcs. (validate_flags_qcs): New. * cli/cli-utils.h (struct qcs_flags): Change field types to int. (validate_flags_qcs): Declare. * stack.c (qcs_flag_option_def, fr_qcs_flags_option_defs): New. (make_frame_apply_options_def_group): New. (frame_apply_command_count): Process options with gdb::option::process_options. (frame_apply_completer): New. (frame_apply_level_completer, frame_apply_all_completer) (frame_apply_completer): New. (_initialize_stack): Update help of "frame apply", "frame apply level", "frame apply all" and "faas" to mention supported options and install command completers. * stack.h (frame_apply_all_completer): Declare. * thread.c: Include "stack.h". (tfaas_command): Add "--". (_initialize_thread): Update help "tfaas" to mention supported options and install command completer. gdb/testsuite/ChangeLog: 2019-06-13 Pedro Alves <palves@redhat.com> * gdb.base/options.exp (test-frame-apply): New. (top level): Test print commands with different "frame apply" prefixes.
2019-06-13 01:06:53 +02:00
/* Completer for the "frame apply all" command. */
void frame_apply_all_cmd_completer (struct cmd_list_element *ignore,
completion_tracker &tracker,
const char *text, const char */*word*/);
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
#endif /* #ifndef STACK_H */