This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: Deprecating commands; Was: RFC: patch for ...
"J.T. Conklin" wrote:
>
> >>>>> "Fernando" == Fernando Nasser <fnasser@cygnus.com> writes:
> Fernando> Talking about "bad" commands, what can be worse that the
> Fernando> "set" overloading? It should only work for gdb control
> Fernando> switches. The "set var" should be name "assign". But who
> Fernando> dares to change this after 15+ years...
>
> If we were to have a different command for setting variables, I'd pick
> "write" over "assign". However I see this in much the same way as the
> BASIC "LET" keyword --- a useless bit of syntactic sugar. I'd prefer
> being able to set program variables directly:
>
> (gdb) print x
> $1 = 3
> (gdb) x = 4
>
Sure, but on the other hand not having the "set"/"let"/"assign"/"write"
or whatever keyord starts to impose restrictions on variable names. You
end up with a reserved keyword list that is the union of all languages
supported by gdb.
> but I suspect that would require a major overhaul of the command
> parser.
>
Yes, it probably would.
> Another issue is that "set" is used to assign convienence variables
> and GDB's internal variables. I see some merit in actually merging
> these so that scripts can access the values. There are some issues
> that may make it difficult to do. For example, many set commands do
> extra error checking that simply setting a convienence variable would
> not; GBD's scripting language has only a global identifier namespace;
> etc. Nevertheless, I'd love to be able to do this.
>
Good points.
--
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