From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32622 invoked by alias); 19 Jul 2019 20:12:10 -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 32598 invoked by uid 89); 19 Jul 2019 20:12:09 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SEMBACKSCATTER,RCVD_IN_SEMBLACK,SPF_HELO_PASS autolearn=no version=3.3.1 spammy=H*Ad:U*gdb X-HELO: gateway33.websitewelcome.com Received: from gateway33.websitewelcome.com (HELO gateway33.websitewelcome.com) (192.185.146.87) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 19 Jul 2019 20:12:07 +0000 Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway33.websitewelcome.com (Postfix) with ESMTP id 63CFFEF611 for ; Fri, 19 Jul 2019 15:12:06 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id oZEchhiEv2qH7oZEchlx8C; Fri, 19 Jul 2019 15:12:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=b2xhkA9hE5FtKHN0r6UtuR1b9LD6pgL2xCt/P4Qj2s4=; b=rrmC+sviCJ9cVh5MIndYvX8aTV YLQxoLDn/pBBDkw335oZeijg3vKNJ7pWycfhy+anznbEqY03Qr+YQlV9srozCvalznChZlqBzQ6Z2 hSb6y2x+8p54ndaEZu2SEGdHg; Received: from 97-122-178-82.hlrn.qwest.net ([97.122.178.82]:52200 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hoZEc-002of5-3e; Fri, 19 Jul 2019 15:12:06 -0500 From: Tom Tromey To: "Aktemur\, Tankut Baris" Cc: "gdb\@sourceware.org" , "Metzger\, Markus T" Subject: Re: Infcall of a template function in a C++ program References: Date: Fri, 19 Jul 2019 20:12:00 -0000 In-Reply-To: (Tankut Baris Aktemur's message of "Wed, 26 Jun 2019 08:59:17 +0000") Message-ID: <87imrxwzqi.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-07/txt/msg00007.txt.bz2 >>>>> ">" == Aktemur, Tankut Baris writes: >> The compiler is able to do the type inference, template function >> instantiation, and function invocation based on the expressions `foo (5)` >> and `foo ('a')`. When we start GDB and attempt to evaluate these >> expressions, the corresponding functions are not resolved, though. >> Opinions on how to address this problem properly are welcome. Once upon a time, Sami Wagiaalla wrote some patches to do this. I don't believe they ever went in. I don't remember why any more. However, perhaps they could be resurrected. They were sent to gdb-patches, years ago now. The "compile" command might also be promising here, though I don't know how well the C++ support handles templates. It's a difficult problem given the way the "compile" command was designed, because the source isn't available and DWARF doesn't represent templates, only instantiations. Tom