This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: -var-update using formatted value
> > > I was suggesting:
> > >
> > > (gdb) print 0b1101
> > > $1 = 13
> >
> > I guess the change below to c-exp.y does that, at least for C. But AFAIK
> > 0b is not a recognised prefix for C.
>
> > the change below to printcmd.c does this. This seems to be consistent with
> > existing usage, e.g. in Modula-2 hexadecimals are input like 0FFH but
> > output in a lanuage independent way as 0xff.
>
> Thanks. This is exactly what I meant. If you have time, could you
> post this to gdb-patches along with news/manual/testsuite bits? If
> not, I'll do it (but no promises when I'll get to it).
Both changes, i.e., printcmd.c and c-exp.y?
Presumably if the change to c-exp.y is committed, there should be similar
changes to ada-exp.y, f-exp.y etc. Does it not matter that this prefix
is not part of the underlying language?
Also, I think only the change to printcmd.c is necessary to solve Marcs bug
report about -var-update.
--
Nick http://www.inet.net.nz/~nickrob