From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15005 invoked by alias); 9 Feb 2006 06:28:44 -0000 Received: (qmail 14996 invoked by uid 22791); 9 Feb 2006 06:28:44 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 09 Feb 2006 06:28:42 +0000 Received: from kahikatea.snap.net.nz (p202-124-115-227.snap.net.nz [202.124.115.227]) by viper.snap.net.nz (Postfix) with ESMTP id BAD0874557E; Thu, 9 Feb 2006 19:28:37 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id D46648890; Thu, 9 Feb 2006 19:26:38 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17386.57501.980555.996896@kahikatea.snap.net.nz> Date: Thu, 09 Feb 2006 06:28:00 -0000 To: gdb-patches@sourceware.org Cc: Daniel Jacobowitz , Markus Schiltknecht , Bob Rossi Subject: Re: minimalistic MI catch support 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/msg00201.txt.bz2 [I srewed up the header first time, hopefully not this time, apologies if you get two copies. I'm not subscribed to gdb-patches and would like to be cc'ed in any threads on MI, if possible.] I've not used catchpoints, so I just have a couple of minor observations. > case bp_catch_vfork: > annotate_catchpoint (bs->breakpoint_at->number); > - printf_filtered (_("\nCatchpoint %d (vforked process %d), "), > - bs->breakpoint_at->number, > - bs->breakpoint_at->forked_inferior_pid); > + ui_out_text (uiout, "\nCatchpoint "); > + if (ui_out_is_mi_like_p (uiout)) > + ui_out_field_string (uiout, "reason", > + async_reason_lookup (EXEC_ASYNC_BREAKPOINT_HIT)); > + ui_out_field_int (uiout, "bkptno", bs->breakpoint_at->number); > + ui_out_text (uiout, " (vforked process "); > + ui_out_field_int (uiout, "vforked-process", > + bs->breakpoint_at->forked_inferior_pid); I realise that this method of combining CLI and MI output is already used in breakpoint.c but presumably it has the unfortunate side effect of not translating some CLI output intended for the user. For example "breakpoint" and "catchpoint may be translated in some places but not others. The manual says: `exec' A call to `exec'. This is currently only available for HP-UX. `fork' A call to `fork'. This is currently only available for HP-UX. `vfork' A call to `vfork'. This is currently only available for HP-UX. Is that still true? I can certainly set catchpoints for these with GNU/Linux. > > *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"} > I like this. With reason="breakpoint-hit" it's nature (catch vfork) can be deduced from bkptno="1" and -break-list or just "-break-info 1" but I guess there's no harm in redundant information. Nick http://www.inet.net.nz/~nickrob