From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CE322385040E; Fri, 11 Dec 2020 00:56:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CE322385040E From: "peter.mckinna at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug m3/27049] New: gdb crashes when printing variable of 2 dimensional dynamic array Date: Fri, 11 Dec 2020 00:56:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: m3 X-Bugzilla-Version: 10.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: peter.mckinna at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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, 11 Dec 2020 00:56:30 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27049 Bug ID: 27049 Summary: gdb crashes when printing variable of 2 dimensional dynamic array Product: gdb Version: 10.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: m3 Assignee: unassigned at sourceware dot org Reporter: peter.mckinna at gmail dot com Target Milestone: --- Created attachment 13036 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D13036&action=3Ded= it dwarf dump of executable Trying to print a dynamic array of greater than one dimension fails in gdb 10.1 See debug attempt here (gdb) ptype refArr type =3D INTEGER (*)[variable length][variable length] (gdb) p refArr $1 =3D (INTEGER (*)[variable length][variable length]) 0x555555580158 (gdb) p *refArr $2 =3D { value.c:1526: internal-error: CORE_ADDR value_address(const value*): Assert= ion `PROP_CONST =3D=3D TYPE_DATA_LOCATION_KIND (value_type (value))' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) y gdb and operating system info GNU gdb (GDB) 10.1 This GDB was configured as "x86_64-pc-linux-gnu". Linux Mars 4.19.0-12-amd64 #1 SMP Debian 4.19.152-1 (2020-10-18) x86_64 GNU/Linux The program is a modula-3 program compiled with cm3 and generating llvm IR The source code summary is TYPE ArrType =3D ARRAY OF ARRAY OF INTEGER; VAR arr : ArrType BEGIN arr :=3D NEW(ArrType,12,8); END A one dimensional dynamic array works. It did not work in gdb 8 but has since been fixed. It is difficult to build a testcase without installing cm3 and llvm I have attached a summary of the dwarf from llvm-dwarfdump --=20 You are receiving this mail because: You are on the CC list for the bug.=