This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 28/31] Use ui_file_as_string throughout more
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 23 Feb 2017 10:53:42 +0000
- Subject: Re: [PATCH v2 28/31] Use ui_file_as_string throughout more
- Authentication-results: sourceware.org; auth=none
- References: <1476839539-8374-1-git-send-email-palves@redhat.com> <1476968896-13600-1-git-send-email-palves@redhat.com> <86r32pb40h.fsf@gmail.com>
On 02/23/2017 10:22 AM, Yao Qi wrote:
>>
>> /* Value of this item. */
>> struct value *value;
>> @@ -67,6 +67,6 @@ struct varobj_iter_ops
>> if ((ITER) != NULL) \
>> { \
>> (ITER)->ops->dtor (ITER); \
>> - xfree (ITER); \
>> + delete (ITER); \
>
> We don't need to use "delete" for varobj_iter, because you didn't add
> std::string member in varobj_iter. This change causes an ASAN error,
Whoops.
> reverting the change above fixes the error. We can also C++-fy
> varobj_iter, but I'd like to do in another patch. How is the patch below?
LGTM.
Thanks,
Pedro Alves