public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12937] New: Support optimized out / unused template methods
@ 2011-06-27 16:33 jan.kratochvil at redhat dot com
  2011-10-19 17:20 ` [Bug c++/12937] " tromey at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-06-27 16:33 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12937

           Summary: Support optimized out / unused template methods
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jan.kratochvil@redhat.com


This is more a GCC extension request but we need to formulate it first.

#include <map>
int
main ()
{
  std::map <int, int> v { std::make_pair (1, 2) };
//  v.clear ();
  return v[1];
}

7      return v[1];
(gdb) p v.clear()
Cannot evaluate function -- may be inlined

after uncommenting the line in the source:

(gdb) p v.clear()
$1 = void

There should be for example some extra .text section in the separate .debug
info file containing all the unused methods for a template instance.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/12937] Support optimized out / unused template methods
  2011-06-27 16:33 [Bug c++/12937] New: Support optimized out / unused template methods jan.kratochvil at redhat dot com
@ 2011-10-19 17:20 ` tromey at redhat dot com
  2011-11-10 19:52 ` tromey at redhat dot com
  2013-02-22 16:05 ` tromey at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: tromey at redhat dot com @ 2011-10-19 17:20 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12937

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at redhat dot com

--- Comment #1 from Tom Tromey <tromey at redhat dot com> 2011-10-19 17:19:59 UTC ---
We've discussed a few ways to fix this.

One way would be to have the compiler emit the out-of-line instances
to a special section, which could then be put into the .debug file.
Then, gdb could call dlopen to map this into the inferior.

Another way would be to write a GCC plugin to transform the out-of-line
instances into Python code using gdb's Python API.  This could be done,
e.g., using David Malcolm's plugin
(https://fedorahosted.org/gcc-python-plugin/)
and converting gimple to Python code.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/12937] Support optimized out / unused template methods
  2011-06-27 16:33 [Bug c++/12937] New: Support optimized out / unused template methods jan.kratochvil at redhat dot com
  2011-10-19 17:20 ` [Bug c++/12937] " tromey at redhat dot com
@ 2011-11-10 19:52 ` tromey at redhat dot com
  2013-02-22 16:05 ` tromey at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: tromey at redhat dot com @ 2011-11-10 19:52 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12937

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lberk at redhat dot com

--- Comment #2 from Tom Tromey <tromey at redhat dot com> 2011-11-10 19:50:53 UTC ---
*** Bug 12383 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/12937] Support optimized out / unused template methods
  2011-06-27 16:33 [Bug c++/12937] New: Support optimized out / unused template methods jan.kratochvil at redhat dot com
  2011-10-19 17:20 ` [Bug c++/12937] " tromey at redhat dot com
  2011-11-10 19:52 ` tromey at redhat dot com
@ 2013-02-22 16:05 ` tromey at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: tromey at redhat dot com @ 2013-02-22 16:05 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12937

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |archer

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-22 16:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-27 16:33 [Bug c++/12937] New: Support optimized out / unused template methods jan.kratochvil at redhat dot com
2011-10-19 17:20 ` [Bug c++/12937] " tromey at redhat dot com
2011-11-10 19:52 ` tromey at redhat dot com
2013-02-22 16:05 ` tromey at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).