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


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

but I suspect that would require a major overhaul of the command
parser.

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.

        --jtc

-- 
J.T. Conklin
RedBack Networks

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