This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 23/23] Use gdb_argv_up in Python
- From: Tom Tromey <tom at tromey dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Wed, 19 Jul 2017 16:26:04 -0600
- Subject: Re: [RFA 23/23] Use gdb_argv_up in Python
- Authentication-results: sourceware.org; auth=none
- References: <20170503224626.2818-1-tom@tromey.com> <20170503224626.2818-24-tom@tromey.com> <32dc20d7-52ef-1599-d1fa-1ec299fe291c@redhat.com>
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>> if (self->enumeration[i] == NULL)
Pedro> I think you need to adjust the if too:
Pedro> if (enumeration[i] == NULL)
Thanks, I made this fix.
>> + self->enumeration = const_cast<const char**> (enumeration.release ());
Pedro> If I'm reading the code correctly, "self->enumeration" is never
Pedro> released (by design), right?
Yes. I think it could be destroyed if the command is deleted, but I
can't remember now if that can happen; and anyway if it can it must be a
weird thing to do.
Tom