Allow hiding of some filtered frames

When a frame filter elides some frames, they are still printed by
"bt", indented a few spaces.  PR backtrace/15582 notes that it would
be nice for users if elided frames could simply be dropped.  This
patch adds this capability.

gdb/ChangeLog
2018-03-26  Tom Tromey  <tom@tromey.com>

	PR backtrace/15582:
	* stack.c (backtrace_command): Parse "hide" argument.
	* python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
	* extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
	constant.

gdb/doc/ChangeLog
2018-03-26  Tom Tromey  <tom@tromey.com>

	PR backtrace/15582:
	* gdb.texinfo (Backtrace): Mention "hide" argument.

gdb/testsuite/ChangeLog
2018-03-26  Tom Tromey  <tom@tromey.com>

	PR backtrace/15582:
	* gdb.python/py-framefilter.exp: Add "bt hide" test.
This commit is contained in:
Tom Tromey 2017-04-23 11:03:57 -06:00
parent 1cf7e64086
commit 978d6c756f
8 changed files with 57 additions and 25 deletions

View file

@ -1867,6 +1867,8 @@ backtrace_command (const char *arg, int from_tty)
filters = false;
else if (subset_compare (this_arg.c_str (), "full"))
flags |= PRINT_LOCALS;
else if (subset_compare (this_arg.c_str (), "hide"))
flags |= PRINT_HIDE;
else
{
/* Not a recognized argument, so stop. */