This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: The 'x' command: size problem
On Tue, Sep 06, 2005 at 10:16:56PM +0300, Eli Zaretskii wrote:
> > Date: Tue, 6 Sep 2005 11:24:48 -0400
> > From: Daniel Jacobowitz <drow@false.org>
> > Cc: gdb@sources.redhat.com
> >
> > On Tue, Sep 06, 2005 at 07:00:28PM +0400, Vladimir Prus wrote:
> > > works. In fact, the x_command function in printcmd.c expects the the size
> > > argument be always given as literal.
> > >
> > > This limitation makes it somewhat harder to implement "show this
> > > variable/expression in binary" command in a GUI. Are there any easy
> > > workarounds?
> >
> > Not as far as I know.
>
> Is that a bug, and if so, should we fix it ASAP?
Personally, I don't think it's a bug.
It can't unambiguously accept x/sizeof(i), because of x/s. I suppose
we could allow convenience variables here, but I don't think the
benefit is substantial. For a frontend, it shouldn't be hard to find
the right size as a literal. For a user, ditto.
--
Daniel Jacobowitz
CodeSourcery, LLC