From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20304 invoked by alias); 18 Apr 2007 10:01:16 -0000 Received: (qmail 20295 invoked by uid 22791); 18 Apr 2007 10:01:15 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 18 Apr 2007 11:01:07 +0100 Received: from farnswood.snap.net.nz (78.62.255.123.dynamic.snap.net.nz [123.255.62.78]) by viper.snap.net.nz (Postfix) with ESMTP id 39A913D9FEC; Wed, 18 Apr 2007 22:01:03 +1200 (NZST) Received: by farnswood.snap.net.nz (Postfix, from userid 500) id 04CBE627ED; Wed, 18 Apr 2007 10:58:50 +0100 (BST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17957.60377.419260.20236@farnswood.snap.net.nz> Date: Wed, 18 Apr 2007 10:01:00 -0000 To: Dodji Seketeli Cc: GDB Discuss Subject: Re: question about -file-exec-and-symbols gdbmi command In-Reply-To: <20070418111206.45c55d72@coin> References: <20070418111206.45c55d72@coin> X-Mailer: VM 7.19 under Emacs 22.0.97.5 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-04/txt/msg00112.txt.bz2 > I am using gdb with the mi2 interpreter. > > I do -file-exec-and-symbols , set a couple of > breakpoints, do a bit of debugging a bit etc. > > Then I do a -file-exec-and-symbols . > At this point, gdb tries to set the breakpoint I have set previously, > while debugging . Of course, that attempt fails. Is this > behavious normal ? I would have thought that gdb should clear the > current breakpoints when -file-exec-and-symbols is run on a new exec > file. -file-exec-and-symbols is really just the `file' command: In mi-cmds.c: { "file-exec-and-symbols", { "file", 1 }, NULL, NULL }, so it's not restricted to MI. I don't really use either but maybe it would be inconvenient to have all the breakpoints cleared, if you wanted to switch to another version of the same program, say. It's easier to delete then all manually, just with `delete' than it is to add them back again. Perhaps it could be a GDB option. -- Nick http://www.inet.net.nz/~nickrob