From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14658 invoked by alias); 1 May 2009 15:48:19 -0000 Received: (qmail 14650 invoked by uid 22791); 1 May 2009 15:48:18 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 May 2009 15:48:13 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id F31332BAC9B; Fri, 1 May 2009 11:48:10 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qYLSTsDOpIUr; Fri, 1 May 2009 11:48:10 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id CACC92BAC96; Fri, 1 May 2009 11:48:09 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id C09D5F58FF; Fri, 1 May 2009 08:47:59 -0700 (PDT) Date: Fri, 01 May 2009 15:48:00 -0000 From: Joel Brobecker To: Jan Kratochvil Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [patch] Fix internal error on breaking at a multi-locations caller Message-ID: <20090501154759.GF10734@adacore.com> References: <20090309220736.GA27259@host0.dyn.jankratochvil.net> <20090428203235.GG31821@adacore.com> <20090501091942.GA8465@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090501091942.GA8465@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.18 (2008-05-17) 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: 2009-05/txt/msg00024.txt.bz2 Hello Jan, I think Tom must be pretty busy right now :), so here is my take on this. > info '(gdb)Set Breaks' > `break' > When called without any arguments, `break' sets a breakpoint at > the next instruction to be executed in the selected stack frame > [...] > > Do you refer here to the "selected stack frame" part of the doc? More importantly: "next instruction"; but yes, the selected stack frame is also important. Based on that, "break" in my opinion should be equivalent to "break *PC" where PC is the current frame's PC. So, I think that the correct way to fix this is to set the "explicit_pc" flag in the sal. That should make sure that expand_line_sal_maybe does not, in fact, do any expansion. I also understand the reason why you think a warning might help, especially since I had a different intuitive perception of what the argument-less command was doing. But I think that such a warning would quickly become more annoying than anything if the user knows precisely the meaning of his command. What do others think? Nonetheless, I think we can treat the two issues separately. We can fix the problem first with a one-liner, and then we can discuss the idea of a warning if you think it might be useful. Does this sound reasonable to you? -- Joel