This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] deleting breakpoints inside of 'commands' (again)
- To: Don Howard <dhoward at redhat dot com>
- Subject: Re: [RFA] deleting breakpoints inside of 'commands' (again)
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Tue, 06 Nov 2001 13:30:11 -0500
- Cc: Michael Snyder <msnyder at cygnus dot com>,Fernando Nasser <fnasser at redhat dot com>, gdb-patches at sources dot redhat dot com
- References: <Pine.LNX.4.33.0111061000250.2672-100000@theotherone>
>
> Doesn't the function below catch that? There is a recursive call to
> look for just the problem that you mention. Is there some other way of
> deleting commands that I need to look out for?
I'm not sure.
Consider:
command callee
delete command callee
end
breakpoint foo
commands $bp
callee
end
it will realise that there is a delete but will it protect its self from
a command deleting its self.
> [BTW, I personally think that the unconditional copy is much less
> error prone (and therefore better) even if it's slower. Just my $0.02]
Agreed (And slower is relative - what happens if there are 100's or
1000's of commands - that search becomes the bottle neck.)
Andrew