From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: dje@google.com (Doug Evans)
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Fix crash of convenience vars with typedefs.
Date: Mon, 17 Aug 2009 13:11:00 -0000 [thread overview]
Message-ID: <200908171308.n7HD8dwb023540@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <20090815000443.B0B0D8469B@localhost> from "Doug Evans" at Aug 14, 2009 05:04:43 PM
Doug Evans wrote:
> gdb/value.c:1094: internal-error: bad type
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
Oops, sorry for the breakage.
> + struct type *real_type = check_typedef (var->u.scalar.type);
> + switch (TYPE_CODE (check_typedef (real_type)))
That's a duplicate check_typedef ...
> + case TYPE_CODE_INT:
> + val = value_from_longest (real_type, var->u.scalar.val.l);
> + break;
> + case TYPE_CODE_PTR:
> + val = value_from_pointer (real_type, var->u.scalar.val.a);
> + break;
Shouldn't the result of value_of_internalvar still have the original
typedef name instead of the type it resolves to?
I'm wondering about the other places where the type is used, in particular
get_internalvar_integer. Also, it seems better to avoid calling
check_typedef every time ...
Maybe it would be best to split the INTERNALVAR_SCALAR state into two
distinct states INTERNALVAL_INTEGER and INTERNAL_POINTER; the decision
can be make in set_internalvar, where we already call check_typedef,
and then used subsequentially.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2009-08-17 13:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-15 0:22 Doug Evans
2009-08-17 13:11 ` Ulrich Weigand [this message]
2009-08-17 16:10 ` Tom Tromey
2009-08-17 18:24 ` Ulrich Weigand
2009-08-17 18:22 ` Ulrich Weigand
2009-08-18 18:44 ` Doug Evans
2009-08-19 16:43 ` [commit] " Ulrich Weigand
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=200908171308.n7HD8dwb023540@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=dje@google.com \
--cc=gdb-patches@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