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 symtab/26390] gdb.fortran/mixed-lang-stack.exp: error reading variable in backtrace Date: Fri, 14 Aug 2020 14:52:08 +0000 [thread overview] Message-ID: <bug-26390-4717-WOWwnAgmbz@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-26390-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=26390 Tom de Vries <vries at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simark at simark dot ca --- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> --- I tried to use recursive_dump_type to print the type, but ran into an assert, because recursive_dump_type tries to print the high bound as PROP_CONST, while it's a PROP_LOCEXPR. Tentative patch: ... diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index da1c58c65c..d3f460779a 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -4856,6 +4856,27 @@ print_gnat_stuff (struct type *type, int spaces) static struct obstack dont_print_type_obstack; +static void +dump_dynamic_prop (dynamic_prop &prop) +{ + switch (prop.kind ()) + { + case PROP_CONST: + printfi_filtered (0, "%s", plongest (prop.const_val ())); + break; + case PROP_UNDEFINED: + printfi_filtered (0, "(undefined)"); + break; + case PROP_LOCEXPR: + case PROP_LOCLIST: + printfi_filtered (0, "(dynamic)"); + break; + default: + gdb_assert (false); + break; + } +} + void recursive_dump_type (struct type *type, int spaces) { @@ -5115,13 +5136,11 @@ recursive_dump_type (struct type *type, int spaces) } if (type->code () == TYPE_CODE_RANGE) { - printfi_filtered (spaces, "low %s%s high %s%s\n", - plongest (type->bounds ()->low.const_val ()), - (type->bounds ()->low.kind () == PROP_UNDEFINED - ? " (undefined)" : ""), - plongest (type->bounds ()->high.const_val ()), - (type->bounds ()->high.kind () == PROP_UNDEFINED - ? " (undefined)" : "")); + printfi_filtered (spaces, "low "); + dump_dynamic_prop (type->bounds ()->low); + printfi_filtered (0, " high "); + dump_dynamic_prop (type->bounds ()->high); + printfi_filtered (0, "\n"); } switch (TYPE_SPECIFIC_FIELD (type)) ... -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2020-08-14 14:52 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-14 11:48 [Bug symtab/26390] New: " vries at gcc dot gnu.org 2020-08-14 12:03 ` [Bug symtab/26390] " vries at gcc dot gnu.org 2020-08-14 12:49 ` vries at gcc dot gnu.org 2020-08-14 14:52 ` vries at gcc dot gnu.org [this message] 2020-08-14 15:12 ` vries at gcc dot gnu.org 2020-08-14 15:15 ` vries at gcc dot gnu.org 2020-08-14 15:38 ` vries at gcc dot gnu.org 2020-08-14 15:39 ` vries at gcc dot gnu.org 2020-08-15 5:48 ` [Bug backtrace/26390] " vries at gcc dot gnu.org 2020-08-15 5:55 ` vries at gcc dot gnu.org 2020-08-15 8:19 ` cvs-commit at gcc dot gnu.org 2020-08-15 8:27 ` vries at gcc dot gnu.org 2020-08-15 8:28 ` vries at gcc dot gnu.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-26390-4717-WOWwnAgmbz@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).