gdb/
authorDaniel Jacobowitz <drow@false.org>
Wed, 7 Dec 2005 23:07:54 +0000 (23:07 +0000)
committerDaniel Jacobowitz <drow@false.org>
Wed, 7 Dec 2005 23:07:54 +0000 (23:07 +0000)
* valops.c (value_struct_elt): Clarify error message.
gdb/testsuite/
2005-12-07  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 an
error message.

gdb/ChangeLog
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.cp/printmethod.cc
gdb/testsuite/gdb.cp/printmethod.exp
gdb/valops.c

index 2b25ebf..7f5d7e7 100644 (file)
@@ -1,3 +1,7 @@
+2005-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * valops.c (value_struct_elt): Clarify error message.
+
 2005-12-07  Jim Blandy  <jimb@redhat.com>
 
        * target.c (target_xfer_memory_partial): Doc fix.
index 13418e0..9bee556 100644 (file)
@@ -1,3 +1,10 @@
+2005-12-07  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 an
+       error message.
+
 2005-12-02  Andrew Stubbs  <andrew.stubbs@st.com>
 
        * gdb.base/help.exp (help b, help br, help bre, help brea)
index 6afb491..b4d573d 100644 (file)
@@ -1,6 +1,6 @@
 /* This test script is part of GDB, the GNU debugger.
 
-   Copyright 2002, 2004,
+   Copyright 2002, 2004, 2005
    Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -29,6 +29,8 @@ public:
 int main()
 {
   A *theA = new A;
+  theA->virt ();
+  theA->nonvirt ();
 
   return 0;                            // breakpoint: constructs-done
 }
index a45393f..67372cd 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2005 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -63,7 +63,7 @@ gdb_continue_to_breakpoint "end of constructors"
 # 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 54c81ac..0b136e0 100644 (file)
@@ -1587,7 +1587,7 @@ value_struct_elt (struct value **argp, struct value **args,
       v = search_struct_method (name, argp, args, 0, static_memfuncp, t);
 
       if (v == (struct value *) - 1)
-       error (_("Cannot take address of a method"));
+       error (_("Cannot take address of method %s."), name);
       else if (v == 0)
        {
          if (TYPE_NFN_FIELDS (t))