This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [7/9] simplify pending breakpoints
> From: Vladimir Prus <vladimir@codesourcery.com>
> 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 <vladimir@codesourcery.com>
> > > 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.