This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 4/7] Use ui_out_emit_tuple in disasm.c


On 2017-10-13 12:13 PM, Tom Tromey wrote:
> Tom> It turns out that with gdb::optional, you don't have to untangle it.
> Tom> I'm testing a patch to convert the rest of disasm.c away from cleanups.
> 
> How about this?
> 
> Tom
> 
> commit 1b83351de30ed32808aa8b09d720556d423e57c6
> Author: Tom Tromey <tom@tromey.com>
> Date:   Thu Oct 12 15:07:35 2017 -0600
> 
>     Remove cleanups from disasm.c
>     
>     This changes the remaining spots in disasm.c to use the RAII ui-out
>     emitters, removing a few cleanups.  This also fixes a regression that
>     Simon pointed out.
>     
>     2017-10-12  Tom Tromey  <tom@tromey.com>
>     
>             * disasm.c (do_mixed_source_and_assembly_deprecated): Use
>             gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
>             (do_mixed_source_and_assembly): Likewise.

That looks good to me (though I'm a bit overwhelmed by that code).

The regression I pointed out is fixed, mi-disassemble.exp passes and I manually
tested with the disassembly view of Eclipse, which exercises that code.  So I
think it's safe enough.

Thanks!

Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]