More uses of ui_out_emit_tuple

This patch adds a few more uses of ui_out_emit_tuple.  In these cases
a slightly more complicated change was needed.  This also adds
annotate_arg_emitter, for use in stack.c, to avoid having to introduce
a new scope and reindent the code for a single call.

ChangeLog
2017-04-22  Tom Tromey  <tom@tromey.com>

	* stack.c (print_frame_arg): Use ui_out_emit_tuple,
	annotate_arg_emitter.
	* breakpoint.c (print_mention_watchpoint)
	(print_mention_masked_watchpoint): Use ui_out_emit_tuple.
	* annotate.h (struct annotate_arg_emitter): New.
This commit is contained in:
Tom Tromey 2017-04-12 16:10:02 -06:00
parent 2e78302469
commit 46b9c12945
4 changed files with 32 additions and 20 deletions

View file

@ -74,6 +74,17 @@ extern void annotate_arg_name_end (void);
extern void annotate_arg_value (struct type *);
extern void annotate_arg_end (void);
/* Wrap calls to annotate_arg_begin and annotate_arg_end in an RAII
class. */
struct annotate_arg_emitter
{
annotate_arg_emitter () { annotate_arg_begin (); }
~annotate_arg_emitter () { annotate_arg_end (); }
annotate_arg_emitter (const annotate_arg_emitter &) = delete;
annotate_arg_emitter &operator= (const annotate_arg_emitter &) = delete;
};
extern void annotate_source (char *, int, int, int,
struct gdbarch *, CORE_ADDR);