From: Daniel Jacobowitz <drow@mvista.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Michael Snyder <msnyder@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: Patch: printing java `char' values
Date: Wed, 08 May 2002 13:46:00 -0000 [thread overview]
Message-ID: <20020508204626.GA2093@nevyn.them.org> (raw)
In-Reply-To: <878z6umkwn.fsf@creche.redhat.com>
On Wed, May 08, 2002 at 02:42:16PM -0600, Tom Tromey wrote:
> >>>>> "Daniel" == Daniel Jacobowitz <drow@mvista.com> writes:
>
> Daniel> Soemthing interesting is going on here... I'd like to know how
> Daniel> it works in the stabs case. Tom, could you compile your test
> Daniel> with -gstabs+ and step through the char printing code? When I
> Daniel> do that, 'c' has TYPE_CODE_CHAR set anyway, even though the
> Daniel> stabs reader marked it as TYPE_CODE_INT. It'd be nice to
> Daniel> figure out where that magic happens.
>
> When I use -gstabs+ the type looks like this:
>
> (gdb) p *type
> $1 = {
> code = TYPE_CODE_CHAR,
> name = 0x83e6574 "char",
Yes, exactly. I'd like to figure out where that comes from.
... got it. Again, there are two definitions of char in the object
file:
4 LSYM 0 0 00000000 112 char:t(0,2)=r(0,2);0;127;
37 LSYM 0 0 00000000 1088 char:t(0,2)=@s16;-20;
See that -20? That's the supposedly rs6000-only (that function is no
longer accurately named) character type. Amusingly, both of those have
a size of one. Aren't java 'char' variables bigger than that? Another
debug info problem.
> length = 2,
Hmm, looks like the length got corrected somehow.
So, the debug info needs to be fixed to only emit the builtin types
once; and then either GDB needs to decide to represent DWARF-2 char
types as TYPE_CODE_CHAR also, or to support TYPE_CODE_INT characters
in Java code. I've no idea which decision is better.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-05-08 20:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-06 10:11 Tom Tromey
2002-05-06 17:05 ` Michael Snyder
2002-05-07 13:29 ` Tom Tromey
2002-05-07 15:45 ` Andrew Cagney
2002-05-07 13:43 ` Daniel Jacobowitz
2002-05-07 14:22 ` Michael Snyder
2002-05-07 14:35 ` Tom Tromey
2002-05-08 12:12 ` Michael Snyder
2002-05-08 12:47 ` Daniel Jacobowitz
2002-05-08 13:32 ` Tom Tromey
2002-05-08 13:46 ` Daniel Jacobowitz [this message]
2002-05-08 14:10 ` Michael Snyder
2002-05-08 14:20 ` Daniel Jacobowitz
2002-05-08 15:39 ` Michael Snyder
2002-05-08 15:42 ` Tom Tromey
2002-05-08 16:52 ` Michael Snyder
2002-05-08 21:09 ` Tom Tromey
2002-05-09 11:09 ` Michael Snyder
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=20020508204626.GA2093@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=msnyder@redhat.com \
--cc=tromey@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