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

Andrew Cagney ac131313@cygnus.com
Wed Dec 29 01:06:00 GMT 1999


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


More information about the Gdb-patches mailing list