From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8B8F13857C79; Mon, 17 Aug 2020 07:54:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B8F13857C79 From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/26393] gdbtypes.h:526: internal-error: LONGEST dynamic_prop::const_val() const: Assertion `m_kind == PROP_CONST' failed. (recursive_dump_type) Date: Mon, 17 Aug 2020 07:54:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: 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: Mon, 17 Aug 2020 07:54:41 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26393 --- Comment #2 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D53d5a2a5c146= f98dd525eda2f33d7781666463bf commit 53d5a2a5c146f98dd525eda2f33d7781666463bf Author: Tom de Vries Date: Mon Aug 17 09:54:37 2020 +0200 [gdb] Fix printing of unresolved dynamic type When debugging gdb in batch mode with executable mixed-lang-stack and d= oing a backtrace at breakpt: ... $ gdb --args gdb \ -batch \ outputs/gdb.fortran/mixed-lang-stack/mixed-lang-stack \ -ex "b breakpt" \ -ex r \ -ex bt ... and stopping at resolve_dynamic_type to print the type: ... (gdb) b resolve_dynamic_type Breakpoint 1 at 0x6b020c: file gdbtypes.c, line 2633. (gdb) commands Type commands for breakpoint(s) 1, one per line. End with a line saying just "end". >call recursive_dump_type (type, 0) >continue >end (gdb) run ... we eventually run into an assert for the dynamic type of "str": ... Thread 1 "gdb" hit Breakpoint 1, resolve_dynamic_type (type=3D0x22204f0= , \ valaddr=3D..., addr=3D4199408) at gdbtypes.c:2633 2633 =3D {check_typedef (type), valaddr, addr, NULL}; type node 0x22204f0 name '' (0x0) code 0xd (TYPE_CODE_STRING) length 0 ... nfields 0 0x22204b0 gdbtypes.h:526: internal-error: LONGEST dynamic_prop::const_val() const= : \ Assertion `m_kind =3D=3D PROP_CONST' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. ... when trying to print the high bound of a TYPE_CODE_RANGE, which has m_k= ind PROP_LOCEXPR, while the code in resolve_dynamic_type assumes PROP_CONST. Fix this by extending the printing of TYPE_CODE_RANGE to allow PROP_LOCEXPR/PROP_LOCLIST as well, such that we have instead: ... nfields 0 0x1fbc020 low 1 high (dynamic) ... Tested on x86_64-linux. gdb/ChangeLog: 2020-08-17 Tom de Vries PR gdb/26393 * gdbtypes.c (dump_dynamic_prop): New function. (recursive_dump_type): Use dump_dynamic_prop for TYPE_CODE_RANG= E. --=20 You are receiving this mail because: You are on the CC list for the bug.=