public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Vladimir Prus <ghost@cs.msu.su>
To: gdb@sources.redhat.com
Subject: Re: The 'x' command: size problem
Date: Wed, 07 Sep 2005 06:40:00 -0000	[thread overview]
Message-ID: <dfm1rr$j9q$1@sea.gmane.org> (raw)
In-Reply-To: <20050906192927.GA10362@nevyn.them.org>

Daniel Jacobowitz wrote:

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

By the same argumentation, it should not be too hard to find the address, so
'x' should accept literal address only, that is:

   x/4 &g

should be disallowed and user will be required to write:

   print &g
   x/4 0xWHATEVER

It's a bit inconsistent that arbitrary expression is allowed to address, but
not for size.

- Volodya

 


  reply	other threads:[~2005-09-07  6:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-06 15:04 Vladimir Prus
2005-09-06 15:25 ` Daniel Jacobowitz
2005-09-06 15:35   ` Vladimir Prus
2005-09-06 15:42     ` Daniel Jacobowitz
2005-09-07  6:55       ` Vladimir Prus
2005-09-07 13:14         ` Daniel Jacobowitz
2005-09-07 13:42           ` Vladimir Prus
2005-09-07 18:02             ` Eli Zaretskii
2005-09-06 19:17   ` Eli Zaretskii
2005-09-06 19:29     ` Daniel Jacobowitz
2005-09-07  6:40       ` Vladimir Prus [this message]
     [not found] ` <17181.45190.337014.159288@gargle.gargle.HOWL>
2005-09-06 15:27   ` Vladimir Prus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='dfm1rr$j9q$1@sea.gmane.org' \
    --to=ghost@cs.msu.su \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).