From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D48153857C59; Fri, 14 Aug 2020 14:52:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D48153857C59 From: "vries at gcc dot gnu.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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2020 14:52:08 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26390 Tom de Vries changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simark at simark dot ca --- Comment #3 from Tom de Vries --- I tried to use recursive_dump_type to print the type, but ran into an asser= t, because recursive_dump_type tries to print the high bound as PROP_CONST, wh= ile 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 () =3D=3D TYPE_CODE_RANGE) { - printfi_filtered (spaces, "low %s%s high %s%s\n", - plongest (type->bounds ()->low.const_val ()), - (type->bounds ()->low.kind () =3D=3D PROP_UNDEFINED - ? " (undefined)" : ""), - plongest (type->bounds ()->high.const_val ()), - (type->bounds ()->high.kind () =3D=3D 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)) ... --=20 You are receiving this mail because: You are on the CC list for the bug.=