This is the mail archive of the gdb@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: Why can't I set a local variable named i via the MI?


On Thu, 11 Jul 2002, Mo DeJong wrote:

> # I can set a variable named j.
>
> -gdb-set j=20
> -data-evaluate-expression "j"
> ^done,value="20"
--
> -gdb-set i=100
> &"A parse error in expression, near `100'.\n"
> ^error,msg="A parse error in expression, near `100'."

That's because "-gdb-set i=100" gets translated into "set inputradix=100",
which is not the proper syntax for this command.

Use "-gdb-set variable EXPRESSION" instead. ("-gdb-set ARGS" just does the
CLI equivalent of "set ARGS".)

Keith



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