public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/26680] FAIL: gdb.ada/variant.exp: scenario=minimal: fetch type for python (GDB internal error) Date: Wed, 30 Sep 2020 09:00:14 +0000 [thread overview] Message-ID: <bug-26680-4717-3lI95bgUoD@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-26680-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=26680 --- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> --- Tentative patch: ... diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index bcac94ed36..ba98fe6ff6 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -16187,7 +16187,17 @@ handle_variant (struct die_info *die, struct type *type, variant.discr_list_data = discr->as_block (); } else - variant.discriminant_value = discr->as_unsigned (); + if (discr->form_is_unsigned ()) + variant.discriminant_value = discr->as_unsigned (); + else + { + union { + ULONGEST u; + LONGEST i; + } val; + val.i = discr->as_signed ();; + variant.discriminant_value = val.u; + } for (die_info *variant_child = die->child; variant_child != NULL; ... -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2020-09-30 9:00 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-30 8:09 [Bug gdb/26680] New: " vries at gcc dot gnu.org 2020-09-30 8:11 ` [Bug gdb/26680] " vries at gcc dot gnu.org 2020-09-30 8:21 ` vries at gcc dot gnu.org 2020-09-30 9:00 ` vries at gcc dot gnu.org [this message] 2020-09-30 12:40 ` vries at gcc dot gnu.org 2020-09-30 12:40 ` vries at gcc dot gnu.org 2020-09-30 12:46 ` vries at gcc dot gnu.org 2020-09-30 16:40 ` tromey at sourceware dot org 2020-10-08 17:54 ` tromey at sourceware dot org
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=bug-26680-4717-3lI95bgUoD@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@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: linkBe 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).