Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Christophe LYON <christophe.lyon@st.com>
To: gdb-patches@sources.redhat.com
Subject: [RFC] fix testsuite/gdb.cp/printmethod
Date: Tue, 06 Dec 2005 22:46:00 -0000	[thread overview]
Message-ID: <4395D411.6020904@st.com> (raw)

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
  }


             reply	other threads:[~2005-12-06 18:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-06 22:46 Christophe LYON [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4395D411.6020904@st.com \
    --to=christophe.lyon@st.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox