This is the mail archive of the gdb-patches@sourceware.org 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] replay bookmarks


>>>>> "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


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