From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11288 invoked by alias); 24 Mar 2014 14:15:46 -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 11272 invoked by uid 89); 24 Mar 2014 14:15:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 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 (AES256-SHA encrypted) ESMTPS; Mon, 24 Mar 2014 14:15:29 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id A8831116648; Mon, 24 Mar 2014 10:15:27 -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 MgoUXWynh3dU; Mon, 24 Mar 2014 10:15:27 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 7D8CE116643; Mon, 24 Mar 2014 10:15:27 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 7D565E0BF2; Mon, 24 Mar 2014 07:15:27 -0700 (PDT) Date: Mon, 24 Mar 2014 14:15:00 -0000 From: Joel Brobecker To: Keith Seitz Cc: "gp >> \"gdb-patches@sourceware.org ml\"" Subject: Re: [RFA] Fix c++/16253 (tag/variable name collision) Message-ID: <20140324141527.GM4282@adacore.com> References: <532C810F.7010809@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="OXfL5xGRrasGEqWY" Content-Disposition: inline In-Reply-To: <532C810F.7010809@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-03/txt/msg00575.txt.bz2 --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1550 Hey Keith, > I must also give a shout out to Joel -- I've largely avoided hacking > with/at Ada. In fact, Ada *largely* remains unchanged. However, it > now must explicitly search STRUCT_DOMAIN in a few places itself (an > analogous change to the other symbol table API changes I've made). > Joel, if you could run this through your internal AdaCore test > harness, that would be most helpful. I had a chance to test your patch today, and unfortunately our testsuite detected some regressions. I think they might all be the same, so I picked the simplest testcase. I might be running short of time today to look deeper into this, but I can try scheduling some time for it tomorrow or Wed. % gnatmake -g foo % gdb foo (gdb) ptype base It should have been: (gdb) ptype base type = (first, middle, last) The debugger finds the type if you start the program, but I think it's because it finds it via the DIE generated inside the main subprogram's DIE because of the variable of that type declared there: (gdb) start Temporary breakpoint 1 at 0x401d86: file foo.adb, line 4. Starting program: /[...]/foo Temporary breakpoint 1, foo () at foo.adb:4 4 B : Base := Base'First; <<<<<--- the variable of type Base (gdb) ptype base type = (first, middle, last) This may not be directly related to your patch. I seem to have seen some unexplainable behavior in GDB occasionally in the recent past making me wonder whether there might be something fishy in the symbol lookup for Ada. -- Joel --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pck.ads" Content-length: 169 with System; package Pck is type Base is (First, Middle, Last); subtype Enum is Base range First .. Last; procedure Do_Nothing (A : System.Address); end Pck; --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pck.adb" Content-length: 119 package body Pck is procedure Do_Nothing (A : System.Address) is begin null; end Do_Nothing; end Pck; --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="foo.adb" Content-length: 106 with Pck; use Pck; procedure Foo is B : Base := Base'First; begin Do_Nothing (B'Address); end Foo; --OXfL5xGRrasGEqWY--