Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Language of registers
Date: Mon, 27 Nov 2006 14:03:00 -0000	[thread overview]
Message-ID: <20061127140344.GA32528@nevyn.them.org> (raw)
In-Reply-To: <200611251421.43173.vladimir@codesourcery.com>

On Sat, Nov 25, 2006 at 02:21:43PM +0300, Vladimir Prus wrote:
> 
> At the moment, MI varobj assume that register values have a language. As 
> result, if you try to look at values of $xmm1 in a C++ program, you'll find 
> that this registers has a 'public' field -- which is not reasonable.

I'm unsure.  Maybe it's actually right the way it is?  All of GDB's
other forms of output adjust with the current language.  For instance,
in the CLI:

(gdb) set lang ada
(gdb) p $xmm1
$4 = (v4_float => (0 => 0.0, 0.0, 0.0, 0.0), v2_double => (0 => 0.0, 
    0.0), v16_int8 => (0 => 0 <repeats 16 times>), v8_int16 => (0 => 
    0, 0, 0, 0, 0, 0, 0, 0), v4_int32 => (0 => 0, 0, 0, 0), 
  v2_int64 => (0 => 0, 0), 
  uint128 => 0x00000000000000000000000000000000)
(gdb) ptype $xmm1
type = record (?) is
    case ? is
        when ? =>
            v4_float: array (0 .. 3) of float;
        when ? =>
            v2_double: array (0 .. 1) of double;
        when ? =>
            v16_int8: array (0 .. 15) of int8_t;
        when ? =>
            v8_int16: array (0 .. 7) of int16_t;
        when ? =>
            v4_int32: array (0 .. 3) of int32_t;
        when ? =>
            v2_int64: array (0 .. 1) of int64_t;
        when ? =>
            uint128: int128_t;
    end case;
end record

And that might be more comfortable for an Ada programmer.

I'd suggest that we don't need the fake "public" child for things of
struct/union (as opposed to class) type that are 100% public.  We can't
reliably detect struct vs class because debug info is often lacking the
distinction, but union is easy.  I don't know if this might break some
MI frontend though.  But the "public" child isn't even documented.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-11-27 14:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-25 11:22 Vladimir Prus
2006-11-27 14:03 ` Daniel Jacobowitz [this message]
2006-11-28 17:12   ` Vladimir Prus
2006-11-28 17:23     ` Daniel Jacobowitz
2006-11-28 18:09       ` Vladimir Prus
2006-12-01 14:32         ` Daniel Jacobowitz
2006-12-01 18:03           ` Jim Ingham
2006-11-29 10:12   ` Vladimir Prus
2006-11-27  0:43 Nick Roberts
2006-11-27  6:32 ` Vladimir Prus
2006-11-27  7:37   ` Eli Zaretskii
2006-12-06 21:54 Nick Roberts
2006-12-06 22:03 ` Daniel Jacobowitz
2006-12-06 22:55   ` Nick Roberts
2006-12-06 23:10     ` Daniel Jacobowitz

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=20061127140344.GA32528@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=vladimir@codesourcery.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