This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 2/5] More uses of ui_out_emit_tuple
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Tue, 18 Apr 2017 19:42:52 +0100
- Subject: Re: [RFA 2/5] More uses of ui_out_emit_tuple
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E0EEF65CE2
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E0EEF65CE2
- References: <20170414022337.28368-1-tom@tromey.com> <20170414022337.28368-3-tom@tromey.com>
On 04/14/2017 03:23 AM, Tom Tromey wrote:
> - do_cleanups (old_chain);
> + uiout->field_stream ("value", stb);
> + }
>
> annotate_arg_end ();
Looks like the reason that this needed a new scope was
this annotate_arg_end call.
How about instead adding something like this:
struct annotate_arg_emitter
{
annotate_arg_emitter () { annotate_arg_begin (); }
~annotate_arg_emitter () { annotate_arg_end (); }
};
and using it in the function alongside the tuple emitter, like:
annotate_arg_emitter annotate_arg;
ui_out_emit_tuple tuple_emitter (uiout, NULL);
Thanks,
Pedro Alves