This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Why can't I set a local variable named i via the MI?
- From: Keith Seitz <keiths at redhat dot com>
- To: Mo DeJong <supermo at bayarea dot net>
- Cc: gdb <gdb at sources dot redhat dot com>
- Date: Fri, 12 Jul 2002 08:52:20 -0700 (PDT)
- Subject: 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