From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1915 invoked by alias); 2 Jun 2008 16:06:47 -0000 Received: (qmail 1899 invoked by uid 22791); 2 Jun 2008 16:06:47 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 02 Jun 2008 16:06:21 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1K3CY4-0001AX-FZ for gdb-patches@sources.redhat.com; Mon, 02 Jun 2008 16:06:16 +0000 Received: from entropy.qnx.com ([209.226.137.107]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Jun 2008 16:06:16 +0000 Received: from aristovski by entropy.qnx.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Jun 2008 16:06:16 +0000 To: gdb-patches@sources.redhat.com From: Aleksandar Ristovski Subject: Re: [patch/MI] Implementation for break-catch command Date: Mon, 02 Jun 2008 16:06:00 -0000 Message-ID: <48441A6F.8020607@qnx.com> References: <483EC03B.4070608@qnx.com> <483EC244.4080404@qnx.com> <200805312006.11811.vladimir@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Eli Zaretskii User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) In-Reply-To: <200805312006.11811.vladimir@codesourcery.com> X-IsSubscribed: yes 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: 2008-06/txt/msg00007.txt.bz2 Vladimir Prus wrote: > On Thursday 29 May 2008 18:48:36 Aleksandar Ristovski wrote: >> Index: gdb/breakpoint.c > > First of all, I would like a some testcases to be added with this patch. > > I have some questions about behaviour, too: > > 1. -break-catch throw > ^done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y", > addr="0xb7ef6e05",what="exception throw",times="0", > original-location="__cxa_throw"} > (gdb) > > The way this breakpoint is printed seems not sufficiently precise. Suppose > such a breakpoint was added via CLI. GUI would like to detect this, and > add a breakpoint to the breakpoint list as "catch" breakpoint. How can we > detect it is a catch breakpoint? The "what" field appears to be of a fairly > ad-hoc use in MI. A few questions: This is the output from -break-list: ^done,BreakpointTable={nr_rows="3",nr_cols="6",hdr=[ {width="7",alignment="-1",col_name="number",colhdr="Num"}, {width="14",alignment="-1",col_name="type",colhdr="Type"}, {width="4",alignment="-1",col_name="disp",colhdr="Disp"}, {width="3",alignment="-1",col_name="enabled",colhdr="Enb"}, {width="10",alignment="-1",col_name="addr",colhdr="Address"}, {width="40",alignment="2",col_name="what",colhdr="What"}], body=[bkpt= {number="1",type="breakpoint",disp="keep",enabled="y",addr="0x080488c4",func="main",file="/tmp/catch.cc",fullname="/tmp/catch.cc",line="9",times="0",original-location="main"}, ... The fields listed in the header do not match the body. Should they? What is the point of the header if rows can have just any field? > Should the type of breakpoint be actually 'exception-throw'? > I agree, 'breakpoint' is not precise. I think the type should be "catch " + event name, e.g. "catch catch", "catch throw" "catch signal" to keep terminology consistent (there are "catch load" "catch unload"...). Reason field (for stopped message) - I would suggest simply specifying the type again instead of introducing a new string, e.g. '*stopped,reason="catch catch"'. Thanks, Aleksandar