From cce0e92333b872cfe036aae611b6b5d61cf58186 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Tue, 23 Feb 2016 13:25:18 -0800 Subject: Extend "skip" command to support -file, -gfile, -function, -rfunction. gdb/ChangeLog: Extend "skip" command to support -file, -gfile, -function, -rfunction. * NEWS: Document new features. * skip.c: #include "fnmatch.h", "gdb_regex.h". (skiplist_entry) : Renamed from filename. : Renamed from function_name. : New members. : New members. (make_skip_entry): New function. (free_skiplist_entry, free_skiplist_entry_cleanup): New functions. (make_free_skiplist_entry_cleanup): New function. (skip_file_command): Update. (skip_function, skip_function_command): Update. (compile_skip_regexp): New functions. (skip_command): Add support for new options. (skip_info): Update. (skip_file_p, skip_gfile_p): New functions. (skip_function_p, skip_rfunction_p): New functions. (function_name_is_marked_for_skip): Update and simplify. (_initialize_step_skip): Update. * symtab.c: #include "fnmatch.h". (compare_glob_filenames_for_search): New function. * symtab.h (compare_glob_filenames_for_search): Declare. * utils.c (count_path_elements): New function. (strip_leading_path_elements): New function. * utils.h (count_path_elements): Declare. (strip_leading_path_elements): Declare. gdb/doc/ChangeLog: * gdb.texinfo (Skipping Over Functions and Files): Document new options to "skip" command. Update docs of output of "info skip". gdb/testsuite/ChangeLog: * gdb.base/skip.c (test_skip): New function. (end_test_skip_file_and_function): New function. (test_skip_file_and_function): New function. * gdb.base/skip1.c (test_skip): New function. (skip1_test_skip_file_and_function): New function. * gdb.base/skip.exp: Add tests for new skip options. * gdb.base/skip-solib.exp: Update expected output. * gdb.perf/skip-command.cc: New file. * gdb.perf/skip-command.exp: New file. * gdb.perf/skip-command.py: New file. --- gdb/NEWS | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gdb/NEWS') diff --git a/gdb/NEWS b/gdb/NEWS index 64c4869..fc79142 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -141,6 +141,14 @@ show max-value-size allocate for value contents. Prevents incorrect programs from causing GDB to allocate overly large buffers. Default is 64k. +skip -file file +skip -gfile file-glob-pattern +skip -function function +skip -rfunction regular-expression + A generalized form of the skip command, with new support for + glob-style file names and regular expressions for function names. + Additionally, a file spec and a function spec may now be combined. + * The "disassemble" command accepts a new modifier: /s. It prints mixed source+disassembly like /m with two differences: - disassembled instructions are now printed in program order, and -- cgit v1.1