This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [breakpoint.c] Does ``break overloaded if x'' leak memory?


Andrew Cagney wrote:
> 
> Andrew Cagney wrote:
> >
> > Hello,
> >
> > Now that I understand how breapoint.c:break_command_1() can end up with
> > several breakpoints :-) I'm wondering if the code that parses the ``if''
> > condition leaks memory:
> >
> > [....]
> >
> > As far as I can tell the if statement is re-parsed each time round this
> > loop but, unfortunatly, each time, the old result is thrown away :-(.
> > At the end the code ends up with just one expression and that is stored
> > in all the created breakpoints.
> >
> >         Andrew
> >

Just FYI.  I've rewritten/checked in break_command_1() so that it is
broken down into three smaller functions.  This bug was fixed as a side
effect.

If breakpoints act up.  This is the first point to start looking.
The patch details can be seen in the next CVS update.

	Andrew

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]