public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@redhat.com>
To: frysk@sourceware.org
Subject: -format options
Date: Mon, 27 Aug 2007 15:39:00 -0000	[thread overview]
Message-ID: <46D2F057.7050901@redhat.com> (raw)

Hi,

some questions, and ideas.

What should the -format qualifier do when applied to floating point?  
For instance:
  (fhpd) print 1.0 -format x
  0x1
i.e., convert the cooked value to decimal and then print in hex; or:
  (fhpd) print 1.0 -format x
  0x3ff0000000000000
i.e., print the raw value in hex.  I think the answer depends on the 
next question.

What possible format options are there and how should they interact? 
Here's a possible list:
  bi[t]s, [o]ctal, [d]ecimal, he[x]adecimal, [f]loat, [v]alue (i.e., 
default)
  [r]aw, [c]ooked
  [b]ig-endian, [l]ittle-endian, [n]ative (for default)
  [s]igned, [u]nsigned, [i]nteger (for default???)
  reset: -
are there others?  I've tried to make each set largely orthogonal; does 
this work?  Would other combinations be better?  For signed/unsigned is 
there a better "default" to integer.  Should [o][x][t] just imply unsigned?

How should these options be specified; Either:
    -format rx
or
    -format x -data r -order b
for dumping each field in big-endian raw hex.  I prefer the more terse 
former.

             reply	other threads:[~2007-08-27 15:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-27 15:39 Andrew Cagney [this message]
2007-08-27 15:58 ` Chris Moller
2007-08-27 16:16   ` Andrew Cagney

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=46D2F057.7050901@redhat.com \
    --to=cagney@redhat.com \
    --cc=frysk@sourceware.org \
    /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).