binutils-gdb/gdb/python
Andrew Burgess 4acfdd20c9 gdb: Add new -n flag to some info commands
The 'info variables', its alias 'whereis', and 'info functions' all
include non-debug symbols in the output by default.  The list of
non-debug symbols can sometimes be quite long, resulting in the
debug symbol based results being scrolled off the screen.

This commit adds a '-n' flag to all of the commands listed above that
excludes the non-debug symbols from the results, leaving just the
debug symbol based results.

gdb/ChangeLog:

	* cli/cli-utils.c (info_print_options_defs): Delete.
	(make_info_print_options_def_group): Delete.
	(extract_info_print_options): Delete.
	(info_print_command_completer): Delete.
	(info_print_args_help): Add extra parameter, and optionally
	include text about -n flag.
	* cli/cli-utils.h (struct info_print_options): Delete.
	(extract_info_print_options): Delete declaration.
	(info_print_command_completer): Delete declaration.
	(info_print_args_help): Add extra parameter, extend header
	comment.
	* python/python.c (gdbpy_rbreak): Pass additional parameter to
	search_symbols.
	* stack.c (struct info_print_options): New type.
	(info_print_options_defs): New file scoped variable.
	(make_info_print_options_def_group): New static function.
	(info_print_command_completer): New static function.
	(info_locals_command): Update to use new local functions.
	(info_args_command): Likewise.
	(_initialize_stack): Add extra parameter to calls to
	info_print_args_help.
	* symtab.c (search_symbols): Add extra parameter, use this to
	possibly excluse non-debug symbols.
	(symtab_symbol_info): Add extra parameter, which is passed on to
	search_symbols.
	(struct info_print_options): New type.
	(info_print_options_defs): New file scoped variable.
	(make_info_print_options_def_group): New static function.
	(info_print_command_completer): New static function.
	(info_variables_command): Update to use local functions, and pass
	extra parameter through to symtab_symbol_info.
	(info_functions_command): Likewise.
	(info_types_command): Pass additional argument through to
	symtab_symbol_info.
	(rbreak_command): Pass extra argument to search_symbols.
	(_initialize_symtab): Add extra arguments for calls to
	info_print_args_help, and update help text for 'info variables',
	'whereis', and 'info functions' commands.
	* symtab.h (search_symbols): Add extra argument to declaration.
	* NEWS: Mention new flags.

gdb/doc/ChangeLog:

	* gdb.texinfo (Symbols): Add information about the -n flag to
	"info variables" and "info functions".

gdb/testsuite/ChangeLog:

	* gdb.base/info-fun.exp: Extend to test the -n flag for 'info
	functions'.  Reindent as needed.
	* gdb.base/info-var-f1.c: New file.
	* gdb.base/info-var-f2.c: New file.
	* gdb.base/info-var.exp: New file.
	* gdb.base/info-var.h: New file.
2019-08-27 16:21:42 +01:00
..
lib/gdb Make GDB compile with Python 3 on MinGW 2019-08-22 17:44:58 -05:00
py-all-events.def
py-arch.c
py-auto-load.c
py-block.c Add block['var'] accessor 2019-08-05 13:06:18 -05:00
py-bpevent.c
py-breakpoint.c "catch catch/throw/rethrow", breakpoint -> catchpoint 2019-07-09 19:34:18 +01:00
py-cmd.c
py-continueevent.c
py-event-types.def
py-event.c
py-event.h
py-events.h
py-evtregistry.c
py-evts.c
py-exitedevent.c
py-finishbreakpoint.c
py-frame.c
py-framefilter.c Make struct frame_arg self-managing 2019-08-07 06:37:21 -06:00
py-function.c
py-gdb-readline.c
py-inferior.c Fix use-after-move bug in add_thread_object 2019-07-11 09:15:18 -06:00
py-infevents.c
py-infthread.c Reduce manual reference counting in py-inferior.c 2019-07-10 12:24:22 -06:00
py-instruction.c
py-instruction.h
py-lazy-string.c
py-linetable.c
py-newobjfileevent.c
py-objfile.c Add Objfile.lookup_{global,static}_symbol functions 2019-07-29 20:44:08 -05:00
py-param.c
py-prettyprint.c
py-progspace.c
py-record-btrace.c Don't include gdbarch.h from defs.h 2019-07-10 14:53:53 -06:00
py-record-btrace.h
py-record-full.c
py-record-full.h
py-record.c
py-record.h
py-ref.h
py-signalevent.c
py-stopevent.c
py-stopevent.h
py-symbol.c [PR/24474] Add gdb.lookup_static_symbol to the python API 2019-07-30 11:04:37 -05:00
py-symtab.c
py-threadevent.c
py-type.c
py-unwind.c Rename internal Python functions to start with an underscore 2019-08-15 14:21:57 -05:00
py-utils.c
py-value.c Fix indentation in value_has_field 2019-08-19 12:46:03 -06:00
py-varobj.c
py-xmethods.c
python-config.py
python-internal.h [PR/24474] Add gdb.lookup_static_symbol to the python API 2019-07-30 11:04:37 -05:00
python.c gdb: Add new -n flag to some info commands 2019-08-27 16:21:42 +01:00
python.h