summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/rtti.exp
diff options
context:
space:
mode:
authorDavid Carlton <carlton@bactrian.org>2004-01-23 23:03:31 +0000
committerDavid Carlton <carlton@bactrian.org>2004-01-23 23:03:31 +0000
commit53cf90a5bf51590119c2e7a562ab231f4f4b7b36 (patch)
tree123fb67428f31085f11aae728c5040a0f676fcfd /gdb/testsuite/gdb.cp/rtti.exp
parent85ba4594972f1fa8cbe12279f1b84e399cf7aa7f (diff)
downloadgdb-53cf90a5bf51590119c2e7a562ab231f4f4b7b36.tar.gz
2004-01-23 David Carlton <carlton@kealia.com>
Partial workaround for PR c++/1511: * cp-namespace.c: Include frame.h. (cp_lookup_transparent_type): New (cp_lookup_transparent_type_loop): New. * cp-support.h: Declare cp_lookup_transparent_type. * symtab.c (basic_lookup_transparent_type): Renamed from lookup_transparent_type. (lookup_transparent_type): Replace old body by a call to current_language->la_lookup_transparent_type. * symtab.h: Update copyright. Declare basic_lookup_transparent_type. * language.h: Update copyright. (struct language_defn): Add la_lookup_transparent_type. * language.c: Update copyright. (unknown_language_defn): Add basic_lookup_transparent_type. (auto_language_defn): Add basic_lookup_transparent_type. (local_language_defn): Add basic_lookup_transparent_type. * ada-lang.c: Update copyright. (ada_language_defn): Add basic_lookup_transparent_type. * c-lang.c: Update copyright. (c_language_defn): Add basic_lookup_transparent_type. (cplus_language_defn): Add basic_lookup_transparent_type. (asm_language_defn): Add basic_lookup_transparent_type. (minimal_language_defn): Add basic_lookup_transparent_type. * f-lang.c: Update copyright. (f_language_defn): Add basic_lookup_transparent_type. * jv-lang.c: Update copyright. (java_language_defn): Add basic_lookup_transparent_type. * m2-lang.c: Update copyright. (m2_language_defn): Add basic_lookup_transparent_type. * objc-lang.c: Update copyright. (objc_language_defn): Add basic_lookup_transparent_type. * p-lang.c: Update copyright. (p_language_defn): Add basic_lookup_transparent_type. * scm-lang.c: Update copyright. (scm_language_defn): Add basic_lookup_transparent_type. * Makefile.in (cp-namespace.o): Depend on frame.h. 2004-01-23 David Carlton <carlton@kealia.com> * gdb.cp/rtti.exp: Don't include full path in ${srcfile}. Add test for cp_lookup_transparent_type. * gdb.cp/rtti1.cc: Update copyright. Add n2::func and refer_to; call them.
Diffstat (limited to 'gdb/testsuite/gdb.cp/rtti.exp')
-rw-r--r--gdb/testsuite/gdb.cp/rtti.exp17
1 files changed, 13 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.cp/rtti.exp b/gdb/testsuite/gdb.cp/rtti.exp
index 124166587fa..0a8a2d70b31 100644
--- a/gdb/testsuite/gdb.cp/rtti.exp
+++ b/gdb/testsuite/gdb.cp/rtti.exp
@@ -46,8 +46,9 @@ set srcfile2 "${srcdir}/${subdir}/${testfile}2.cc"
set objfile2 "${objdir}/${subdir}/${testfile}2.o"
set binfile ${objdir}/${subdir}/${testfile}
-# gdb_get_line_number needs this to be called srcfile.
-set srcfile "${srcfile1}"
+# gdb_get_line_number needs this to be called srcfile. Except that it
+# gets confused if the directories are included. :-(
+set srcfile "${testfile}1.cc"
if { [gdb_compile "${srcfile1}" "${objfile1}" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
@@ -78,8 +79,8 @@ if ![runto_main] then {
# First, run to after we've constructed the object:
-gdb_breakpoint [gdb_get_line_number "constructs-done"]
-gdb_continue_to_breakpoint "end of constructors"
+gdb_breakpoint [gdb_get_line_number "main-constructs-done"]
+gdb_continue_to_breakpoint "end of constructors in main"
gdb_test_multiple "print *e1" "print *e1" {
-re "warning: RTTI symbol not found for class 'n1::D1'.*$gdb_prompt $" {
@@ -131,5 +132,13 @@ gdb_test_multiple "print *e2" "print *e2" {
}
}
+# Now we test the hack that's been implemented to get around some
+# instances of PR gdb/1511.
+
+gdb_breakpoint [gdb_get_line_number "func-constructs-done"]
+gdb_continue_to_breakpoint "end of constructors in func"
+
+gdb_test "print *obj" "\\$\[0-9\]* = {<n2::Base2> = .*}"
+
gdb_exit
return 0