From patchwork Wed Dec 7 12:04:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 87057 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp277856qgi; Wed, 7 Dec 2016 04:07:00 -0800 (PST) X-Received: by 10.84.218.207 with SMTP id g15mr143983639plm.78.1481112420473; Wed, 07 Dec 2016 04:07:00 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id u72si23774445pgb.191.2016.12.07.04.07.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Dec 2016 04:07:00 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-443674-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-443674-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-443674-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=qWF0wWjOi+312QvE IvbgSu2AmFIkwPmR6GwqMtXOC+M880s0YEUMS6sMBtAsXC7uqcrgGeSDSWu0950z lYrtQ6w8/5hnOsJRQy6qT0oafVAszseqJzD9GfzFumVLRd8Nv8WmiKbcAcC6Xfoz C4XOL6uf8Gg8Sgh3+W7pxya2IFk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=5VMg4uWwxeiONtkpO7YPHT cVWZU=; b=y774XmnRQkFogPwFn+OBvIKXAMiUE+rBEOLHynmwDYdqrYSCdgEExa PXbD1eVHF8UwW02i17SBGRMvsapKJfCJdZhG7p5RKFRVCM/RuwgDZX6XTjQt9ERW /dcMNvVV4GwKdkx8Vy8HQ68gMV3AFodskV44jNsF8uIkTMk2arg7c= Received: (qmail 9361 invoked by alias); 7 Dec 2016 12:04:59 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 9176 invoked by uid 89); 7 Dec 2016 12:04:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=gnu_entity_name X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 Dec 2016 12:04:47 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id ED631814DF for ; Wed, 7 Dec 2016 13:04:44 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f9CtG09457fe for ; Wed, 7 Dec 2016 13:04:44 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id CB822814DE for ; Wed, 7 Dec 2016 13:04:44 +0100 (CET) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [Ada] Fix glitch in debug info for renaming Date: Wed, 07 Dec 2016 13:04:44 +0100 Message-ID: <2096055.KvMWldC59e@polaris> User-Agent: KMail/4.14.10 (Linux/3.16.7-48-desktop; KDE/4.14.9; x86_64; ; ) MIME-Version: 1.0 GDB cannot inspect renamings declared at library level when it relies on the special __XR variable generated as per the GNAT encodings. Tested on x86_64-suse-linux, applied on the mainline. 2016-12-07 Pierre-Marie de Rodat * gcc-interface/decl.c (gnat_to_gnu_entity): When they are global, consider ___XR GNAT encodings variables for renamings as static so they have a location in the debug info. -- Eric Botcazou Index: gcc-interface/decl.c =================================================================== --- gcc-interface/decl.c (revision 243340) +++ gcc-interface/decl.c (working copy) @@ -672,6 +672,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entit VAR_DECL, gnu_entity_name, gnu_type); SET_DECL_VALUE_EXPR (gnu_decl, value); DECL_HAS_VALUE_EXPR_P (gnu_decl) = 1; + TREE_STATIC (gnu_decl) = global_bindings_p (); gnat_pushdecl (gnu_decl, gnat_entity); break; }