From 52e44b43981ff9373fa7cec285ebe4f5662f5f53 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 3 Feb 2009 01:09:01 +0000 Subject: Fix ChangeLog to point to the correct bug, PR gdb/9594. gdb/testsuite * gdb.cp/cpcompletion.exp: Name the test "pr9594". * gdb.cp/pr2489.cc: Rename... * gdb.cp/pr9594.cc: ... to this. --- gdb/testsuite/ChangeLog | 6 +++++ gdb/testsuite/gdb.cp/Makefile.in | 2 +- gdb/testsuite/gdb.cp/cpcompletion.exp | 2 +- gdb/testsuite/gdb.cp/pr2489.cc | 51 ----------------------------------- gdb/testsuite/gdb.cp/pr9594.cc | 51 +++++++++++++++++++++++++++++++++++ 5 files changed, 59 insertions(+), 53 deletions(-) delete mode 100644 gdb/testsuite/gdb.cp/pr2489.cc create mode 100644 gdb/testsuite/gdb.cp/pr9594.cc (limited to 'gdb/testsuite') diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index aca5b5e..e81f304 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2009-02-02 Tom Tromey + * gdb.cp/cpcompletion.exp: Name the test "pr9594". + * gdb.cp/pr2489.cc: Rename... + * gdb.cp/pr9594.cc: ... to this. + +2009-02-02 Tom Tromey + * gdb.cp/Makefile.in (EXECUTABLES): Add pr2489. * gdb.cp/pr2489.cc: New file. * gdb.cp/cpcompletion.exp: New file. diff --git a/gdb/testsuite/gdb.cp/Makefile.in b/gdb/testsuite/gdb.cp/Makefile.in index 9239d70..1787ad5 100644 --- a/gdb/testsuite/gdb.cp/Makefile.in +++ b/gdb/testsuite/gdb.cp/Makefile.in @@ -4,7 +4,7 @@ srcdir = @srcdir@ EXECUTABLES = ambiguous annota2 anon-union cplusfuncs cttiadd \ derivation inherit local member-ptr method misc \ overload ovldbreak ref-typ ref-typ2 templates userdef virtfunc namespace \ - ref-types ref-params method2 pr2489 + ref-types ref-params method2 pr9594 all info install-info dvi install uninstall installcheck check: @echo "Nothing to be done for $@..." diff --git a/gdb/testsuite/gdb.cp/cpcompletion.exp b/gdb/testsuite/gdb.cp/cpcompletion.exp index 2f715ad..4a5dbeb 100644 --- a/gdb/testsuite/gdb.cp/cpcompletion.exp +++ b/gdb/testsuite/gdb.cp/cpcompletion.exp @@ -21,7 +21,7 @@ if $tracelevel then { if { [skip_cplus_tests] } { continue } -set testfile pr2489 +set testfile pr9594 set binfile ${objdir}/${subdir}/${testfile} if {[gdb_compile "${srcdir}/${subdir}/${testfile}.cc" "${testfile}.o" object {c++ debug}] != ""} { diff --git a/gdb/testsuite/gdb.cp/pr2489.cc b/gdb/testsuite/gdb.cp/pr2489.cc deleted file mode 100644 index bb7e1d6..0000000 --- a/gdb/testsuite/gdb.cp/pr2489.cc +++ /dev/null @@ -1,51 +0,0 @@ - -class Base -{ -public: - virtual int get_foo () { return 1; } - int base_function_only () { return 2; } -}; - -class Foo : public Base -{ - -private: - int foo_value; - -public: - Foo () { foo_value = 0;} - Foo (int i) { foo_value = i;} - ~Foo () { } - void set_foo (int value); - int get_foo (); - - // Something similar to a constructor name. - void Foofoo (); - - bool operator== (const Foo &other) { return foo_value == other.foo_value; } -}; - -void Foo::set_foo (int value) -{ - foo_value = value; -} - -int Foo::get_foo () -{ - return foo_value; -} - -void Foo::Foofoo () -{ -} - -int main () -{ - // Anonymous struct with method. - struct { - int get() { return 5; } - } a; - Foo foo1; - foo1.set_foo (42); // Set breakpoint here. - return 0; -} diff --git a/gdb/testsuite/gdb.cp/pr9594.cc b/gdb/testsuite/gdb.cp/pr9594.cc new file mode 100644 index 0000000..bb7e1d6 --- /dev/null +++ b/gdb/testsuite/gdb.cp/pr9594.cc @@ -0,0 +1,51 @@ + +class Base +{ +public: + virtual int get_foo () { return 1; } + int base_function_only () { return 2; } +}; + +class Foo : public Base +{ + +private: + int foo_value; + +public: + Foo () { foo_value = 0;} + Foo (int i) { foo_value = i;} + ~Foo () { } + void set_foo (int value); + int get_foo (); + + // Something similar to a constructor name. + void Foofoo (); + + bool operator== (const Foo &other) { return foo_value == other.foo_value; } +}; + +void Foo::set_foo (int value) +{ + foo_value = value; +} + +int Foo::get_foo () +{ + return foo_value; +} + +void Foo::Foofoo () +{ +} + +int main () +{ + // Anonymous struct with method. + struct { + int get() { return 5; } + } a; + Foo foo1; + foo1.set_foo (42); // Set breakpoint here. + return 0; +} -- cgit v1.1