public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug m3/27049] New: gdb crashes when printing variable of 2 dimensional dynamic array
@ 2020-12-11  0:56 peter.mckinna at gmail dot com
  2020-12-11  4:45 ` [Bug m3/27049] " simark at simark dot ca
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: peter.mckinna at gmail dot com @ 2020-12-11  0:56 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=27049

            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=13036&action=edit
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 = INTEGER (*)[variable length][variable length]
(gdb) p refArr
$1 = (INTEGER (*)[variable length][variable length]) 0x555555580158
(gdb) p *refArr
$2 = {
value.c:1526: internal-error: CORE_ADDR value_address(const value*): Assertion
`PROP_CONST == 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 = ARRAY OF ARRAY OF INTEGER;
VAR
  arr : ArrType
BEGIN
  arr := 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

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-12-18 11:12 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-11  0:56 [Bug m3/27049] New: gdb crashes when printing variable of 2 dimensional dynamic array peter.mckinna at gmail dot com
2020-12-11  4:45 ` [Bug m3/27049] " simark at simark dot ca
2020-12-11 14:16 ` tromey at sourceware dot org
2020-12-11 22:34 ` peter.mckinna at gmail dot com
2020-12-11 23:15 ` peter.mckinna at gmail dot com
2020-12-12  5:49 ` simark at simark dot ca
2020-12-15 18:19 ` tromey at sourceware dot org
2020-12-15 18:23 ` tromey at sourceware dot org
2020-12-15 18:24 ` tromey at sourceware dot org
2020-12-15 21:16 ` peter.mckinna at gmail dot com
2020-12-16 11:24 ` andrew.burgess at embecosm dot com
2020-12-17 17:30 ` andrew.burgess at embecosm dot com
2020-12-18  1:19 ` peter.mckinna at gmail dot com
2020-12-18  6:34 ` peter.mckinna at gmail dot com
2020-12-18 11:12 ` andrew.burgess at embecosm dot com

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).