From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21094 invoked by alias); 11 May 2019 17:23:10 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 21083 invoked by uid 89); 11 May 2019 17:23:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=Joel, gdbada, privately, UD:ada X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 11 May 2019 17:23:09 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 7F3A31177A0; Sat, 11 May 2019 13:23:07 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id MxeB-um0aA2b; Sat, 11 May 2019 13:23:07 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 4D84D117713; Sat, 11 May 2019 13:23:07 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 4A69083C06; Sat, 11 May 2019 10:23:05 -0700 (PDT) Date: Sat, 11 May 2019 17:23:00 -0000 From: Joel Brobecker To: Pedro Franco de Carvalho Cc: gdb-patches@sourceware.org Subject: Re: [RFA/commit] (Ada) fix GDB crash printing packed array Message-ID: <20190511172305.GA27503@adacore.com> References: <1549786901-77868-1-git-send-email-brobecker@adacore.com> <87o94a824q.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87o94a824q.fsf@linux.ibm.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-SW-Source: 2019-05/txt/msg00273.txt.bz2 Hi Pedro, > I was running some regression tests for gdb 8.3, and I noticed that > there was a regression introduced by this patch for test > gdb.ada/pckd_arr_ren.exp. > > I tried investigating, and it seems that this happened due to the > compiler in my system being relatively old (GNAT 4.9.3). I don't know > much about Ada, so I couldn't figure out if this is an issue with the > debug symbols generated by the older compiler or if GDB should handle > this, but it worked before the patch. > > This is the relevant output from the test: > > (gdb) break foo.adb:22 > Breakpoint 1 at 0x10002410: file /home/pedromfc/binutils-gdb/gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb, line 22. > (gdb) run > Starting program: /home/pedromfc/binutils-gdb/build-bisect/gdb/testsuite/outputs/gdb.ada/pckd_arr_ren/foo > > Breakpoint 1, foo () at /home/pedromfc/binutils-gdb/gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb:22 > 22 Do_Nothing (A2'Address); -- STOP > (gdb) print A2 > Could not find renamed variable: a1 > (gdb) FAIL: gdb.ada/pckd_arr_ren.exp: print var > > That error message seems to come from ada-exp.y:write_object_renaming. Thanks for the heads up. Most likely the version of the compiler you are using is generating the debug info improperly, but why don't you send me privately your binary, and I will try to take a look, to see what's happening. -- Joel