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
|
|
|
/* Skipping uninteresting files and functions while stepping.
|
|
|
|
|
2015-01-01 10:32:14 +01:00
|
|
|
Copyright (C) 2011-2015 Free Software Foundation, Inc.
|
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
|
|
|
|
|
|
|
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
|
|
|
|
(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/>. */
|
|
|
|
|
|
|
|
#include "defs.h"
|
|
|
|
#include "skip.h"
|
|
|
|
#include "value.h"
|
|
|
|
#include "valprint.h"
|
|
|
|
#include "ui-out.h"
|
|
|
|
#include "symtab.h"
|
|
|
|
#include "gdbcmd.h"
|
|
|
|
#include "command.h"
|
|
|
|
#include "completer.h"
|
|
|
|
#include "stack.h"
|
|
|
|
#include "cli/cli-utils.h"
|
|
|
|
#include "arch-utils.h"
|
|
|
|
#include "linespec.h"
|
|
|
|
#include "objfiles.h"
|
|
|
|
#include "breakpoint.h" /* for get_sal_arch () */
|
gdb/
* ada-lang.c (user_select_syms): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
* breakpoint.c (print_breakpoint_location, resolve_sal_pc): Likewise.
(clear_command): New variable sal_fullname, initialize it. Replace
compare_filenames_for_search by filename_cmp with sal_fullname.
(say_where, update_static_tracepoint): Replace symtab->filename
refererences by symtab_to_filename_for_display calls.
* cli/cli-cmds.c (edit_command, list_command, ambiguous_line_spec):
Likewise.
* dwarf2read.c: Include source.h.
(fixup_go_packaging): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* linespec.c (add_sal_to_sals): Rename variable filename to fullname.
Replace symtab->filename refererences by symtab_to_filename_for_display
calls.
(create_sals_line_offset, convert_linespec_to_sals): New variable
fullname, initialize it, replace symtab->filename reference by the
variable.
* linux-fork.c: Include source.h.
(info_checkpoints_command): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* macroscope.c (sal_macro_scope): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
* mdebugread.c: Include source.h.
(psymtab_to_symtab_1): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
(mi_cmd_file_list_exec_source_files): Likewise.
* printcmd.c: Include source.h.
(build_address_symbolic): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* psymtab.c (partial_map_symtabs_matching_filename)
(read_psymtabs_with_fullname): Call compare_filenames_for_search also
with psymtab_to_fullname.
* python/py-symtab.c (stpy_str): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
(stpy_get_filename): New variable filename, initialize it, use instead
of symtab->filename refererences.
(salpy_str): Make variable filename const char *. Replace
symtab->filename refererences by symtab_to_filename_for_display calls.
* skip.c: Include source.h and filenames.h.
(skip_file_command): Remove const from the symtab variable. Replace
symtab->filename refererences by symtab_to_fullname call.
(function_name_is_marked_for_skip): New variables searched_for_fullname
and fullname. Use them to search also with symtab's fullname.
* source.c (find_source_lines): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
(print_source_lines_base): New variable filename, use it instead of
symtab->filename. Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
(line_info, forward_search_command): Replace symtab->filename
refererences by symtab_to_filename_for_display calls.
(reverse_search_command): Replace symtab->filename refererences by
symtab_to_filename_for_display calls. New variable filename for it.
* stack.c (frame_info): Likewise.
* symmisc.c: Include source.h.
(dump_objfile, dump_symtab_1, maintenance_print_symbols)
(maintenance_info_symtabs): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* symtab.c (iterate_over_some_symtabs): Call
compare_filenames_for_search also with symtab_to_fullname.
(lookup_symbol_aux_quick, basic_lookup_transparent_type_quick): Replace
symtab->filename refererences by symtab_to_filename_for_display calls.
(find_line_symtab): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
(file_matches): Replace filename_cmp by compare_filenames_for_search.
(print_symbol_info): Make the last parameter const char *. New
variable s_filename. Use it in the function.
(symtab_symbol_info): Make the last_filename variable const char *.
Replace symtab->filename refererences by symtab_to_filename_for_display
calls.
(rbreak_command): New variable fullname. Use it. Replace
symtab->filename refererence by symtab_to_filename_for_display call.
* tracepoint.c (set_traceframe_context, trace_find_line_command)
(print_one_static_tracepoint_marker): Replace symtab->filename
refererences by symtab_to_filename_for_display calls.
* tui/tui-source.c (tui_set_source_content): New variables filename and
s_filename. Replace symtab->filename refererences by this variable.
Replace other symtab->filename refererences by
symtab_to_filename_for_display calls.
2013-02-03 17:13:31 +01:00
|
|
|
#include "source.h"
|
|
|
|
#include "filenames.h"
|
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 skiplist_entry
|
|
|
|
{
|
|
|
|
int number;
|
|
|
|
|
|
|
|
/* NULL if this isn't a skiplist entry for an entire file.
|
|
|
|
The skiplist entry owns this pointer. */
|
|
|
|
char *filename;
|
|
|
|
|
|
|
|
/* The name of the marked-for-skip function, if this is a skiplist
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
entry for a function.
|
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
|
|
|
The skiplist entry owns this pointer. */
|
|
|
|
char *function_name;
|
|
|
|
|
|
|
|
int enabled;
|
|
|
|
|
|
|
|
struct skiplist_entry *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
static void add_skiplist_entry (struct skiplist_entry *e);
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
static void skip_function (const char *name);
|
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
|
|
|
|
|
|
|
static struct skiplist_entry *skiplist_entry_chain;
|
|
|
|
static int skiplist_entry_count;
|
|
|
|
|
|
|
|
#define ALL_SKIPLIST_ENTRIES(E) \
|
|
|
|
for (E = skiplist_entry_chain; E; E = E->next)
|
|
|
|
|
|
|
|
#define ALL_SKIPLIST_ENTRIES_SAFE(E,TMP) \
|
|
|
|
for (E = skiplist_entry_chain; \
|
|
|
|
E ? (TMP = E->next, 1) : 0; \
|
|
|
|
E = TMP)
|
|
|
|
|
|
|
|
static void
|
|
|
|
skip_file_command (char *arg, int from_tty)
|
|
|
|
{
|
|
|
|
struct skiplist_entry *e;
|
gdb/
* ada-lang.c (user_select_syms): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
* breakpoint.c (print_breakpoint_location, resolve_sal_pc): Likewise.
(clear_command): New variable sal_fullname, initialize it. Replace
compare_filenames_for_search by filename_cmp with sal_fullname.
(say_where, update_static_tracepoint): Replace symtab->filename
refererences by symtab_to_filename_for_display calls.
* cli/cli-cmds.c (edit_command, list_command, ambiguous_line_spec):
Likewise.
* dwarf2read.c: Include source.h.
(fixup_go_packaging): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* linespec.c (add_sal_to_sals): Rename variable filename to fullname.
Replace symtab->filename refererences by symtab_to_filename_for_display
calls.
(create_sals_line_offset, convert_linespec_to_sals): New variable
fullname, initialize it, replace symtab->filename reference by the
variable.
* linux-fork.c: Include source.h.
(info_checkpoints_command): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* macroscope.c (sal_macro_scope): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
* mdebugread.c: Include source.h.
(psymtab_to_symtab_1): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
(mi_cmd_file_list_exec_source_files): Likewise.
* printcmd.c: Include source.h.
(build_address_symbolic): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* psymtab.c (partial_map_symtabs_matching_filename)
(read_psymtabs_with_fullname): Call compare_filenames_for_search also
with psymtab_to_fullname.
* python/py-symtab.c (stpy_str): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
(stpy_get_filename): New variable filename, initialize it, use instead
of symtab->filename refererences.
(salpy_str): Make variable filename const char *. Replace
symtab->filename refererences by symtab_to_filename_for_display calls.
* skip.c: Include source.h and filenames.h.
(skip_file_command): Remove const from the symtab variable. Replace
symtab->filename refererences by symtab_to_fullname call.
(function_name_is_marked_for_skip): New variables searched_for_fullname
and fullname. Use them to search also with symtab's fullname.
* source.c (find_source_lines): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
(print_source_lines_base): New variable filename, use it instead of
symtab->filename. Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
(line_info, forward_search_command): Replace symtab->filename
refererences by symtab_to_filename_for_display calls.
(reverse_search_command): Replace symtab->filename refererences by
symtab_to_filename_for_display calls. New variable filename for it.
* stack.c (frame_info): Likewise.
* symmisc.c: Include source.h.
(dump_objfile, dump_symtab_1, maintenance_print_symbols)
(maintenance_info_symtabs): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* symtab.c (iterate_over_some_symtabs): Call
compare_filenames_for_search also with symtab_to_fullname.
(lookup_symbol_aux_quick, basic_lookup_transparent_type_quick): Replace
symtab->filename refererences by symtab_to_filename_for_display calls.
(find_line_symtab): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
(file_matches): Replace filename_cmp by compare_filenames_for_search.
(print_symbol_info): Make the last parameter const char *. New
variable s_filename. Use it in the function.
(symtab_symbol_info): Make the last_filename variable const char *.
Replace symtab->filename refererences by symtab_to_filename_for_display
calls.
(rbreak_command): New variable fullname. Use it. Replace
symtab->filename refererence by symtab_to_filename_for_display call.
* tracepoint.c (set_traceframe_context, trace_find_line_command)
(print_one_static_tracepoint_marker): Replace symtab->filename
refererences by symtab_to_filename_for_display calls.
* tui/tui-source.c (tui_set_source_content): New variables filename and
s_filename. Replace symtab->filename refererences by this variable.
Replace other symtab->filename refererences by
symtab_to_filename_for_display calls.
2013-02-03 17:13:31 +01:00
|
|
|
struct symtab *symtab;
|
2012-12-16 20:00:04 +01:00
|
|
|
const char *filename = NULL;
|
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
|
|
|
|
|
|
|
/* If no argument was given, try to default to the last
|
|
|
|
displayed codepoint. */
|
2012-12-16 20:00:04 +01:00
|
|
|
if (arg == NULL)
|
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
|
|
|
{
|
|
|
|
symtab = get_last_displayed_symtab ();
|
2012-12-16 20:00:04 +01:00
|
|
|
if (symtab == NULL)
|
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
|
|
|
error (_("No default file now."));
|
gdb/
* ada-lang.c (user_select_syms): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
* breakpoint.c (print_breakpoint_location, resolve_sal_pc): Likewise.
(clear_command): New variable sal_fullname, initialize it. Replace
compare_filenames_for_search by filename_cmp with sal_fullname.
(say_where, update_static_tracepoint): Replace symtab->filename
refererences by symtab_to_filename_for_display calls.
* cli/cli-cmds.c (edit_command, list_command, ambiguous_line_spec):
Likewise.
* dwarf2read.c: Include source.h.
(fixup_go_packaging): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* linespec.c (add_sal_to_sals): Rename variable filename to fullname.
Replace symtab->filename refererences by symtab_to_filename_for_display
calls.
(create_sals_line_offset, convert_linespec_to_sals): New variable
fullname, initialize it, replace symtab->filename reference by the
variable.
* linux-fork.c: Include source.h.
(info_checkpoints_command): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* macroscope.c (sal_macro_scope): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
* mdebugread.c: Include source.h.
(psymtab_to_symtab_1): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
(mi_cmd_file_list_exec_source_files): Likewise.
* printcmd.c: Include source.h.
(build_address_symbolic): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* psymtab.c (partial_map_symtabs_matching_filename)
(read_psymtabs_with_fullname): Call compare_filenames_for_search also
with psymtab_to_fullname.
* python/py-symtab.c (stpy_str): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
(stpy_get_filename): New variable filename, initialize it, use instead
of symtab->filename refererences.
(salpy_str): Make variable filename const char *. Replace
symtab->filename refererences by symtab_to_filename_for_display calls.
* skip.c: Include source.h and filenames.h.
(skip_file_command): Remove const from the symtab variable. Replace
symtab->filename refererences by symtab_to_fullname call.
(function_name_is_marked_for_skip): New variables searched_for_fullname
and fullname. Use them to search also with symtab's fullname.
* source.c (find_source_lines): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
(print_source_lines_base): New variable filename, use it instead of
symtab->filename. Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
(line_info, forward_search_command): Replace symtab->filename
refererences by symtab_to_filename_for_display calls.
(reverse_search_command): Replace symtab->filename refererences by
symtab_to_filename_for_display calls. New variable filename for it.
* stack.c (frame_info): Likewise.
* symmisc.c: Include source.h.
(dump_objfile, dump_symtab_1, maintenance_print_symbols)
(maintenance_info_symtabs): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* symtab.c (iterate_over_some_symtabs): Call
compare_filenames_for_search also with symtab_to_fullname.
(lookup_symbol_aux_quick, basic_lookup_transparent_type_quick): Replace
symtab->filename refererences by symtab_to_filename_for_display calls.
(find_line_symtab): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
(file_matches): Replace filename_cmp by compare_filenames_for_search.
(print_symbol_info): Make the last parameter const char *. New
variable s_filename. Use it in the function.
(symtab_symbol_info): Make the last_filename variable const char *.
Replace symtab->filename refererences by symtab_to_filename_for_display
calls.
(rbreak_command): New variable fullname. Use it. Replace
symtab->filename refererence by symtab_to_filename_for_display call.
* tracepoint.c (set_traceframe_context, trace_find_line_command)
(print_one_static_tracepoint_marker): Replace symtab->filename
refererences by symtab_to_filename_for_display calls.
* tui/tui-source.c (tui_set_source_content): New variables filename and
s_filename. Replace symtab->filename refererences by this variable.
Replace other symtab->filename refererences by
symtab_to_filename_for_display calls.
2013-02-03 17:13:31 +01:00
|
|
|
|
|
|
|
/* It is not a typo, symtab_to_filename_for_display woule be needlessly
|
|
|
|
ambiguous. */
|
|
|
|
filename = symtab_to_fullname (symtab);
|
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
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
symtab = lookup_symtab (arg);
|
2012-12-16 20:00:04 +01:00
|
|
|
if (symtab == NULL)
|
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
|
|
|
{
|
|
|
|
fprintf_filtered (gdb_stderr, _("No source file named %s.\n"), arg);
|
|
|
|
if (!nquery (_("\
|
|
|
|
Ignore file pending future shared library load? ")))
|
|
|
|
return;
|
|
|
|
}
|
gdb/
* ada-lang.c (user_select_syms): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
* breakpoint.c (print_breakpoint_location, resolve_sal_pc): Likewise.
(clear_command): New variable sal_fullname, initialize it. Replace
compare_filenames_for_search by filename_cmp with sal_fullname.
(say_where, update_static_tracepoint): Replace symtab->filename
refererences by symtab_to_filename_for_display calls.
* cli/cli-cmds.c (edit_command, list_command, ambiguous_line_spec):
Likewise.
* dwarf2read.c: Include source.h.
(fixup_go_packaging): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* linespec.c (add_sal_to_sals): Rename variable filename to fullname.
Replace symtab->filename refererences by symtab_to_filename_for_display
calls.
(create_sals_line_offset, convert_linespec_to_sals): New variable
fullname, initialize it, replace symtab->filename reference by the
variable.
* linux-fork.c: Include source.h.
(info_checkpoints_command): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* macroscope.c (sal_macro_scope): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
* mdebugread.c: Include source.h.
(psymtab_to_symtab_1): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
(mi_cmd_file_list_exec_source_files): Likewise.
* printcmd.c: Include source.h.
(build_address_symbolic): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* psymtab.c (partial_map_symtabs_matching_filename)
(read_psymtabs_with_fullname): Call compare_filenames_for_search also
with psymtab_to_fullname.
* python/py-symtab.c (stpy_str): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
(stpy_get_filename): New variable filename, initialize it, use instead
of symtab->filename refererences.
(salpy_str): Make variable filename const char *. Replace
symtab->filename refererences by symtab_to_filename_for_display calls.
* skip.c: Include source.h and filenames.h.
(skip_file_command): Remove const from the symtab variable. Replace
symtab->filename refererences by symtab_to_fullname call.
(function_name_is_marked_for_skip): New variables searched_for_fullname
and fullname. Use them to search also with symtab's fullname.
* source.c (find_source_lines): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
(print_source_lines_base): New variable filename, use it instead of
symtab->filename. Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
(line_info, forward_search_command): Replace symtab->filename
refererences by symtab_to_filename_for_display calls.
(reverse_search_command): Replace symtab->filename refererences by
symtab_to_filename_for_display calls. New variable filename for it.
* stack.c (frame_info): Likewise.
* symmisc.c: Include source.h.
(dump_objfile, dump_symtab_1, maintenance_print_symbols)
(maintenance_info_symtabs): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* symtab.c (iterate_over_some_symtabs): Call
compare_filenames_for_search also with symtab_to_fullname.
(lookup_symbol_aux_quick, basic_lookup_transparent_type_quick): Replace
symtab->filename refererences by symtab_to_filename_for_display calls.
(find_line_symtab): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
(file_matches): Replace filename_cmp by compare_filenames_for_search.
(print_symbol_info): Make the last parameter const char *. New
variable s_filename. Use it in the function.
(symtab_symbol_info): Make the last_filename variable const char *.
Replace symtab->filename refererences by symtab_to_filename_for_display
calls.
(rbreak_command): New variable fullname. Use it. Replace
symtab->filename refererence by symtab_to_filename_for_display call.
* tracepoint.c (set_traceframe_context, trace_find_line_command)
(print_one_static_tracepoint_marker): Replace symtab->filename
refererences by symtab_to_filename_for_display calls.
* tui/tui-source.c (tui_set_source_content): New variables filename and
s_filename. Replace symtab->filename refererences by this variable.
Replace other symtab->filename refererences by
symtab_to_filename_for_display calls.
2013-02-03 17:13:31 +01:00
|
|
|
/* Do not use SYMTAB's filename, later loaded shared libraries may match
|
|
|
|
given ARG but not SYMTAB's filename. */
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
filename = arg;
|
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
|
|
|
}
|
|
|
|
|
2013-12-28 23:31:01 +01:00
|
|
|
e = XCNEW (struct skiplist_entry);
|
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
|
|
|
e->filename = xstrdup (filename);
|
|
|
|
e->enabled = 1;
|
|
|
|
|
|
|
|
add_skiplist_entry (e);
|
|
|
|
|
|
|
|
printf_filtered (_("File %s will be skipped when stepping.\n"), filename);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
skip_function_command (char *arg, int from_tty)
|
|
|
|
{
|
2012-02-02 21:19:17 +01:00
|
|
|
const char *name = NULL;
|
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
|
|
|
|
|
|
|
/* Default to the current function if no argument is given. */
|
2012-12-16 20:00:04 +01:00
|
|
|
if (arg == NULL)
|
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 pc;
|
2012-12-16 20:00:04 +01:00
|
|
|
|
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
|
|
|
if (!last_displayed_sal_is_valid ())
|
|
|
|
error (_("No default function now."));
|
|
|
|
|
|
|
|
pc = get_last_displayed_addr ();
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
if (!find_pc_partial_function (pc, &name, NULL, NULL))
|
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
|
|
|
{
|
|
|
|
error (_("No function found containing current program point %s."),
|
|
|
|
paddress (get_current_arch (), pc));
|
|
|
|
}
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
skip_function (name);
|
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
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
if (lookup_symbol (arg, NULL, VAR_DOMAIN, NULL) == NULL)
|
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
|
|
|
{
|
|
|
|
fprintf_filtered (gdb_stderr,
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
_("No function found named %s.\n"), arg);
|
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
|
|
|
|
|
|
|
if (nquery (_("\
|
|
|
|
Ignore function pending future shared library load? ")))
|
|
|
|
{
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
/* Add the unverified skiplist entry. */
|
|
|
|
skip_function (arg);
|
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
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
skip_function (arg);
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
skip_info (char *arg, int from_tty)
|
|
|
|
{
|
|
|
|
struct skiplist_entry *e;
|
|
|
|
int num_printable_entries = 0;
|
|
|
|
struct value_print_options opts;
|
|
|
|
struct cleanup *tbl_chain;
|
|
|
|
|
|
|
|
get_user_print_options (&opts);
|
|
|
|
|
|
|
|
/* Count the number of rows in the table and see if we need space for a
|
|
|
|
64-bit address anywhere. */
|
|
|
|
ALL_SKIPLIST_ENTRIES (e)
|
2012-12-16 20:00:04 +01:00
|
|
|
if (arg == NULL || number_is_in_list (arg, e->number))
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
num_printable_entries++;
|
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
|
|
|
|
|
|
|
if (num_printable_entries == 0)
|
|
|
|
{
|
2012-12-16 20:00:04 +01:00
|
|
|
if (arg == NULL)
|
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
|
|
|
ui_out_message (current_uiout, 0, _("\
|
|
|
|
Not skipping any files or functions.\n"));
|
|
|
|
else
|
|
|
|
ui_out_message (current_uiout, 0,
|
|
|
|
_("No skiplist entries found with number %s.\n"), arg);
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
tbl_chain = make_cleanup_ui_out_table_begin_end (current_uiout, 4,
|
|
|
|
num_printable_entries,
|
|
|
|
"SkiplistTable");
|
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
|
|
|
|
|
|
|
ui_out_table_header (current_uiout, 7, ui_left, "number", "Num"); /* 1 */
|
|
|
|
ui_out_table_header (current_uiout, 14, ui_left, "type", "Type"); /* 2 */
|
|
|
|
ui_out_table_header (current_uiout, 3, ui_left, "enabled", "Enb"); /* 3 */
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
ui_out_table_header (current_uiout, 40, ui_noalign, "what", "What"); /* 4 */
|
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
|
|
|
ui_out_table_body (current_uiout);
|
|
|
|
|
|
|
|
ALL_SKIPLIST_ENTRIES (e)
|
|
|
|
{
|
|
|
|
struct cleanup *entry_chain;
|
|
|
|
|
|
|
|
QUIT;
|
2012-12-16 20:00:04 +01:00
|
|
|
if (arg != NULL && !number_is_in_list (arg, e->number))
|
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
|
|
|
continue;
|
|
|
|
|
|
|
|
entry_chain = make_cleanup_ui_out_tuple_begin_end (current_uiout,
|
|
|
|
"blklst-entry");
|
|
|
|
ui_out_field_int (current_uiout, "number", e->number); /* 1 */
|
|
|
|
|
2012-12-16 20:00:04 +01:00
|
|
|
if (e->function_name != NULL)
|
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
|
|
|
ui_out_field_string (current_uiout, "type", "function"); /* 2 */
|
2012-12-16 20:00:04 +01:00
|
|
|
else if (e->filename != NULL)
|
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
|
|
|
ui_out_field_string (current_uiout, "type", "file"); /* 2 */
|
|
|
|
else
|
|
|
|
internal_error (__FILE__, __LINE__, _("\
|
|
|
|
Skiplist entry should have either a filename or a function name."));
|
|
|
|
|
|
|
|
if (e->enabled)
|
|
|
|
ui_out_field_string (current_uiout, "enabled", "y"); /* 3 */
|
|
|
|
else
|
|
|
|
ui_out_field_string (current_uiout, "enabled", "n"); /* 3 */
|
|
|
|
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
if (e->function_name != NULL)
|
|
|
|
ui_out_field_string (current_uiout, "what", e->function_name); /* 4 */
|
|
|
|
else if (e->filename != NULL)
|
|
|
|
ui_out_field_string (current_uiout, "what", e->filename); /* 4 */
|
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
|
|
|
|
|
|
|
ui_out_text (current_uiout, "\n");
|
|
|
|
do_cleanups (entry_chain);
|
|
|
|
}
|
|
|
|
|
|
|
|
do_cleanups (tbl_chain);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
skip_enable_command (char *arg, int from_tty)
|
|
|
|
{
|
|
|
|
struct skiplist_entry *e;
|
|
|
|
int found = 0;
|
|
|
|
|
|
|
|
ALL_SKIPLIST_ENTRIES (e)
|
2012-12-16 20:00:04 +01:00
|
|
|
if (arg == NULL || number_is_in_list (arg, e->number))
|
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
|
|
|
{
|
|
|
|
e->enabled = 1;
|
|
|
|
found = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!found)
|
|
|
|
error (_("No skiplist entries found with number %s."), arg);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
skip_disable_command (char *arg, int from_tty)
|
|
|
|
{
|
|
|
|
struct skiplist_entry *e;
|
|
|
|
int found = 0;
|
|
|
|
|
|
|
|
ALL_SKIPLIST_ENTRIES (e)
|
2012-12-16 20:00:04 +01:00
|
|
|
if (arg == NULL || number_is_in_list (arg, e->number))
|
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
|
|
|
{
|
|
|
|
e->enabled = 0;
|
|
|
|
found = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!found)
|
|
|
|
error (_("No skiplist entries found with number %s."), arg);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
skip_delete_command (char *arg, int from_tty)
|
|
|
|
{
|
|
|
|
struct skiplist_entry *e, *temp, *b_prev;
|
|
|
|
int found = 0;
|
|
|
|
|
|
|
|
b_prev = 0;
|
|
|
|
ALL_SKIPLIST_ENTRIES_SAFE (e, temp)
|
2012-12-16 20:00:04 +01:00
|
|
|
if (arg == NULL || number_is_in_list (arg, e->number))
|
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
|
|
|
{
|
2012-12-16 20:00:04 +01:00
|
|
|
if (b_prev != NULL)
|
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
|
|
|
b_prev->next = e->next;
|
|
|
|
else
|
|
|
|
skiplist_entry_chain = e->next;
|
|
|
|
|
|
|
|
xfree (e->function_name);
|
|
|
|
xfree (e->filename);
|
|
|
|
xfree (e);
|
|
|
|
found = 1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
b_prev = e;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!found)
|
|
|
|
error (_("No skiplist entries found with number %s."), arg);
|
|
|
|
}
|
|
|
|
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
/* Create a skiplist entry for the given function NAME and add it to the
|
|
|
|
list. */
|
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
|
|
|
|
|
|
|
static void
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
skip_function (const char *name)
|
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
|
|
|
{
|
2013-12-28 23:31:01 +01:00
|
|
|
struct skiplist_entry *e = XCNEW (struct skiplist_entry);
|
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
|
|
|
|
|
|
|
e->enabled = 1;
|
|
|
|
e->function_name = xstrdup (name);
|
|
|
|
|
|
|
|
add_skiplist_entry (e);
|
|
|
|
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
printf_filtered (_("Function %s will be skipped when stepping.\n"), name);
|
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
|
|
|
}
|
|
|
|
|
|
|
|
/* Add the given skiplist entry to our list, and set the entry's number. */
|
|
|
|
|
|
|
|
static void
|
|
|
|
add_skiplist_entry (struct skiplist_entry *e)
|
|
|
|
{
|
|
|
|
struct skiplist_entry *e1;
|
|
|
|
|
|
|
|
e->number = ++skiplist_entry_count;
|
|
|
|
|
|
|
|
/* Add to the end of the chain so that the list of
|
|
|
|
skiplist entries will be in numerical order. */
|
|
|
|
|
|
|
|
e1 = skiplist_entry_chain;
|
2012-12-16 20:00:04 +01:00
|
|
|
if (e1 == NULL)
|
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
|
|
|
skiplist_entry_chain = e;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
while (e1->next)
|
|
|
|
e1 = e1->next;
|
|
|
|
e1->next = e;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
|
|
|
|
/* See skip.h. */
|
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
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
function_name_is_marked_for_skip (const char *function_name,
|
|
|
|
const struct symtab_and_line *function_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
|
|
|
{
|
gdb/
* ada-lang.c (user_select_syms): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
* breakpoint.c (print_breakpoint_location, resolve_sal_pc): Likewise.
(clear_command): New variable sal_fullname, initialize it. Replace
compare_filenames_for_search by filename_cmp with sal_fullname.
(say_where, update_static_tracepoint): Replace symtab->filename
refererences by symtab_to_filename_for_display calls.
* cli/cli-cmds.c (edit_command, list_command, ambiguous_line_spec):
Likewise.
* dwarf2read.c: Include source.h.
(fixup_go_packaging): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* linespec.c (add_sal_to_sals): Rename variable filename to fullname.
Replace symtab->filename refererences by symtab_to_filename_for_display
calls.
(create_sals_line_offset, convert_linespec_to_sals): New variable
fullname, initialize it, replace symtab->filename reference by the
variable.
* linux-fork.c: Include source.h.
(info_checkpoints_command): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* macroscope.c (sal_macro_scope): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
* mdebugread.c: Include source.h.
(psymtab_to_symtab_1): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
(mi_cmd_file_list_exec_source_files): Likewise.
* printcmd.c: Include source.h.
(build_address_symbolic): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* psymtab.c (partial_map_symtabs_matching_filename)
(read_psymtabs_with_fullname): Call compare_filenames_for_search also
with psymtab_to_fullname.
* python/py-symtab.c (stpy_str): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
(stpy_get_filename): New variable filename, initialize it, use instead
of symtab->filename refererences.
(salpy_str): Make variable filename const char *. Replace
symtab->filename refererences by symtab_to_filename_for_display calls.
* skip.c: Include source.h and filenames.h.
(skip_file_command): Remove const from the symtab variable. Replace
symtab->filename refererences by symtab_to_fullname call.
(function_name_is_marked_for_skip): New variables searched_for_fullname
and fullname. Use them to search also with symtab's fullname.
* source.c (find_source_lines): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
(print_source_lines_base): New variable filename, use it instead of
symtab->filename. Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
(line_info, forward_search_command): Replace symtab->filename
refererences by symtab_to_filename_for_display calls.
(reverse_search_command): Replace symtab->filename refererences by
symtab_to_filename_for_display calls. New variable filename for it.
* stack.c (frame_info): Likewise.
* symmisc.c: Include source.h.
(dump_objfile, dump_symtab_1, maintenance_print_symbols)
(maintenance_info_symtabs): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* symtab.c (iterate_over_some_symtabs): Call
compare_filenames_for_search also with symtab_to_fullname.
(lookup_symbol_aux_quick, basic_lookup_transparent_type_quick): Replace
symtab->filename refererences by symtab_to_filename_for_display calls.
(find_line_symtab): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
(file_matches): Replace filename_cmp by compare_filenames_for_search.
(print_symbol_info): Make the last parameter const char *. New
variable s_filename. Use it in the function.
(symtab_symbol_info): Make the last_filename variable const char *.
Replace symtab->filename refererences by symtab_to_filename_for_display
calls.
(rbreak_command): New variable fullname. Use it. Replace
symtab->filename refererence by symtab_to_filename_for_display call.
* tracepoint.c (set_traceframe_context, trace_find_line_command)
(print_one_static_tracepoint_marker): Replace symtab->filename
refererences by symtab_to_filename_for_display calls.
* tui/tui-source.c (tui_set_source_content): New variables filename and
s_filename. Replace symtab->filename refererences by this variable.
Replace other symtab->filename refererences by
symtab_to_filename_for_display calls.
2013-02-03 17:13:31 +01:00
|
|
|
int searched_for_fullname = 0;
|
|
|
|
const char *fullname = NULL;
|
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 skiplist_entry *e;
|
|
|
|
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
if (function_name == NULL)
|
|
|
|
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
|
|
|
ALL_SKIPLIST_ENTRIES (e)
|
|
|
|
{
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
if (!e->enabled)
|
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
|
|
|
continue;
|
|
|
|
|
|
|
|
/* Does the pc we're stepping into match e's stored pc? */
|
gdb/
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
* infrun.c (handle_inferior_event): Rename the called function to
function_name_is_marked_for_skip, pass it TMP_SAL.
* skip.c (struct skiplist_entry): Update function_name comment. Remove
fields pc, gdbarch and pending.
(skip_function_pc): Rename this forward declaration to ...
(skip_function): ... here.
(skip_file_command): Remove variable pending and its use, remove
initialization of E fields pending and gdbarch. Do not use SYMTAB
filename, use the specified one.
(skip_function_command): Remove variable func_pc, do not set it.
Update the caller of skip_function. Replace decode_line_1 call by
a lookup_symbol call. Remove variables orig_arg, decode_exception and
sals. Update the caller of skip_function.
(skip_info): Remove variable address_width and its use. Do not print
address (PC). Renumber column 5 to 4.
(skip_function_pc): Rename to ...
(skip_function): ... here and remove its parameters pc, arch and
pending. Update the function comment and no longer use those
parameters.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, update function comment
just to a skip.h reference, replace pc parameter by function_name and
function_sal. No longer use E field pending and pc. Remove variables
searched_for_sal, sal and filename. Call compare_filenames_for_search
instead of just strcmp.
(skip_re_set): Remove the function.
* skip.h (struct symtab_and_line): New declaration.
(function_pc_is_marked_for_skip): Rename to ...
(function_name_is_marked_for_skip): ... here, replace pc parameter by
function_name and function_sal, update the function comment.
gdb/testsuite/
* gdb.base/skip-solib.exp (info skip with pending file): Update the
expected output.
(info skip with pending file): Remove.
(ignoring function in solib, info skip for function multiply): Update
the expected output.
* gdb.base/skip.ex (skip (main), skip function baz, info skip)
(info skip (delete 1), info skip after disabling all)
(info skip after enabling all, info skip after disabling 4 2-3)
(info skip after enabling 2-3, info skip 2-3)
(info skip after deleting 2 3): Update the expected output.
* gdb.linespec/base/two/thefile.cc (n): New variable v, split the
statement to its initialization and return.
* gdb.linespec/skip-two.exp: New file.
2012-12-24 20:40:05 +01:00
|
|
|
if (e->function_name != NULL
|
|
|
|
&& strcmp_iw (function_name, e->function_name) == 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
|
|
|
return 1;
|
|
|
|
|
gdb/
* ada-lang.c (user_select_syms): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
* breakpoint.c (print_breakpoint_location, resolve_sal_pc): Likewise.
(clear_command): New variable sal_fullname, initialize it. Replace
compare_filenames_for_search by filename_cmp with sal_fullname.
(say_where, update_static_tracepoint): Replace symtab->filename
refererences by symtab_to_filename_for_display calls.
* cli/cli-cmds.c (edit_command, list_command, ambiguous_line_spec):
Likewise.
* dwarf2read.c: Include source.h.
(fixup_go_packaging): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* linespec.c (add_sal_to_sals): Rename variable filename to fullname.
Replace symtab->filename refererences by symtab_to_filename_for_display
calls.
(create_sals_line_offset, convert_linespec_to_sals): New variable
fullname, initialize it, replace symtab->filename reference by the
variable.
* linux-fork.c: Include source.h.
(info_checkpoints_command): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* macroscope.c (sal_macro_scope): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
* mdebugread.c: Include source.h.
(psymtab_to_symtab_1): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
(mi_cmd_file_list_exec_source_files): Likewise.
* printcmd.c: Include source.h.
(build_address_symbolic): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* psymtab.c (partial_map_symtabs_matching_filename)
(read_psymtabs_with_fullname): Call compare_filenames_for_search also
with psymtab_to_fullname.
* python/py-symtab.c (stpy_str): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
(stpy_get_filename): New variable filename, initialize it, use instead
of symtab->filename refererences.
(salpy_str): Make variable filename const char *. Replace
symtab->filename refererences by symtab_to_filename_for_display calls.
* skip.c: Include source.h and filenames.h.
(skip_file_command): Remove const from the symtab variable. Replace
symtab->filename refererences by symtab_to_fullname call.
(function_name_is_marked_for_skip): New variables searched_for_fullname
and fullname. Use them to search also with symtab's fullname.
* source.c (find_source_lines): Replace symtab->filename refererences
by symtab_to_filename_for_display calls.
(print_source_lines_base): New variable filename, use it instead of
symtab->filename. Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
(line_info, forward_search_command): Replace symtab->filename
refererences by symtab_to_filename_for_display calls.
(reverse_search_command): Replace symtab->filename refererences by
symtab_to_filename_for_display calls. New variable filename for it.
* stack.c (frame_info): Likewise.
* symmisc.c: Include source.h.
(dump_objfile, dump_symtab_1, maintenance_print_symbols)
(maintenance_info_symtabs): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
* symtab.c (iterate_over_some_symtabs): Call
compare_filenames_for_search also with symtab_to_fullname.
(lookup_symbol_aux_quick, basic_lookup_transparent_type_quick): Replace
symtab->filename refererences by symtab_to_filename_for_display calls.
(find_line_symtab): Replace symtab->filename refererences by
symtab_to_filename_for_display calls.
(file_matches): Replace filename_cmp by compare_filenames_for_search.
(print_symbol_info): Make the last parameter const char *. New
variable s_filename. Use it in the function.
(symtab_symbol_info): Make the last_filename variable const char *.
Replace symtab->filename refererences by symtab_to_filename_for_display
calls.
(rbreak_command): New variable fullname. Use it. Replace
symtab->filename refererence by symtab_to_filename_for_display call.
* tracepoint.c (set_traceframe_context, trace_find_line_command)
(print_one_static_tracepoint_marker): Replace symtab->filename
refererences by symtab_to_filename_for_display calls.
* tui/tui-source.c (tui_set_source_content): New variables filename and
s_filename. Replace symtab->filename refererences by this variable.
Replace other symtab->filename refererences by
symtab_to_filename_for_display calls.
2013-02-03 17:13:31 +01:00
|
|
|
if (e->filename != NULL)
|
|
|
|
{
|
|
|
|
/* Check first sole SYMTAB->FILENAME. It does not need to be
|
|
|
|
a substring of symtab_to_fullname as it may contain "./" etc. */
|
|
|
|
if (function_sal->symtab != NULL
|
|
|
|
&& compare_filenames_for_search (function_sal->symtab->filename,
|
|
|
|
e->filename))
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
/* Before we invoke realpath, which can get expensive when many
|
|
|
|
files are involved, do a quick comparison of the basenames. */
|
|
|
|
if (!basenames_may_differ
|
|
|
|
&& (function_sal->symtab == NULL
|
|
|
|
|| filename_cmp (lbasename (function_sal->symtab->filename),
|
|
|
|
lbasename (e->filename)) != 0))
|
|
|
|
continue;
|
|
|
|
|
|
|
|
/* Get the filename corresponding to this FUNCTION_SAL, if we haven't
|
|
|
|
yet. */
|
|
|
|
if (!searched_for_fullname)
|
|
|
|
{
|
|
|
|
if (function_sal->symtab != NULL)
|
|
|
|
fullname = symtab_to_fullname (function_sal->symtab);
|
|
|
|
searched_for_fullname = 1;
|
|
|
|
}
|
|
|
|
if (fullname != NULL
|
|
|
|
&& compare_filenames_for_search (fullname, e->filename))
|
|
|
|
return 1;
|
|
|
|
}
|
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
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-03-01 Pedro Alves <palves@redhat.com>
* amd64-linux-tdep.c (amd64_linux_record_signal): Make static.
* breakpoint.c (create_exception_master_breakpoint, trace_command)
(ftrace_command, strace_command): Make static.
* d-lang.c (_initialize_d_language): Declare.
* dwarf2expr.c (_initialize_dwarf2expr): Declare.
* dwarf2loc.c (_initialize_dwarf2loc):
* dwarf2read.c (process_psymtab_comp_unit): Make static.
* exec.c (exec_get_section_table): Make static.
* i386-linux-tdep.c (i386_linux_record_signal): Make static.
* infcmd.c (ensure_valid_thread, ensure_not_tfind_mode): Make static.
* inferior.c (remove_inferior_command, add_inferior_command)
(clone_inferior_command): Make static.
* linux-nat.c (linux_nat_thread_address_space)
(linux_nat_core_of_thread): Make static.
* linux-tdep.c (_initialize_linux_tdep): Declare.
* objc-lang.c (_initialize_objc_lang): Declare.
* opencl-lang.c (builtin_opencl_type, opencl_language_arch_info):
Make static.
(_initialize_opencl_language): Declare.
* record.c (_initialize_record): Declare.
* remote.c (demand_private_info, remote_get_tib_address)
(remote_supports_cond_tracepoints)
(remote_supports_fast_tracepoints, remote_get_tracepoint_status):
Make static.
* skip.c (_initialize_step_skip): Declare.
* symtab.c (skip_prologue_using_lineinfo): Make static.
* tracepoint.c (delete_trace_state_variable)
(trace_variable_command, delete_trace_variable_command)
(get_uploaded_tsv, find_matching_tracepoint_location)
(find_matching_tsv, create_tsv_from_upload, get_traceframe_info):
Make static.
* value.c (pack_unsigned_long): Make static.
* varobj.c (varobj_ensure_python_env): Make static.
* windows-tdep.c (_initialize_windows_tdep): Declare.
* xml-syscall.c (make_cleanup_free_syscalls_info): Make static.
2012-03-01 22:14:00 +01:00
|
|
|
/* Provide a prototype to silence -Wmissing-prototypes. */
|
|
|
|
extern initialize_file_ftype _initialize_step_skip;
|
|
|
|
|
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
|
|
|
|
_initialize_step_skip (void)
|
|
|
|
{
|
2012-08-09 08:48:22 +02:00
|
|
|
static struct cmd_list_element *skiplist = NULL;
|
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 cmd_list_element *c;
|
|
|
|
|
|
|
|
skiplist_entry_chain = 0;
|
|
|
|
skiplist_entry_count = 0;
|
|
|
|
|
|
|
|
add_prefix_cmd ("skip", class_breakpoint, skip_function_command, _("\
|
|
|
|
Ignore a function while stepping.\n\
|
|
|
|
Usage: skip [FUNCTION NAME]\n\
|
|
|
|
If no function name is given, ignore the current function."),
|
|
|
|
&skiplist, "skip ", 1, &cmdlist);
|
|
|
|
|
|
|
|
c = add_cmd ("file", class_breakpoint, skip_file_command, _("\
|
|
|
|
Ignore a file while stepping.\n\
|
|
|
|
Usage: skip file [FILENAME]\n\
|
|
|
|
If no filename is given, ignore the current file."),
|
|
|
|
&skiplist);
|
|
|
|
set_cmd_completer (c, filename_completer);
|
|
|
|
|
|
|
|
c = add_cmd ("function", class_breakpoint, skip_function_command, _("\
|
|
|
|
Ignore a function while stepping.\n\
|
|
|
|
Usage: skip function [FUNCTION NAME]\n\
|
|
|
|
If no function name is given, skip the current function."),
|
|
|
|
&skiplist);
|
|
|
|
set_cmd_completer (c, location_completer);
|
|
|
|
|
|
|
|
add_cmd ("enable", class_breakpoint, skip_enable_command, _("\
|
|
|
|
Enable skip entries. You can specify numbers (e.g. \"skip enable 1 3\"), \
|
|
|
|
ranges (e.g. \"skip enable 4-8\"), or both (e.g. \"skip enable 1 3 4-8\").\n\n\
|
|
|
|
If you don't specify any numbers or ranges, we'll enable all skip entries.\n\n\
|
|
|
|
Usage: skip enable [NUMBERS AND/OR RANGES]"),
|
|
|
|
&skiplist);
|
|
|
|
|
|
|
|
add_cmd ("disable", class_breakpoint, skip_disable_command, _("\
|
|
|
|
Disable skip entries. You can specify numbers (e.g. \"skip disable 1 3\"), \
|
|
|
|
ranges (e.g. \"skip disable 4-8\"), or both (e.g. \"skip disable 1 3 4-8\").\n\n\
|
|
|
|
If you don't specify any numbers or ranges, we'll disable all skip entries.\n\n\
|
|
|
|
Usage: skip disable [NUMBERS AND/OR RANGES]"),
|
|
|
|
&skiplist);
|
|
|
|
|
|
|
|
add_cmd ("delete", class_breakpoint, skip_delete_command, _("\
|
|
|
|
Delete skip entries. You can specify numbers (e.g. \"skip delete 1 3\"), \
|
|
|
|
ranges (e.g. \"skip delete 4-8\"), or both (e.g. \"skip delete 1 3 4-8\").\n\n\
|
|
|
|
If you don't specify any numbers or ranges, we'll delete all skip entries.\n\n\
|
|
|
|
Usage: skip delete [NUMBERS AND/OR RANGES]"),
|
|
|
|
&skiplist);
|
|
|
|
|
|
|
|
add_info ("skip", skip_info, _("\
|
|
|
|
Display the status of skips. You can specify numbers (e.g. \"skip info 1 3\"), \
|
|
|
|
ranges (e.g. \"skip info 4-8\"), or both (e.g. \"skip info 1 3 4-8\").\n\n\
|
|
|
|
If you don't specify any numbers or ranges, we'll show all skips.\n\n\
|
|
|
|
Usage: skip info [NUMBERS AND/OR RANGES]\n\
|
|
|
|
The \"Type\" column indicates one of:\n\
|
|
|
|
\tfile - ignored file\n\
|
|
|
|
\tfunction - ignored function"));
|
|
|
|
}
|