2009-02-02 Tom Tromey <tromey@redhat.com>
- PR gdb/2489:
+ PR gdb/9594:
* completer.c (count_struct_fields): Count method names.
(add_struct_fields): Add matching method names.
+2009-02-02 Tom Tromey <tromey@redhat.com>
+
+ * gdb.cp/cpcompletion.exp: Name the test "pr9594".
+ * gdb.cp/pr2489.cc: Rename...
+ * gdb.cp/pr9594.cc: ... to this.
+
2009-02-02 Tom Tromey <tromey@redhat.com>
* gdb.cp/Makefile.in (EXECUTABLES): Add pr2489.
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 $@..."
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}] != ""} {
+++ /dev/null
-
-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;
-}
--- /dev/null
+
+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;
+}