From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11888 invoked by alias); 17 Mar 2006 11:40:07 -0000 Received: (qmail 11877 invoked by uid 22791); 17 Mar 2006 11:40:06 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 17 Mar 2006 11:40:04 +0000 Received: from HOME-C4E4A596F7 (IGLD-84-228-141-3.inter.net.il [84.228.141.3]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id DTR12871 (AUTH halo1); Fri, 17 Mar 2006 13:40:01 +0200 (IST) Date: Fri, 17 Mar 2006 11:42:00 -0000 Message-Id: From: Eli Zaretskii To: Nick Roberts , Vladimir Prus CC: gdb@sources.redhat.com In-reply-to: <20060316231215.GA25222@nevyn.them.org> (message from Daniel Jacobowitz on Thu, 16 Mar 2006 18:12:15 -0500) Subject: Re: MI: changing breakpoint location Reply-to: Eli Zaretskii References: <17433.61359.500131.182453@kahikatea.snap.net.nz> <20060316231215.GA25222@nevyn.them.org> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00121.txt.bz2 > Date: Thu, 16 Mar 2006 18:12:15 -0500 > From: Daniel Jacobowitz > Cc: Vladimir Prus , gdb@sources.redhat.com > > On Fri, Mar 17, 2006 at 12:07:27PM +1300, Nick Roberts wrote: > > > Now, I have to delete the old breakpoint and create the new one, which is > > > workable, but not convenient. > > > > I don't find a problem with that, but it would be nice if when a program is > > edited and recompiled that GDB could track the line number. So, for example > > if the breakpoint is on line 10, say, and lines 4 and 5 are deleted, then > > after recompiling and restarting, its on line 8. I think Visual Stuio has > > this feature. I have no idea how easy/hard it would be to implement. > > Hard. RMS once asked for a simpler version of this, which is to track > breakpoints by line number relative to the start of the function; but > really we ought to be able to do this very well. If we have a volunteer, the fact that it's hard is not very relevant ;-) > I'm thinking something like "remember a couple lines of context, if you > can find the same context, adjust the breakpoint and warn the user". > But there's some risk of it landing in the wrong place; I don't know > how to do it reliably but I bet a motivated developer would come up > with something :-) At least the front end could help here, since this happens when sources are edited.