From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26738 invoked by alias); 23 Oct 2013 17:04:17 -0000 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 Received: (qmail 26725 invoked by uid 89); 23 Oct 2013 17:04:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout20.012.net.il Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 Oct 2013 17:04:15 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MV400200SOZHH00@a-mtaout20.012.net.il> for gdb@sourceware.org; Wed, 23 Oct 2013 20:04:13 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MV4002OTSR0D840@a-mtaout20.012.net.il>; Wed, 23 Oct 2013 20:04:13 +0300 (IDT) Date: Wed, 23 Oct 2013 17:04:00 -0000 From: Eli Zaretskii Subject: Re: Expanding macros in breakpoint conditions In-reply-to: <87y55mk0tg.fsf@fleche.redhat.com> To: Tom Tromey Cc: gdb@sourceware.org Reply-to: Eli Zaretskii Message-id: <83k3h3j4vo.fsf@gnu.org> References: <83vc0qk1jx.fsf@gnu.org> <87y55mk0tg.fsf@fleche.redhat.com> X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00114.txt.bz2 > From: Tom Tromey > Cc: gdb@sourceware.org > Date: Mon, 21 Oct 2013 11:09:47 -0600 > > >>>>> "Eli" == Eli Zaretskii writes: > > Eli> So my question is: is GDB supposed to expand macros in breakpoint > Eli> conditions? > > Yes, it should work under the conditions you describe -- namely when the > macro information is available. > > I don't think there are any known macro expansion bugs here, either. Thanks. I took a closer look, and discovered that the problem was different. It started as a cockpit error: instead of typing (gdb) break foo.c:707 I typed (gdb) break foo:707 (i.e., I forgot the .c extension). File foo.c defines a function foo, so what GDB did was put the breakpoint at entry to the function. What I don't understand is why didn't GDB issue an error message in this case. There's no label '707' in that function. Looks like the linespec parser silently rejected the ":707" part, without telling me. It would be nice if it didn't do this silently.