? gdb/testsuite/gdb.cp/virtfunc2.cc ? gdb/testsuite/gdb.cp/virtfunc2.exp Index: gdb/ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.10874.2.54 diff -c -p -r1.10874.2.54 ChangeLog *** gdb/ChangeLog 24 Nov 2009 17:23:03 -0000 1.10874.2.54 --- gdb/ChangeLog 9 Dec 2009 13:00:50 -0000 *************** *** 1,3 **** --- 1,9 ---- + 2009-12-08 Chris Moller + + PR gdb/9399 + * valops.c (value_cast_structs): Added test to return NULL if no + casting needed. + 2009-11-23 Rainer Orth * dwarf2read.c [HAVE_MMAP] (MAP_FAILED): Define if missing. Index: gdb/valops.c =================================================================== RCS file: /cvs/src/src/gdb/valops.c,v retrieving revision 1.225.2.1 diff -c -p -r1.225.2.1 valops.c *** gdb/valops.c 29 Sep 2009 00:41:24 -0000 1.225.2.1 --- gdb/valops.c 9 Dec 2009 13:00:52 -0000 *************** value_cast_structs (struct type *type, s *** 232,237 **** --- 232,246 ---- || TYPE_CODE (t2) == TYPE_CODE_UNION) && !!"Precondition is that value is of STRUCT or UNION kind"); + /* Check to see if any kind of cast is necessary; if not, punt. + (Specifically not using strcmp_iw() because no other comparisons against + TYPE_NAME() use it. They all use standard strcmp() instead.) */ + + if ((TYPE_NAME (t1) != NULL) && + (TYPE_NAME (t2) != NULL) && + !strcmp (TYPE_NAME (t1), TYPE_NAME (t2))) + return NULL; + /* Upcasting: look in the type of the source to see if it contains the type of the target as a superclass. If so, we'll need to offset the pointer rather than just change its type. */ Index: gdb/testsuite/ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/testsuite/ChangeLog,v retrieving revision 1.1960.2.11 diff -c -p -r1.1960.2.11 ChangeLog *** gdb/testsuite/ChangeLog 29 Sep 2009 19:27:16 -0000 1.1960.2.11 --- gdb/testsuite/ChangeLog 9 Dec 2009 13:01:07 -0000 *************** *** 1,3 **** --- 1,10 ---- + 2009-12-08 Chris Moller + + PR gdb/9399 + * gdb.cp/virtfunc2.exp: + * gdb.cp/virtfunc2.cc: New tests for a patch to fix PR gd/9399 + * gdb.cp/Makefile.in: Added tests to EXECUTABLES + 2009-09-29 Jan Kratochvil * gdb.base/breakpoint-shadow.exp: Move the ia64 part into ... Index: gdb/testsuite/gdb.cp/Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/Makefile.in,v retrieving revision 1.6 diff -c -p -r1.6 Makefile.in *** gdb/testsuite/gdb.cp/Makefile.in 15 Jun 2009 12:11:37 -0000 1.6 --- gdb/testsuite/gdb.cp/Makefile.in 9 Dec 2009 13:01:09 -0000 *************** srcdir = @srcdir@ *** 4,10 **** EXECUTABLES = ambiguous annota2 anon-union cplusfuncs cttiadd \ derivation inherit local member-ptr method misc \ overload ovldbreak ref-typ ref-typ2 templates userdef virtfunc namespace \ ! ref-types ref-params method2 pr9594 gdb2495 all info install-info dvi install uninstall installcheck check: @echo "Nothing to be done for $@..." --- 4,10 ---- EXECUTABLES = ambiguous annota2 anon-union cplusfuncs cttiadd \ derivation inherit local member-ptr method misc \ overload ovldbreak ref-typ ref-typ2 templates userdef virtfunc namespace \ ! ref-types ref-params method2 pr9594 gdb2495 virtfunc2 all info install-info dvi install uninstall installcheck check: @echo "Nothing to be done for $@..."