This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: fix PR gdb/2489


>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:

Tom> 2009-02-02  Tom Tromey  <tromey@redhat.com>
Tom> 	PR gdb/2489:
Tom> 	* completer.c (count_struct_fields): Count method names.
Tom> 	(add_struct_fields): Add matching method names.

Whoops!  After committing, I remembered that this patch predates the
Bugzilla move.

I am checking in this patch to rename the test case.  I'm also going
to fix gdb/ChangeLog to point to the correct bug.

Tom

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.

Index: testsuite/gdb.cp/Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/Makefile.in,v
retrieving revision 1.4
diff -u -r1.4 Makefile.in
--- testsuite/gdb.cp/Makefile.in	3 Feb 2009 01:00:40 -0000	1.4
+++ testsuite/gdb.cp/Makefile.in	3 Feb 2009 01:06:12 -0000
@@ -4,7 +4,7 @@
 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 $@..."
Index: testsuite/gdb.cp/cpcompletion.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/cpcompletion.exp,v
retrieving revision 1.1
diff -u -r1.1 cpcompletion.exp
--- testsuite/gdb.cp/cpcompletion.exp	3 Feb 2009 01:00:40 -0000	1.1
+++ testsuite/gdb.cp/cpcompletion.exp	3 Feb 2009 01:06:13 -0000
@@ -21,7 +21,7 @@
 
 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}] != ""} {
Index: testsuite/gdb.cp/pr2489.cc
===================================================================
RCS file: testsuite/gdb.cp/pr2489.cc
diff -N testsuite/gdb.cp/pr2489.cc
--- testsuite/gdb.cp/pr2489.cc	3 Feb 2009 01:00:40 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -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;
-}
Index: testsuite/gdb.cp/pr9594.cc
===================================================================
RCS file: testsuite/gdb.cp/pr9594.cc
diff -N testsuite/gdb.cp/pr9594.cc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gdb.cp/pr9594.cc	3 Feb 2009 01:06:13 -0000
@@ -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;
+}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]