aboutsummaryrefslogtreecommitdiff
path: root/gdb/annotate.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-04-12 16:10:02 -0600
committerTom Tromey <tom@tromey.com>2017-04-22 09:46:59 -0600
commit46b9c12945629fffb61001a8f13a37c96675c0b7 (patch)
tree56cb90f08f7ce3f3ee41c8a7058e57d5be8e1bf3 /gdb/annotate.h
parent2e78302469502f4f8a98144b60c09d4d9b6438fd (diff)
downloadgdb-46b9c12945629fffb61001a8f13a37c96675c0b7.zip
gdb-46b9c12945629fffb61001a8f13a37c96675c0b7.tar.gz
gdb-46b9c12945629fffb61001a8f13a37c96675c0b7.tar.bz2
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.
Diffstat (limited to 'gdb/annotate.h')
-rw-r--r--gdb/annotate.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/annotate.h b/gdb/annotate.h
index a1454a1..7161689 100644
--- a/gdb/annotate.h
+++ b/gdb/annotate.h
@@ -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);