From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31041 invoked by alias); 28 Sep 2012 19:23:15 -0000 Received: (qmail 31032 invoked by uid 22791); 28 Sep 2012 19:23:15 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 28 Sep 2012 19:23:08 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8SJN5BT011737 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 28 Sep 2012 15:23:05 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q8SJN3D2013808 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 28 Sep 2012 15:23:04 -0400 From: Tom Tromey To: Marc Khouzam Cc: Yao Qi , "gdb-patches\@sourceware.org" Subject: Re: [MI][patch v2] -break-list to specify "thread-group" References: <505DB611.70706@codesourcery.com> Date: Fri, 28 Sep 2012 19:23:00 -0000 In-Reply-To: (Marc Khouzam's message of "Wed, 26 Sep 2012 06:03:44 -0400") Message-ID: <87vceyrlyg.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-09/txt/msg00696.txt.bz2 >>>>> "Marc" == Marc Khouzam writes: Marc> I had forgotten to update the tests to take into consideration the Marc> new parameter. Those tests use -break-list in multiple places. Marc> The new patch below does update the testsuite. Marc> Only one new regression happens: Marc> FAIL: gdb.mi/mi-nsmoribund.exp: thread specific breakpoint at thread_function Marc> This was a latent problem where the unexpected 'thread' field was Marc> being sucked into a '.*' pattern, which hid the error. Because Marc> the problem is in lib/mi-support.exp it is not as simple to fix. Marc> Since the problem is not caused by my patch, I suggest not to fix Marc> it right away. We try not to let any regressions in. So I think it does need to be fixed before this patch can go in. Marc> Finally, one should note that this extra 'thread-group' field will now Marc> appear in multiple command outputs and notifications. Things such as Marc> '-break-list', '-break-insert', '-break-info', '=breakpoint-modified'. Marc> I believe that this all makes sense since a breakpoint is associated with Marc> an inferior and the frontend may want to know that. Totally fine, IMO. Marc> + /* Go through list in reverse order to print inferiors ids in Marc> + increasing order. */ Marc> + for (index = len - 1; index >= 0; index--) It isn't clear to me that it is reliable to assume that the inferior list is sorted. However, this shouldn't really matter for clients, either. Marc> + { Marc> + char mi_group[10]; Marc> + sprintf (mi_group, "i%d", inf_num[index]); Blank line between declarations and code. Marc> + int inf_num[number_of_inferiors ()]; I think you'd have to use alloca here -- but it is better to use a VEC anyway. Tom