This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa:cli] Delete one of the two ``struct cmd_list_element''s
- From: Fernando Nasser <fnasser at redhat dot com>
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Mon, 18 Mar 2002 10:42:50 -0500
- Subject: Re: [rfa:cli] Delete one of the two ``struct cmd_list_element''s
- Organization: Red Hat Canada
- References: <3C955A02.8070209@cygnus.com>
Andrew Cagney wrote:
>
> Hello,
>
> This is my fix to the duplicate ``struct cmd_list_element'' definition
> problem (see "command.h" and "cli/cli-decode.h").
>
Thanks.
> It zaps the definition from "command.h". However, it does also
> formalize the status quo:
>
> "command.h": included by any code wanting to create commands.
>
> "cli-decode.h": included by any code implementing command internals.
>
Well, one of these days we have to get rid of command creation inside
libgdb. If a command is desired, someone would add the code
to implement the functionality in libgdb and add the UI parts to
whatever UI he/she wants to make that functionality available from
(like the CLI, the MI etc.). With an exception, of course, of the
set/show commands which would have a UI independent way for registering
changeable variables (is this what you were suggesting?).
In the meanwhile we should get things right for the current
implementation, so your clean-up is more than welcome.
> In addition to the code in the gdb/cli/ directory, a number of gdb/ .c
> files also include cli-decode.h: maint.c, top.c and completer.c.
>
:-(
> Ok to commit? Hmm, if this is ok, the comment at the top of "command.h"
> should be updated.
>
Sure.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9