This is the mail archive of the gdb-patches@sources.redhat.com 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:cli] Delete one of the two ``struct cmd_list_element''s


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


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