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

Re: Deprecating commands; Was: RFC: patch for ...


Andrew Cagney wrote:
> 
> For what its worth,
> 
> Something buried on my to-do / wish list is to extend GDB's command
> mechanism so that the user is advised that a command is deprecated the
> first time they use it:
> 
>         (gdb) othernames xyz
>         warning: Command `othernames' is deprecated, use `set architecture
> abc'.
>         (gdb) othernames zzz
>         (gdb)
> 
> Doing that opens up the possibility of moving GDB's CLI (command line
> interface) forward.  One release would have a poorly chosen command
> deprecated.  A follow on release could see it (ya!) removed.
> 
> I don't think it is reasonable to simply drop a command (no matter what
> the results of a gdb@sourceware straw poll) without some sort of warning
> to the general public.
> 
I agree with Andrew.  He proposed the "deprecated" mechanism some time
ago and it went on our TODO list.  Although I am the maintainer of the
command line interpreter and I agree with this feature, it was not done
because of the major work that we had to do for getting (part of) libgdb
out (and people were claiming for it).

If someone has the time to contribute with a patch we would appreciate. 
If not, as soon as possible we will include this "deprecated" state so
we can have a graceful phasing out of "bad" commands.

Talking about "bad" commands, what can be worse that the "set"
overloading?  It should only work for gdb control switches.  The "set
var" should be name "assign".  But who dares to change this after 15+
years...

-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@cygnus.com
2323 Yonge Street, Suite #300           Tel:  416-482-2661 ext. 311
Toronto, Ontario   M4P 2C9              Fax:  416-482-6299

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