aboutsummaryrefslogtreecommitdiff
path: root/gdb/stack.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-04-23 11:03:57 -0600
committerTom Tromey <tom@tromey.com>2018-03-26 21:57:11 -0600
commit978d6c756fcb0332ddf12e19305dd0e53b98a93d (patch)
tree4cc45e6fc13330028284e03e5062455237afe342 /gdb/stack.c
parent1cf7e64086d1490649dc56e1c0505be91c600218 (diff)
downloadgdb-978d6c756fcb0332ddf12e19305dd0e53b98a93d.zip
gdb-978d6c756fcb0332ddf12e19305dd0e53b98a93d.tar.gz
gdb-978d6c756fcb0332ddf12e19305dd0e53b98a93d.tar.bz2
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.
Diffstat (limited to 'gdb/stack.c')
-rw-r--r--gdb/stack.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/stack.c b/gdb/stack.c
index 76695ff..8e8fe12 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -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. */