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' [Repost]
- To: Kevin Buettner <kevinb at cygnus dot com>
- Subject: Re: [RFA] deleting breakpoints inside of 'commands' [Repost]
- From: Fernando Nasser <fnasser at redhat dot com>
- Date: Wed, 19 Sep 2001 16:53:01 -0400
- CC: Don Howard <dhoward at redhat dot com>, Andrew Cagney <ac131313 at cygnus dot com>, gdb-patches at sources dot redhat dot com, Fernando Nasser <fnasser at cygnus dot com>, Michael Snyder <msnyder at cygnus dot com>
- Organization: Red Hat Canada
- References: <Pine.LNX.4.33.0109190846200.6246-100000@theotherone> <1010919190753.ZM14865@ocotillo.lan>
Kevin Buettner wrote:
>
> I don't think that reference counting is the right way to go. You'll
> be adding complexity to GDB in the form of making certain parts of GDB
> responsible for updating the reference counts. Also, there's the
> overhead of maintaining the reference counts. I agree that making a
> copy of the commands might be a little bit slower, but it has the
> advantage of being simple which makes it easier to verify correctness.
>
What complexity? The same parts of GDB that allocate/deallocate the
list
(maybe two places?) will to call a slightly different function. The one
that deallocates checks the counter first intead of blindly freeing up
memory. The only addition is a couple of calls where we pick a list of
commands to be executed (one place perhaps) to make sure the fact we are
using it is known.
No need to recursively look for anything, parse anything. No overhead
at
all except for some incr and decr operations.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9