From d392224a0942df2f23b1149a71f62afc7f34beb8 Mon Sep 17 00:00:00 2001 From: Philippe Waroquiers Date: Thu, 24 May 2018 23:19:05 +0200 Subject: [PATCH] PATCH (obvious): Fix a comment, and pass stream to cb_data. iterate_over_block_arg_vars is a void function, so does not return 1 or 0. print_frame_arg_vars tells it prints on STREAM, so pass STREAM in the cb_data, not gdb_stdout. gdb/ChangeLog 2018-05-24 Philippe Waroquiers * stack.c (iterate_over_block_arg_vars): Fix comment. (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout. --- gdb/ChangeLog | 5 +++++ gdb/stack.c | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 503b34f26a6..6a1aae8523a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-05-24 Philippe Waroquiers + + * stack.c (iterate_over_block_arg_vars): Fix comment. + (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout. + 2018-05-24 Andrew Burgess PR gdb/23203 diff --git a/gdb/stack.c b/gdb/stack.c index 98a21842e77..016ee1d58b1 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -2059,9 +2059,7 @@ info_locals_command (const char *args, int from_tty) 0, gdb_stdout); } -/* Iterate over all the argument variables in block B. - - Returns 1 if any argument was walked; 0 otherwise. */ +/* Iterate over all the argument variables in block B. */ void iterate_over_block_arg_vars (const struct block *b, @@ -2121,7 +2119,7 @@ print_frame_arg_vars (struct frame_info *frame, struct ui_file *stream) cb_data.frame_id = get_frame_id (frame); cb_data.num_tabs = 0; - cb_data.stream = gdb_stdout; + cb_data.stream = stream; cb_data.values_printed = 0; iterate_over_block_arg_vars (SYMBOL_BLOCK_VALUE (func), -- 2.30.2