[RFA 22/23] Make gdb_buildargv return a unique pointer

Tom Tromey tom@tromey.com
Sun Jul 23 17:26:00 GMT 2017


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> I suspect that making gdb_argv_up a class (class gdb_argv) that wraps
Pedro> the array instead of making it a unique pointer may make users a
Pedro> little bit clearer.  I.e., gdb_buildargv would be converted to a
Pedro> ctor, and we'd add e.g., a "count()" and "release()" methods.

I did this.  It does clean things up a bit, particularly since we can
provide begin/end methods and then use foreach to iterate in some cases.

Tom



More information about the Gdb-patches mailing list