From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4059 invoked by alias); 7 Feb 2006 01:15:13 -0000 Received: (qmail 4009 invoked by uid 22791); 7 Feb 2006 01:15:12 -0000 X-Spam-Check-By: sourceware.org Received: from eastrmmtao03.cox.net (HELO eastrmmtao03.cox.net) (68.230.240.36) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 07 Feb 2006 01:15:09 +0000 Received: from localhost.localdomain ([68.9.66.48]) by eastrmmtao03.cox.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20060207011512.OJCA29285.eastrmmtao03.cox.net@localhost.localdomain>; Mon, 6 Feb 2006 20:15:12 -0500 Received: from bob by localhost.localdomain with local (Exim 4.52) id 1F6HSb-0004rh-5X; Mon, 06 Feb 2006 20:16:01 -0500 Date: Tue, 07 Feb 2006 01:15:00 -0000 From: Bob Rossi To: Markus Schiltknecht , gdb-patches@sourceware.org Subject: Re: minimalistic MI catch support Message-ID: <20060207011600.GA18296@brasko.net> References: <1138453464.15400.9.camel@localhost.localdomain> <20060206232913.GD29510@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060206232913.GD29510@nevyn.them.org> User-Agent: Mutt/1.5.9i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00144.txt.bz2 On Mon, Feb 06, 2006 at 06:29:13PM -0500, Daniel Jacobowitz wrote: > On Sat, Jan 28, 2006 at 02:04:24PM +0100, Markus Schiltknecht wrote: > > Hello gdb hackers, > > > > working on an automated debugging layer on top of gdb I figured the > > catchpoint functions in the MI interface is missing. The attached patch > > against current CVS at least makes gdb report a catchpoint-break via MI. > > This is already sufficient for my application. However, I would > > appreciate a complete catchpoint implementation for the MI interface. I > > haven't figured out how to implement the '-break-catch' command. If > > somebody more knowledgable could do that I'd be thankfull. > > > > Please CC me in responses, as I'm not subscribed. > > For the patch, in general it's better to avoid ui_out_is_mi_like_p when > we can. Because the text outputs are ignored in non-MI mode, this is > usually pretty easy; see the attached. Daniel, could you please explain the above in more detail. In particular, this patch adds specific functionality when in MI mode. Why do we care about how it acts in non-MI mode? Just curious. > This changes from: > > *stopped,thread-id="0",frame={addr="0x00002aaaaaeb6462",func="fork",args=[],from="/lib/libc.so.6"} > > to: > > *stopped,reason="breakpoint-hit",bkptno="1",forked-process="6570",thread-id="0",frame={addr="0x00002aaaaaeb6462",func="fork",args=[],from="/lib/libc.so.6"} > > You used fork and vfork for the reasons; I'm not sure whether these > should have separate reasons or be marked as catchpoint-hit. Bob, > Nick, any opinions on that? Defiantly this reason is better than the original patch. I think it would be best if we added a new enumeration called EXEC_ASYNC_CATCHPOINT_HIT, and returned that as the reason. In the future, we could easily return the kind of catchpoint that was caught. For instance, *stopped,reason="catchpoint-hit",catchpoint-kind="vfork",bkptno="1",forked-process="6570",thread-id="0",frame={addr="0x00002aaaaaeb6462",func="fork",args=[],from="/lib/libc.so.6"} Finally, it irks me that all of the bp_catch_* commands are not being implemented in this patch. I see these enumeration values: bp_catch_load, bp_catch_unload, bp_catch_fork, bp_catch_vfork, bp_catch_exec, bp_catch_catch, bp_catch_throw I would really like to see a patch that supports all of these cases, or none. It's just confusing to FE's to have 2/7'ths of the case's implemented. If no one has time to do this, I will. I certainly am running thin though. Thanks, Bob Rossi