Bug 12506 - physname linespec regression
Summary: physname linespec regression
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: c++ (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: 7.3
Assignee: Jan Kratochvil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-23 05:21 UTC by Jan Kratochvil
Modified: 2011-07-02 20:00 UTC (History)
2 users (show)

See Also:
Host:
Target: x86_64-unknown-linux-gnu
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kratochvil 2011-02-23 05:21:20 UTC
the patch
        42284fdf9d8cdb20c8e833bdbdb2b56977fea525
        http://sourceware.org/ml/gdb-cvs/2010-03/msg00082.html
        dwarf2_physname patchset:
        [RFA] dwarf2_physname FINAL
        http://sourceware.org/ml/gdb-patches/2010-03/msg00220.html
has a regression for:
(gdb) b test<my_types>::f1
Breakpoint 1 at 0x4008d5: file ms_types.C, line 9.
->
(gdb) b test<my_types>::f1
the class test<my_types> does not have any method named f1

when the testcase is built with recent GCCs:

PASS g++ (GCC) 4.4.6 20110124 (prerelease)
FAIL g++ (GCC) 4.5.3 20110124 (prerelease)
FAIL g++ (GCC) 4.6.0 20110212 (experimental)
FAIL gcc-c++-4.6.0-0.7.fc15.x86_64
FAIL gcc-c++-4.5.1-4.fc14.x86_64
FAIL gcc-c++-4.4.5-2.fc13.x86_64

Testcase provided by Henrik Nyberg (irc <henke>).

#include <iostream>
template<typename types>
class test
{
public:
        void f1(typename types::arg_type f)
        {
                std::cout << "f1: " << f << std::endl;
        }       
        void f2()
        {
                std::cout << "f2" << std::endl;
        }
};              
class my_types
{
public:
        typedef int arg_type;
};
int main()
{       
        test<my_types> t;
        t.f1(5);
        t.f2();
        return 0;
}
Comment 1 Keith Seitz 2011-03-03 19:20:08 UTC
Proposed patch:
http://sourceware.org/ml/gdb-patches/2011-03/msg00189.html
Comment 2 Jan Kratochvil 2011-07-02 20:00:45 UTC
http://sourceware.org/ml/gdb-cvs/2011-07/msg00043.html