From: Daniel Jacobowitz <drow@false.org>
To: Vladimir Prus <ghost@cs.msu.su>
Cc: gdb@sources.redhat.com
Subject: Re: printing "variable-sized" registers
Date: Mon, 06 Jun 2005 13:56:00 -0000 [thread overview]
Message-ID: <20050606135625.GA27290@nevyn.them.org> (raw)
In-Reply-To: <200506061752.08077.ghost@cs.msu.su>
On Mon, Jun 06, 2005 at 05:52:07PM +0400, Vladimir Prus wrote:
> > The last one. The best you can do the rest of the time is going to be
> > giving them a type containing the maximum number of values and fill in
> > with dummies - maybe also including the count?
>
> This's what I was doing -- assigning "array of 32 uin64s" type to those
> registers and they are printed with "info all-registers", but the dummy
> values do no look nice when presented to the user.
Right. You can correct how they're printed in info registers and info
all-registers by providing your own print_registers_info.
> > If you want "print $reg" to display them nicely, you're going to need
> > to teach GDB's type system about it somehow. I have no idea what that
> > change would look like or how it would work, but it could be generally
> > useful - it's the same concept as prettyprinting a tagged union, I think.
>
> Ok, understood. With the attached patch I get what I want, but I have no idea
> if this patch is good or not.
No, I don't think this is an acceptable way to do it - too inelegant.
I don't know.
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-06-06 13:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-30 15:10 Vladimir Prus
2005-05-30 16:58 ` Daniel Jacobowitz
2005-06-06 13:52 ` Vladimir Prus
2005-06-06 13:56 ` Daniel Jacobowitz [this message]
2005-06-06 14:05 ` 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=20050606135625.GA27290@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sources.redhat.com \
--cc=ghost@cs.msu.su \
/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