From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12960 invoked by alias); 8 Sep 2007 12:25:58 -0000 Received: (qmail 12947 invoked by uid 22791); 8 Sep 2007 12:25:57 -0000 X-Spam-Check-By: sourceware.org Received: from heller.inter.net.il (HELO heller.inter.net.il) (213.8.233.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 08 Sep 2007 12:25:52 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-141-251.inter.net.il [80.230.141.251]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id DOM46198 (AUTH halo1); Sat, 8 Sep 2007 15:25:47 +0300 (IDT) Date: Sat, 08 Sep 2007 12:25:00 -0000 Message-Id: From: Eli Zaretskii To: Vladimir Prus CC: gdb-patches@sources.redhat.com In-reply-to: <200709081543.45598.vladimir@codesourcery.com> (message from Vladimir Prus on Sat, 8 Sep 2007 15:43:45 +0400) Subject: Re: [7/9] simplify pending breakpoints Reply-to: Eli Zaretskii References: <200709080150.05068.vladimir@codesourcery.com> <200709081543.45598.vladimir@codesourcery.com> X-IsSubscribed: yes 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: 2007-09/txt/msg00117.txt.bz2 > From: Vladimir Prus > Date: Sat, 8 Sep 2007 15:43:45 +0400 > Cc: gdb-patches@sources.redhat.com > > On Saturday 08 September 2007 15:26:36 Eli Zaretskii wrote: > > > From: Vladimir Prus > > > Date: Sat, 8 Sep 2007 01:50:04 +0400 > > > > > > @@ -5422,12 +5355,9 @@ break_command_1 (char *arg, int flag, in > > > } > > > else > > > { > > > - struct symtab_and_line sal; > > > + struct symtab_and_line sal = {}; > > > > Is this a valid initializer in ISO C? I think it isn't; at least > > under -pedantic, GCC says: > > > > ttt.c: In function `foo': > > ttt.c:6: warning: ISO C forbids empty initializer braces > > Ehm. Then do I have to resort to 'memset' to initialize it? Yes, something like that. > > > - breakpoints_changed (); > > > + /* We surely don't want to warn about the same breakpoint > > > + 10 times. > > > > Why not? They are different breakpoints. > > What are "they"? The several locations for the same breakpoint. This is what we are talking about here, right? Sorry if I again misunderstood the code. > Say you've set a breakpoint. The you've changed the > program and restarted it, so that breakpoint is not longer valid. > I do expect an error to be printed, but I don't expect that error > to be printed each time a new shared library is loaded. I thought you were talking printing the warning for each of the several locations of the same breakpoint. In that case, only some of them could be affected by a library load.