* 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.
+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.
+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)
/* 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
int main()
{
A *theA = new A;
+ theA->virt ();
+ theA->nonvirt ();
return 0; // breakpoint: constructs-done
}
-# 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
# 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
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))