+2018-03-26 Tom Tromey <tom@tromey.com>
+
+ * stack.c (backtrace_command_1): Remove "show_locals" parameter,
+ add "flags".
+ (backtrace_command): Remove "fulltrace", add "flags".
+
2018-03-26 Tom Tromey <tom@tromey.com>
* stack.c (backtrace_command): Rewrite command line parsing.
frames. */
static void
-backtrace_command_1 (const char *count_exp, int show_locals, int no_filters,
- int from_tty)
+backtrace_command_1 (const char *count_exp, frame_filter_flags flags,
+ int no_filters, int from_tty)
{
struct frame_info *fi;
int count;
if (! no_filters)
{
- frame_filter_flags flags = PRINT_LEVEL | PRINT_FRAME_INFO | PRINT_ARGS;
enum ext_lang_frame_args arg_type;
- if (show_locals)
- flags |= PRINT_LOCALS;
+ flags |= PRINT_LEVEL | PRINT_FRAME_INFO | PRINT_ARGS;
if (from_tty)
flags |= PRINT_MORE_FRAMES;
the frame->prev field gets set to NULL in that case). */
print_frame_info (fi, 1, LOCATION, 1, 0);
- if (show_locals)
+ if ((flags & PRINT_LOCALS) != 0)
{
struct frame_id frame_id = get_frame_id (fi);
static void
backtrace_command (const char *arg, int from_tty)
{
- bool fulltrace = false;
bool filters = true;
+ frame_filter_flags flags = 0;
if (arg)
{
if (subset_compare (this_arg.c_str (), "no-filters"))
filters = false;
else if (subset_compare (this_arg.c_str (), "full"))
- fulltrace = true;
+ flags |= PRINT_LOCALS;
else
{
/* Not a recognized argument, so stop. */
arg = NULL;
}
- backtrace_command_1 (arg, fulltrace /* show_locals */,
- !filters /* no frame-filters */, from_tty);
+ backtrace_command_1 (arg, flags, !filters /* no frame-filters */, from_tty);
}
/* Iterate over the local variables of a block B, calling CB with