Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: "Aktemur\, Tankut Baris" <tankut.baris.aktemur@intel.com>
Cc: "gdb\@sourceware.org" <gdb@sourceware.org>,  "Metzger\,
	Markus T" <markus.t.metzger@intel.com>
Subject: Re: Infcall of a template function in a C++ program
Date: Fri, 19 Jul 2019 20:12:00 -0000	[thread overview]
Message-ID: <87imrxwzqi.fsf@tromey.com> (raw)
In-Reply-To: <B98F7326B8E238409968F562D326E1A90D03B27B@IRSMSX103.ger.corp.intel.com>	(Tankut Baris Aktemur's message of "Wed, 26 Jun 2019 08:59:17 +0000")

>>>>> ">" == Aktemur, Tankut Baris <tankut.baris.aktemur@intel.com> 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


  reply	other threads:[~2019-07-19 20:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-07 14:45 Aktemur, Tankut Baris
2019-06-26  8:59 ` Aktemur, Tankut Baris
2019-07-19 20:12   ` Tom Tromey [this message]
2019-07-23 14:51     ` Keith Seitz
2019-07-23 15:52       ` Tom Tromey
2019-07-23 16:24       ` Aktemur, Tankut Baris
2019-07-23 16:22     ` Aktemur, Tankut Baris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87imrxwzqi.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb@sourceware.org \
    --cc=markus.t.metzger@intel.com \
    --cc=tankut.baris.aktemur@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox