This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 14/40] fix two buglets in breakpoint.c
- From: Tom Tromey <tromey at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Mon, 13 May 2013 08:58:28 -0600
- Subject: Re: [PATCH 14/40] fix two buglets in breakpoint.c
- References: <cover dot 1368124285 dot git dot tromey at redhat dot com> <9950c2e4c9891c1b716d6c6d32107ddd7e97c5a5 dot 1368124285 dot git dot tromey at redhat dot com> <51905107 dot 5090107 at codesourcery dot com>
>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:
>> @@ -5814,7 +5814,10 @@ output_thread_groups (struct ui_out *uiout,
>> /* For backward compatibility, don't display inferiors in CLI unless
>> there are several. Always display them for MI. */
>> if (!is_mi && mi_only)
>> - return;
>> + {
>> + do_cleanups (back_to);
>> + return;
>> + }
Yao> A nit here, we may call 'make_cleanup_ui_out_list_begin_end' after
Yao> this condition checking, so we don't need 'do_cleanups' here.
That isn't what I see in trunk:
static void
output_thread_groups (struct ui_out *uiout,
const char *field_name,
VEC(int) *inf_num,
int mi_only)
{
struct cleanup *back_to = make_cleanup_ui_out_list_begin_end (uiout,
field_name);
int is_mi = ui_out_is_mi_like_p (uiout);
int inf;
int i;
/* For backward compatibility, don't display inferiors in CLI unless
there are several. Always display them for MI. */
if (!is_mi && mi_only)
return;
That "return" leaves a cleanup dangling.
Tom