aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>2018-07-01 22:56:56 +0200
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>2018-10-27 13:47:45 +0200
commit12615cba8411c845b33b98cc616439c66a34f03a (patch)
tree4187da3c080cabaed4db481f7791f5fb6d1f2186 /gdb/symtab.h
parent0d4cad90ca7c4394a1799efaa79c784f84a18161 (diff)
downloadgdb-12615cba8411c845b33b98cc616439c66a34f03a.zip
gdb-12615cba8411c845b33b98cc616439c66a34f03a.tar.gz
gdb-12615cba8411c845b33b98cc616439c66a34f03a.tar.bz2
Add [-q] [-t TYPEREGEXP] [NAMEREGEXP] args to info [args|functions|locals|variables]
Add [-q] [-t TYPEREGEXP] [NAMEREGEXP] args to info [args|functions|locals|variables] Main changes are: * stack.c: Add two regexp preg and treg to print_variable_and_value_data and used them inside do_print_variable_and_value to filter the variables to print. * symtab.h: Add a new function bool treg_matches_sym_type_name, that factorises type matching logic. * symtab.c: Add type/name matching logic to 'info functions|variables'. * stack.c : Add type/name matching logic to 'info args|locals'. gdb/ChangeLog 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be> * stack.c (print_variable_and_value_data): Add preg and treg. (print_frame_local_vars): Add quiet, regexp and t_regexp arguments, and update callers. (print_frame_arg_vars): Likewise. (prepare_reg): New function. (info_locals_command): Extract info print args and use them. (info_args_command): Likewise. (_initialize_stack): Modify on-line help. * symtab.c (treg_matches_sym_type_name): New function. (search_symbols): New arg t_regexp. (symtab_symbol_info): New args quiet, regexp, t_regexp. (info_variables_command): Extract info print args and use them. (info_functions_command): Likewise. (info_types_command): Update call to symtab_symbol_info. (_initialize_symtab): Modify on-line help. * symtab.h (treg_matches_sym_type_name): New function. (search_symbols): New t_regexp arg.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index b91ec12..e0b8701 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -25,6 +25,7 @@
#include <string>
#include "gdb_vecs.h"
#include "gdbtypes.h"
+#include "gdb_regex.h"
#include "common/enum-flags.h"
#include "common/function-view.h"
#include "common/gdb_optional.h"
@@ -2057,8 +2058,12 @@ private:
};
extern std::vector<symbol_search> search_symbols (const char *,
- enum search_domain, int,
+ enum search_domain,
+ const char *,
+ int,
const char **);
+extern bool treg_matches_sym_type_name (const compiled_regex &treg,
+ const struct symbol *sym);
/* The name of the ``main'' function.
FIXME: cagney/2001-03-20: Can't make main_name() const since some