From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19509 invoked by alias); 20 Jan 2008 10:08:16 -0000 Received: (qmail 19501 invoked by uid 22791); 20 Jan 2008 10:08:14 -0000 X-Spam-Check-By: sourceware.org Received: from zigzag.lvk.cs.msu.su (HELO zigzag.lvk.cs.msu.su) (158.250.17.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 20 Jan 2008 10:07:57 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1JGX5h-00018G-EZ for gdb-patches@sources.redhat.com; Sun, 20 Jan 2008 13:07:54 +0300 Received: from localhost ([127.0.0.1] helo=ip6-localhost) by zigzag.lvk.cs.msu.su with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1JGX5Z-00017u-4x; Sun, 20 Jan 2008 13:07:41 +0300 From: Vladimir Prus To: Nick Roberts Subject: Re: [PATCH] Re: bug in mi when setting breakpoint Date: Sun, 20 Jan 2008 10:08:00 -0000 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) Cc: gdb-patches@sources.redhat.com References: <20071216125625.GE4783@coin> <18322.28514.745522.314492@kahikatea.snap.net.nz> In-Reply-To: <18322.28514.745522.314492@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801201307.44269.ghost@cs.msu.su> 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-01/txt/msg00494.txt.bz2 On Sunday 20 January 2008 00:45:06 Nick Roberts wrote: > > To clarify -- are you suggesting what we should first create breakpoints > > for all overloaded function, and then remove those we don't need, in MI? > > In Emacs, multiple breakpoints are only created when the user specifies the > overloaded function in the GUD buffer (if he clicks on the fringe in an > overloaded function in the source buffer he only gets one breakpoint at the > line on which he clicked). > > If GDB sets all these breakpoints, unwanted ones could then be deleted manually > either by typing "delete BKPTNO" in the GUD buffer, or clicking on individual > breakpoint icons in the fringe of the source buffers. I don't think such solution is entirely satisfactory, for the following reason: 1. UI should not require to type GDB command for such basic task as adding breakpoints. 2. Overloaded functions can be scattered over several source file, so clicking on fringe is highly inconvenient -- the files might not be even open. 3. Assuming we have a list of breakpoints (which Eclipse and KDevelop do), we surely can delete breakpoints there. However, adding unwanted breakpoints right away will not be good in non-stop mode: - Some threads might already stop on unwanted breakpoints before you delete them - You might run out of hardware resources while setting unwanted breakpoints I think it's more clear to set only those breakpoints that user want to set, as opposed to setting all of them, and then removing undesired ones. - Volodya