From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120672 invoked by alias); 8 Dec 2017 06:39:37 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 120663 invoked by uid 89); 8 Dec 2017 06:39:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy= X-HELO: hqemgate14.nvidia.com Received: from hqemgate14.nvidia.com (HELO hqemgate14.nvidia.com) (216.228.121.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 08 Dec 2017 06:39:33 +0000 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com id ; Thu, 07 Dec 2017 22:39:15 -0800 Received: from HQMAIL106.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Thu, 07 Dec 2017 22:40:16 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Thu, 07 Dec 2017 22:40:16 -0800 Received: from UKMAIL102.nvidia.com (10.26.138.15) by HQMAIL106.nvidia.com (172.18.146.12) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Fri, 8 Dec 2017 06:39:29 +0000 Received: from localhost.localdomain (10.21.38.227) by UKMAIL102.nvidia.com (10.26.138.15) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Fri, 8 Dec 2017 06:39:26 +0000 Subject: Re: Handling language trampoline To: Pedro Alves , References: <690fc1d3-9ba9-51ef-054d-9478993015a6@nvidia.com> <7a5a19c6-c1bb-b67a-d302-a78ed8f001fa@redhat.com> From: Dmitry Antipov Message-ID: <8ea7083d-d914-c463-c7f3-22bd57ac5a6d@nvidia.com> Date: Fri, 08 Dec 2017 06:39:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <7a5a19c6-c1bb-b67a-d302-a78ed8f001fa@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: UKMAIL101.nvidia.com (10.26.138.13) To UKMAIL102.nvidia.com (10.26.138.15) X-IsSubscribed: yes X-SW-Source: 2017-12/txt/msg00008.txt.bz2 On 12/07/2017 05:58 PM, Pedro Alves wrote: > I don't offhand see how can GDB know which is the right > language for the current PC the program just stopped at, and > if the program stopped inside a trampoline. That's part of > each language's skip_trampoline's job, so seems reasonable > that GDB has to try them all. I'm not an expert in this area too, but, in theory, what's the problem if we have (presumably valid) DWARF info? Looking through DWARF4 specs, each CU should have DW_AT_low_pc and DW_AT_high_pc; so, if CU->DW_AT_low_pc <= current PC <= CU->DW_AT_high_pc, then CU->DW_AT_language is the language in question, isn't it? Dmitry