From 40f0318e99b714619c029e788c8de3af1c286e14 Mon Sep 17 00:00:00 2001 From: Keith Seitz Date: Wed, 11 Nov 2009 23:33:51 +0000 Subject: [PATCH] * gdb.cp/classes.cc (ByAnyOtherName): Add typedef and use it instead of "Foo". * gdb.cp/classes.exp (do_tests): Add a test to access a method through a typedef'd class name. --- gdb/testsuite/ChangeLog | 7 +++++++ gdb/testsuite/gdb.cp/classes.cc | 4 +++- gdb/testsuite/gdb.cp/classes.exp | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 29bdd9e5700..85818875fbc 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2009-11-11 Keith Seitz + + * gdb.cp/classes.cc (ByAnyOtherName): Add typedef and + use it instead of "Foo". + * gdb.cp/classes.exp (do_tests): Add a test to access + a method through a typedef'd class name. + 2009-11-11 Nathan Froyd * gdb.base/long_long.exp: Permit leading zeros on floating-point diff --git a/gdb/testsuite/gdb.cp/classes.cc b/gdb/testsuite/gdb.cp/classes.cc index 913627fe1b3..921ebc9870c 100644 --- a/gdb/testsuite/gdb.cp/classes.cc +++ b/gdb/testsuite/gdb.cp/classes.cc @@ -417,6 +417,8 @@ class Foo int times (int y); }; +typedef Foo ByAnyOtherName; + class Bar : public Base1, public Foo { public: int z; @@ -431,7 +433,7 @@ int Foo::st = 100; Foo::operator int() { return x; } -Foo foo(10, 11); +ByAnyOtherName foo(10, 11); Bar bar(20, 21, 22); class ClassWithEnum { diff --git a/gdb/testsuite/gdb.cp/classes.exp b/gdb/testsuite/gdb.cp/classes.exp index 87e993c7fdd..3a1ee9e62f1 100644 --- a/gdb/testsuite/gdb.cp/classes.exp +++ b/gdb/testsuite/gdb.cp/classes.exp @@ -636,6 +636,8 @@ proc do_tests {} { gdb_test "print base1::Base1" "<.*Base1.*>" "print ctor of typedef class" gdb_test "print base1::~Base1" "<.*~Base1(\\(\\))?>" \ "print dtor of typedef class" + + gdb_test "list ByAnyOtherName::times" ".*int Foo::times.*" } do_tests -- 2.30.2