This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] replay bookmarks
- From: Tom Tromey <tromey at redhat dot com>
- To: Michael Snyder <msnyder at vmware dot com>
- Cc: Eli Zaretskii <eliz at gnu dot org>, "gdb-patches\ at sourceware dot org" <gdb-patches at sourceware dot org>, "glaw\ at undo-software dot com" <glaw at undo-software dot com>, "jakob\ at virtutech dot com" <jakob at virtutech dot com>, "teawater\ at gmail dot com" <teawater at gmail dot com>
- Date: Mon, 09 Nov 2009 10:55:13 -0700
- Subject: Re: [RFA] replay bookmarks
- References: <4AEDF9F4.9040207@vmware.com> <834opec530.fsf@gnu.org> <4AEE27E9.1070005@vmware.com>
- Reply-to: tromey at redhat dot com
>>>>> "Michael" == Michael Snyder <msnyder@vmware.com> writes:
Michael> How about this?
Michael> +struct bookmark *bookmark_chain;
Michael> +int bookmark_count;
These should be static.
Michael> +static int
Michael> +delete_one_bookmark (struct bookmark *b)
Michael> +{
[...]
Michael> + /* Find bookmark preceeding "marked" one, so we can unlink. */
Michael> + /* FIXME what about end cases (first and last)? */
We're trying to avoid new FIXMEs.
I think instead of using ALL_BOOKMARKS this code would be simpler and
more obviously correct if it just had an explicit loop. There's no need
to have a special case for the first element of the list, either. E.g.,
see the deletion code in cli-decode.c:delete_cmd.
Tom