From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12469 invoked by alias); 10 Sep 2012 14:09:57 -0000 Received: (qmail 12455 invoked by uid 22791); 10 Sep 2012 14:09:56 -0000 X-SWARE-Spam-Status: No, hits=-7.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,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; Mon, 10 Sep 2012 14:09:39 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8AE9aUo026299 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 10 Sep 2012 10:09:36 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q8AE9Yfx001452; Mon, 10 Sep 2012 10:09:34 -0400 Message-ID: <504DF49D.7070700@redhat.com> Date: Mon, 10 Sep 2012 14:09:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 MIME-Version: 1.0 To: Marc Khouzam CC: "'Mircea Gherzan'" , "'gdb-patches@sourceware.org'" , "'mgherzan@gmail.com'" Subject: Re: [PATCH] Add the -catch-load and -catch-unload MI commands. References: <1346320317-1599-1-git-send-email-mircea.gherzan@intel.com> <503FA714.4020206@intel.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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/msg00109.txt.bz2 On 08/30/2012 06:52 PM, Marc Khouzam wrote: > >> -----Original Message----- >> From: Mircea Gherzan [mailto:mircea.gherzan@intel.com] >> Sent: Thursday, August 30, 2012 1:47 PM >> To: Marc Khouzam >> Cc: 'gdb-patches@sourceware.org'; 'mgherzan@gmail.com' >> Subject: Re: [PATCH] Add the -catch-load and -catch-unload MI >> commands. >> >> On 30.08.2012 16:43, Marc Khouzam wrote: >>> >>>> -----Original Message----- >>>> From: gdb-patches-owner@sourceware.org >>>> [mailto:gdb-patches-owner@sourceware.org] On Behalf Of >> Mircea Gherzan >>>> Sent: Thursday, August 30, 2012 5:52 AM >>>> To: gdb-patches@sourceware.org >>>> Cc: mgherzan@gmail.com; Mircea Gherzan >>>> Subject: [PATCH] Add the -catch-load and -catch-unload MI commands. >>>> >>>> They are equivalent to "catch load" and "catch unload" from CLI. >>>> >>>> Rationale: GUIs might be interested in catching solib load or >>>> unload events. >>> >>> I think this can be done with: >>> -gdb-set stop-on-solib-events 1 >>> >>> although I don't believe there is support for regex as >>> "catch load [regex]". Yeah, and with catch load, gdb doesn't need to stop at each and every internal libc solib event, even if nothing seemingly interesting (in the user's perspective) happened. >> >> It's precisely this kind of support that I'm aiming at. >> >>> That being said, it may be better to have an MI command to >> perform the >>> "catch" command intead of specifically "catch load". >>> For example, in Eclipse, we use "catch catch", "catch throw", >>> "catch exec", "catch fork", "catch vfork", "catch syscall". >> >> Please, can you propose a format for such a command family? I >> see it like: >> >> -catch --load [params] >> -catch --unload [params] > > The GDB experts would know better, but I'm thinking of something > like: > > -break-catch [regexp] I don't this would be a good idea compared to separate commands. Each of those catch variants takes different parameters/options. I'm not seeing what putting them all under the same roof would buy. In the CLI, although "catch exec", "catch fork", "catch syscall", etc. have the same prefix, they're really implemented as separate commands as well. -- Pedro Alves