This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/12937] New: Support optimized out / unused template methods


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]