This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: [breakpoint.c] Does ``break overloaded if x'' leak memory?
- To: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Subject: Re: [breakpoint.c] Does ``break overloaded if x'' leak memory?
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 29 Dec 1999 20:06:03 +1100
- Organization: Cygnus Solutions
- References: <385601E8.FB7BDE66@cygnus.com> <3856403B.4F8CE484@cygnus.com>
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