From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27885 invoked by alias); 2 Jun 2008 16:28:58 -0000 Received: (qmail 27875 invoked by uid 22791); 2 Jun 2008 16:28:58 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 02 Jun 2008 16:28:29 +0000 Received: (qmail 16933 invoked from network); 2 Jun 2008 16:28:28 -0000 Received: from unknown (HELO localhost) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 2 Jun 2008 16:28:28 -0000 From: Vladimir Prus To: Aleksandar Ristovski , gdb-patches@sources.redhat.com Subject: Re: [patch/MI] Implementation for break-catch command Date: Mon, 02 Jun 2008 16:28:00 -0000 User-Agent: KMail/1.9.9 References: <200805312006.11811.vladimir@codesourcery.com> <48441A6F.8020607@qnx.com> In-Reply-To: <48441A6F.8020607@qnx.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200806022028.21912.vladimir@codesourcery.com> 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/msg00009.txt.bz2 On Monday 02 June 2008 20:06:07 you wrote: > 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. Well :-) > Should they? Not really. Given that no frontend now is broken due to the fact that they don't match, not need to fix anything. > What is the point of the header if rows can have just any field? It's historical baggage. This 'table' thing, to the best of my knowledge, is used only for breakpoints, and makes no sense -- clearly, no frontend is going to dynamically adjust the columns of its breakpoint table according to gdb responses :-) > > 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"...). I agree. > > 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"'. Seems OK to me. - Volodya