This is the mail archive of the gdb-patches@sources.redhat.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]
Other format: [Raw text]

Re: [RFA] GDB/622 - clear current breakpoint in commands causestrouble


On Thu, 22 Aug 2002, Michael Snyder wrote:

> Joel Brobecker wrote:
> > 
> > ping?
> > 
> > > 2002-07-31  Joel Brobecker  <brobecker@gnat.com>
> > >
> > >         * cli/cli-scripts.c (copy_command_lines): New function.
> > >         (make_cleanup_free_command_lines): Make this function non static.
> > >
> > >         * defs.h (copy_command_lines): Add definition.
> > >         (make_cleanup_free_command_lines): Add definition.
> > >
> > >         * breakpoint.c (bpstat_do_actions): Execute a temporary copy of
> > >         the command-list associated to each breakpoint hit, in order to
> > >         avoid accessing a dangling pointer, in case one of the commands
> > >         in the list causes the breakpoint to be deleted.
> 
> Joel, 
> 
> It looks OK to me, but I'd like to run it by Don Howard, 
> who has looked at this before.  Don, this patch looks a lot
> simpler than the one you submitted (which, I think, died on
> the vine (mea culpa)).  Do you think it will do the job?
> 
> Michael
> 

Yes this patch looks very much like one of my earlier attempts.  Joel's
copy_command_lines() is simpler and catches a few bugs that I noticed in
my implementation.  One question: is it important to use xstrdup() over
plain strdup()?

You already pointed out the cleanup issues.  Once that is corrected, I'd
recomend it.


-- 
dhoward@redhat.com
gdb engineering







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