]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
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 2b25ebfd479cab42d8937406958d8e6356d7a5ff..7f5d7e7c624355c55e8dd73117632635b51aacdd 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 13418e0202406807a95bb9870fae21f54227a9b2..9bee5567fa71cc1267e6ca552a112e63d7268fd0 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 6afb491ddc50f7d325cf88b00341ba4942d4822d..b4d573df1ff30eeb6cb67bb6b320c08813cae5e2 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 a45393f34d929bc35742dafd8411b4a625355682..67372cd093a2ca85916a47d81e09b23fab90f3c7 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 54c81ac2f0acf98406934874fd9b8805a991da7c..0b136e0defd165675d8f085f5af45c3ddd4bf37a 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))