Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC] fix testsuite/gdb.cp/printmethod
@ 2005-12-06 22:46 Christophe LYON
  2005-12-08  9:48 ` Daniel Jacobowitz
  0 siblings, 1 reply; 21+ messages in thread
From: Christophe LYON @ 2005-12-06 22:46 UTC (permalink / raw)
  To: gdb-patches

Hi all,

As I explained in 
http://sources.redhat.com/ml/gdb/2005-11/msg00611.html, I think that the 
gdb.cp/printmethod test somewhat relies on G++ not generating code for 
the nonvirt() method.

I propose the following fix.

Christophe.


2005-12-06    Christophe Lyon <christophe.lyon@st.com>
	* gdb.cp/printmethod.cc (main): call virt() and nonvirt() to
	force code generation for these functions.
	* gdb.cp/printmethod.exp: expect &A::nonvirt() instead of error
	message.


Index: gdb.cp/printmethod.exp
===================================================================
--- gdb.cp/printmethod.exp    (revision 96)
+++ gdb.cp/printmethod.exp    (working copy)
@@ -63,7 +63,7 @@
  # The first of these is for PR gdb/653.

  gdb_test "print theA->virt" "\\$\[0-9\]* = &A::virt\\((void|)\\)" 
"print virtual method."
-gdb_test "print theA->nonvirt" "Cannot take address of a method" "print 
nonvirtual method."
+gdb_test "print theA->nonvirt" "\\$\[0-9\]* = &A::nonvirt\\((void|)\\)" 
"print nonvirtual method."

  gdb_exit
  return 0

Index: gdb.cp/printmethod.cc
===================================================================
--- gdb.cp/printmethod.cc     (revision 96)
+++ gdb.cp/printmethod.cc     (working copy)
@@ -29,6 +29,8 @@
  int main()
  {
    A *theA = new A;
+  theA->virt();
+  theA->nonvirt();

    return 0;                            // breakpoint: constructs-done
  }


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2005-12-24 17:37 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-06 22:46 [RFC] fix testsuite/gdb.cp/printmethod Christophe LYON
2005-12-08  9:48 ` Daniel Jacobowitz
2005-12-08 18:37   ` Eli Zaretskii
2005-12-08 19:22     ` Daniel Jacobowitz
2005-12-09  2:12       ` Jim Blandy
2005-12-09  2:25       ` Eli Zaretskii
2005-12-19 22:39       ` Update Copyright and FSF address (was: [RFC] fix testsuite/gdb.cp/printmethod) Eli Zaretskii
2005-12-20  3:04         ` Daniel Jacobowitz
2005-12-20 14:19           ` Daniel Jacobowitz
2005-12-20  3:18         ` Mark Kettenis
2005-12-24  8:07         ` Eli Zaretskii
2005-12-24  8:57           ` Update Copyright and FSF address Eli Zaretskii
2005-12-24 10:50           ` Update Copyright and FSF address (was: [RFC] fix testsuite/gdb.cp/printmethod) Daniel Jacobowitz
2005-12-24 17:37             ` Eli Zaretskii
2005-12-26 14:39               ` Eli Zaretskii
2005-12-26 19:15               ` Daniel Jacobowitz
2005-12-26 19:31                 ` Eli Zaretskii
2005-12-27  4:09                   ` Daniel Jacobowitz
2005-12-27 12:23                     ` Eli Zaretskii
2005-12-09  8:05     ` [RFC] fix testsuite/gdb.cp/printmethod Mark Kettenis
2005-12-09 18:51   ` Christophe LYON

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox