Bug 7145 - C++ template functions have return types in their names
Summary: C++ template functions have return types in their names
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: c++ (show other bugs)
Version: unknown
: P3 normal
Target Milestone: 7.2
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: 11211
  Show dependency treegraph
 
Reported: 2001-03-12 01:08 UTC by Michael Elizabeth Chastain
Modified: 2010-03-09 23:38 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
typescript (1.89 KB, application/octet-stream)
, Michael Elizabeth Chastain
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Elizabeth Chastain 2001-03-12 09:08:01 UTC
[Converted from Gnats 40]

gdb thinks template functions have a return type in their
name.  This makes it difficult to type the name.

With g++ 2.95.2:

  (gdb) where
  #0  int add_two_values<int> (v1=1, v2=10)
  #1  0x080483de in main () at x3.cc:17

With g++ 3pre:

  #0  int add_two_values<int>(int, int) (v1=1, v2=10)
  #1  0x08048452 in main () at x3.cc:17

Release:
cvs 2001-03-09

Environment:
Red Hat Linux 7 native
g++ 2.95.2
g++ cvs gcc-3_0-branch dated 2001-03-09
gdb cvs dated 2001-03-09

How-To-Repeat:
Repeat the steps in the typescript.
Comment 1 Michael Elizabeth Chastain 2001-03-12 09:08:01 UTC
Fix:
Probably contained in the libiberty demanglers.
Comment 2 Michael Elizabeth Chastain 2003-12-02 18:15:58 UTC
From: mec.gnu@mindspring.com (Michael Elizabeth Chastain)
To: gdb-gnats@sources.redhat.com
Cc:  
Subject: Re: c++/40
Date: Tue,  2 Dec 2003 13:15:58 -0500 (EST)

 I re-tried this with native i866-pc-linux-gnu, red hat 8.0.
 
 The bug still happens with:
 
   gdb 6.0, gcc 2.95.3, dwarf-2
   gdb 6.0, gcc 2.95.3, stabs+
   gdb 6.0, gcc 3.3.2, dwarf-2
   gdb 6.0, gcc 3.3.2, stabs+
   gdb HEAD, gcc 2.95.3, dwarf-2
   gdb HEAD, gcc 2.95.3, stabs+
 
 The bug appears to be fixed with:
 
   gdb HEAD, gcc 3.3.2, dwarf-2
   gdb HEAD, gcc 3.3.2, stabs+
 
 gdb HEAD is from 2003-11-30 06:08:24 UTC with Ian L-T new demangler.
 
 Michael C
Comment 3 Keith Seitz 2010-03-09 23:38:10 UTC
The recent dwarf2_physname patchset fixes this problem (GDB
7.1.50.20100309-cvs), which is caused, as surmised by Michael, by the use of
demangling linkage names.