From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19547 invoked by alias); 17 Mar 2006 10:46:16 -0000 Received: (qmail 19538 invoked by uid 22791); 17 Mar 2006 10:46:16 -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; Fri, 17 Mar 2006 10:46:14 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FKCT8-00080a-Nw for gdb@sources.redhat.com; Fri, 17 Mar 2006 11:46:07 +0100 Received: from zigzag.lvk.cs.msu.su ([158.250.17.23]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Mar 2006 11:46:06 +0100 Received: from ghost by zigzag.lvk.cs.msu.su with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Mar 2006 11:46:06 +0100 To: gdb@sources.redhat.com From: Vladimir Prus Subject: Re: MI: changing breakpoint location Date: Fri, 17 Mar 2006 10:55:00 -0000 Message-ID: References: <17433.61359.500131.182453@kahikatea.snap.net.nz> <20060316231215.GA25222@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.8.2 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/msg00116.txt.bz2 Daniel Jacobowitz wrote: > 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 :-) > > Of course, then we'd have to let the MI interpreter know about the > change too, so that the editor could refresh. I have no idea whether > GUIs would want this behavior or not; wouldn't they want to track it > themselves assuming you used the GUI's editor? I think that automatic moving of breakpoints is better done in GUI. GUI has more data, including specific set of editing operations, and it has more feedback mechanisms, it can even show dialog box "This breakpoint was moved, if that OK?", after all. GDB, on the other hand, can only guess right breakpoint positions based on analysing the source. And imagine you type in comment right before breakpoint position. This will break all context-based analysis. - Volodya