diff options
-rw-r--r-- | gdb/ChangeLog | 16 | ||||
-rw-r--r-- | gdb/Makefile.in | 2 | ||||
-rw-r--r-- | gdb/c-exp.y | 86 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 18 | ||||
-rw-r--r-- | gdb/symtab.c | 51 | ||||
-rw-r--r-- | gdb/symtab.h | 6 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 17 | ||||
-rw-r--r-- | gdb/testsuite/gdb.c++/m-data.cc | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.c++/m-static.cc | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.c++/namespace.cc | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.c++/namespace.exp | 117 |
11 files changed, 205 insertions, 117 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a93161a..a68ec55 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,19 @@ +2002-12-17 David Carlton <carlton@math.stanford.edu> + + * c-exp.y (yylex): Modify the #if 1 block to handle nested types + in a more honest manner. + * symtab.c (lookup_nested_type): New function. + * symtab.h: Declare lookup_nested_type. + +2002-12-16 David Carlton <carlton@math.stanford.edu> + + * symtab.c (lookup_partial_symbol): Don't search past the end of + the partial symbols. + * Makefile.in (f-exp.tab.c): Don't depend on c-exp.tab.c. + * dwarf2read.c (new_symbol): Only make global symbols associated + to structures, etc. if the current language is C++. + (add_partial_symbol): Ditto (for partial symbols). + 2002-11-29 David Carlton <carlton@bactrian.org> * dwarf2read.c (add_partial_symbol): Add partial symbols diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 3c79b81..c64e7f9 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1250,7 +1250,7 @@ jv-exp.tab.c: jv-exp.y # See comments above ... .PRECIOUS: f-exp.tab.c f-exp.tab.o: f-exp.tab.c -f-exp.tab.c: f-exp.y c-exp.tab.c +f-exp.tab.c: f-exp.y $(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/f-exp.y y.tab.c f-exp.tmp -- $(YFLAGS) -sed -e '/extern.*malloc/d' \ -e '/extern.*realloc/d' \ diff --git a/gdb/c-exp.y b/gdb/c-exp.y index a313d2f..f2094b5 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -1,6 +1,6 @@ /* YACC parser for C expressions, for GDB. Copyright 1986, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, - 1998, 1999, 2000 + 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GDB. @@ -1641,7 +1641,14 @@ yylex () string to get a reasonable class/namespace spec or a fully-qualified name. This is a kludge to get around the HP aCC compiler's generation of symbol names with embedded - colons for namespace and nested classes. */ + colons for namespace and nested classes. */ + + /* NOTE: carlton/2002-12-17: I really don't understand this + HP-specific stuff (here or in linespec), but it has to go away. + It's actually possible that it would be best to start from the + current HP case than from the current non-HP case: the + description of HP symbol names sounds like what I'm trying to get + symbol names to look like. */ if (unquoted_expr) { /* Only do it if not inside single quotes */ @@ -1696,18 +1703,9 @@ yylex () if (sym && SYMBOL_CLASS (sym) == LOC_TYPEDEF) { #if 1 - /* Despite the following flaw, we need to keep this code enabled. - Because we can get called from check_stub_method, if we don't - handle nested types then it screws many operations in any - program which uses nested types. */ - /* In "A::x", if x is a member function of A and there happens - to be a type (nested or not, since the stabs don't make that - distinction) named x, then this code incorrectly thinks we - are dealing with nested types rather than a member function. */ - char *p; char *namestart; - struct symbol *best_sym; + struct type *best_type; /* Look ahead to detect nested types. This probably should be done in the grammar, but trying seemed to introduce a lot @@ -1715,13 +1713,27 @@ yylex () that it could be done, though. Or perhaps a non-grammar, but less ad hoc, approach would work well. */ - /* Since we do not currently have any way of distinguishing - a nested type from a non-nested one (the stabs don't tell - us whether a type is nested), we just ignore the - containing type. */ + /* NOTE: carlton/2002-12-17: The idea of doing this in the + lexer rather than the grammar seems awful to me. + Unfortunately, there currently seems to be no way around + it that I can see: the grammar is for either expressions + or types (see the 'start' rule), so it can be used for + the commands 'print' and 'ptype', and furthermore it's + the parser's job to evaluate types whereas it's + evaluate_expression's job to evaluate other expressions, + which combine to make an awful mess. + + So, for now, we 'handle' nested types here. Sigh. But I + really don't think this setup is a good idea: it papers + over :: issues, and should fall flat on its face when + dealing with initial :: operators. + + An earlier version of this code was even worse: it + 'dealt' with nested types by pretending they weren't + nested, because of stabs limitations. Sigh. */ p = lexptr; - best_sym = sym; + best_type = SYMBOL_TYPE (sym); while (1) { /* Skip whitespace. */ @@ -1741,31 +1753,17 @@ yylex () ++p; if (p != namestart) { - struct symbol *cur_sym; - /* As big as the whole rest of the expression, which is - at least big enough. */ - char *ncopy = alloca (strlen (tmp)+strlen (namestart)+3); - char *tmp1; - - tmp1 = ncopy; - memcpy (tmp1, tmp, strlen (tmp)); - tmp1 += strlen (tmp); - memcpy (tmp1, "::", 2); - tmp1 += 2; - memcpy (tmp1, namestart, p - namestart); - tmp1[p - namestart] = '\0'; - cur_sym = lookup_symbol (ncopy, expression_context_block, - VAR_NAMESPACE, (int *) NULL, - (struct symtab **) NULL); - if (cur_sym) + struct type *cur_type; + char *ncopy = alloca (p - namestart + 1); + memcpy (ncopy, namestart, p - namestart); + ncopy[p - namestart] = '\0'; + cur_type = lookup_nested_type (best_type, + ncopy, + expression_context_block); + if (cur_type != NULL) { - if (SYMBOL_CLASS (cur_sym) == LOC_TYPEDEF) - { - best_sym = cur_sym; - lexptr = p; - } - else - break; + best_type = cur_type; + lexptr = p; } else break; @@ -1777,10 +1775,10 @@ yylex () break; } - yylval.tsym.type = SYMBOL_TYPE (best_sym); -#else /* not 0 */ + yylval.tsym.type = best_type; +#else /* not 1 */ yylval.tsym.type = SYMBOL_TYPE (sym); -#endif /* not 0 */ +#endif /* not 1 */ return TYPENAME; } if ((yylval.tsym.type = lookup_primitive_typename (tmp)) != 0) diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 2c64f59..f36aa30 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -1559,7 +1559,9 @@ add_partial_symbol (struct partial_die_info *pdi, struct objfile *objfile, return; add_psymbol_to_list (actual_name, strlen (actual_name), STRUCT_NAMESPACE, LOC_TYPEDEF, - &objfile->global_psymbols, + cu_language == language_cplus + ? &objfile->global_psymbols + : &objfile->static_psymbols, 0, (CORE_ADDR) 0, cu_language, objfile); if (cu_language == language_cplus) @@ -1574,7 +1576,9 @@ add_partial_symbol (struct partial_die_info *pdi, struct objfile *objfile, case DW_TAG_enumerator: add_psymbol_to_list (actual_name, strlen (actual_name), VAR_NAMESPACE, LOC_CONST, - &objfile->global_psymbols, + cu_language == language_cplus + ? &objfile->static_psymbols + : &objfile->global_psymbols, 0, (CORE_ADDR) 0, cu_language, objfile); break; default: @@ -5243,19 +5247,18 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile, } { - /* NOTE: carlton/2002-11-29: Class symbols shouldn't + /* NOTE: carlton/2002-11-29: C++ class symbols shouldn't really ever be static objects: otherwise, if you try to, say, break of a class's method and you're in a file which doesn't mention that class, it won't work unless the check for all static symbols in lookup_symbol_aux - saves you. Though perhaps C allows different files to - define different structs with the same name; if so, - this should be conditional on C++. See the - OtherFileClass tests in gdb.c++/namespace.exp. */ + saves you. See the OtherFileClass tests in + gdb.c++/namespace.exp. */ struct pending **list_to_add; list_to_add = (list_in_scope == &file_symbols + && cu_language == language_cplus ? &global_symbols : list_in_scope); add_symbol_to_list (sym, list_to_add); @@ -5318,6 +5321,7 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile, struct pending **list_to_add; list_to_add = (list_in_scope == &file_symbols + && cu_language == language_cplus ? &global_symbols : list_in_scope); add_symbol_to_list (sym, list_to_add); diff --git a/gdb/symtab.c b/gdb/symtab.c index 085b8fa..38ec36c 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -1472,6 +1472,52 @@ lookup_symbol_aux_minsyms (int block_index, const char *name, return NULL; } +/* Look up a type named NESTED_NAME that is nested inside the C++ + class or namespace given by PARENT_TYPE, from within the context + given by BLOCK. */ + +struct type * +lookup_nested_type (struct type *parent_type, + const char *nested_name, + const struct block *block) +{ + switch (TYPE_CODE (parent_type)) + { + case TYPE_CODE_STRUCT: + case TYPE_CODE_NAMESPACE: + { + /* NOTE: carlton/2002-12-17: As of this writing, C++ class + members of classes aren't treated like, say, data or + function members. Instead, they're just represented by + symbols whose names are qualified by the name of the + surrounding class. This is just like members of + namespaces; in particular, lookup_symbol_namespace works + when looking them up. */ + + /* NOTE: carlton/2002-12-17: The above is, actually, lying: + there are still situations where nested types are + represented by symbols that include only the member name, + not the parent name. Sigh. Blame it on stabs, or + something. */ + const char *parent_name = TYPE_TAG_NAME (parent_type); + struct symbol *sym = lookup_symbol_namespace (parent_name, + strlen (parent_name), + nested_name, + NULL, + block, + VAR_NAMESPACE, + NULL); + if (sym == NULL || SYMBOL_CLASS (sym) != LOC_TYPEDEF) + return NULL; + else + return SYMBOL_TYPE (sym); + } + default: + error ("\"%s\" is not defined as a compound type.", + TYPE_NAME (parent_type)); + } +} + /* Look, in partial_symtab PST, for symbol NAME. Check the global symbols if GLOBAL, the static symbols if not */ @@ -1481,7 +1527,7 @@ lookup_partial_symbol (struct partial_symtab *pst, const char *name, { struct partial_symbol *temp; struct partial_symbol **start, **psym; - struct partial_symbol **top, **bottom, **center; + struct partial_symbol **top, **real_top, **bottom, **center; int length = (global ? pst->n_global_syms : pst->n_static_syms); int do_linear_search = 1; @@ -1504,6 +1550,7 @@ lookup_partial_symbol (struct partial_symtab *pst, const char *name, bottom = start; top = start + length - 1; + real_top = top; while (top > bottom) { center = bottom + (top - bottom) / 2; @@ -1531,7 +1578,7 @@ lookup_partial_symbol (struct partial_symtab *pst, const char *name, /* djb - 2000-06-03 - Use SYMBOL_MATCHES_NAME, not a strcmp, so we don't have to force a linear search on C++. Probably holds true for JAVA as well, no way to check. */ - while (SYMBOL_MATCHES_NAME (*top, name)) + while (top <= real_top && SYMBOL_MATCHES_NAME (*top, name)) { if (SYMBOL_NAMESPACE (*top) == namespace) { diff --git a/gdb/symtab.h b/gdb/symtab.h index 6d13cba..d96c0c6 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -953,6 +953,12 @@ extern struct symbol *lookup_symbol_namespace (const char *namespace_name, namespace_enum name_space, struct symtab **symtab); +/* Lookup a type within a class or a namespace. */ + +extern struct type *lookup_nested_type (struct type *parent_type, + const char *nested_name, + const struct block *block); + /* lookup a symbol by name, within a specified block */ extern struct symbol *lookup_block_symbol (const struct block *, const char *, diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 0886e86..977114b 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,20 @@ +2002-12-17 David Carlton <carlton@math.stanford.edu> + + * gdb.c++/m-data.cc: Whitespace cleanup, to match mainline patch. + * gdb.c++/m-static.cc: Ditto. + * gdb.c++/namespace.exp: Fix comment. Delete third argument to + all the gdb_tests. + +2002-12-16 David Carlton <carlton@math.stanford.edu> + + * gdb.c++/namespace.exp: Change KFAIL messages to point to c++/XXX + instead of gdb/XXX. + +2002-12-02 David Carlton <carlton@math.stanford.edu> + + * gdb.c++/namespace.exp: Add format strings after all the + setup_kfails. + 2002-11-29 David Carlton <carlton@bactrian.org> * gdb.c++/namespace.exp: Add OtherFileClass tests. diff --git a/gdb/testsuite/gdb.c++/m-data.cc b/gdb/testsuite/gdb.c++/m-data.cc index f5afec0..2066546 100644 --- a/gdb/testsuite/gdb.c++/m-data.cc +++ b/gdb/testsuite/gdb.c++/m-data.cc @@ -1,6 +1,6 @@ // 2002-05-13 -enum region { oriental, egyptian, greek, etruscan, roman }; +enum region { oriental, egyptian, greek, etruscan, roman }; // Test one. class gnu_obj_1 diff --git a/gdb/testsuite/gdb.c++/m-static.cc b/gdb/testsuite/gdb.c++/m-static.cc index e5b9cd1..6d08cb0 100644 --- a/gdb/testsuite/gdb.c++/m-static.cc +++ b/gdb/testsuite/gdb.c++/m-static.cc @@ -1,6 +1,6 @@ // 2002-05-13 -enum region { oriental, egyptian, greek, etruscan, roman }; +enum region { oriental, egyptian, greek, etruscan, roman }; // Test one. class gnu_obj_1 @@ -43,8 +43,8 @@ class gnu_obj_3 { public: typedef region antiquities; - static gnu_obj_2<int> data; - + static gnu_obj_2<int> data; + public: gnu_obj_3(antiquities b) { } }; diff --git a/gdb/testsuite/gdb.c++/namespace.cc b/gdb/testsuite/gdb.c++/namespace.cc index 0a264ec..d9c9593 100644 --- a/gdb/testsuite/gdb.c++/namespace.cc +++ b/gdb/testsuite/gdb.c++/namespace.cc @@ -196,6 +196,7 @@ namespace C //cc; C::cc; cd; + //C::D::cd; E::cde; shadow; //E::ce; diff --git a/gdb/testsuite/gdb.c++/namespace.exp b/gdb/testsuite/gdb.c++/namespace.exp index fa38f2e..1f0d7e1 100644 --- a/gdb/testsuite/gdb.c++/namespace.exp +++ b/gdb/testsuite/gdb.c++/namespace.exp @@ -79,10 +79,10 @@ gdb_test "up" ".*main.*" "up from marker1" # Access a data item inside a namespace using colons and # single quotes. :-( -# NOTE: carlton/2002-11-24: the colons are becoming less necessary (or -# even desirable.) For tests where it should still work with colons, -# I'm including versions both with and without colons; for tests that -# shouldn't work with colons, I'm only including one version. +# NOTE: carlton/2002-11-24: the quotes are becoming less necessary (or +# even desirable.) For tests where it should still work with quotes, +# I'm including versions both with and without quotes; for tests that +# shouldn't work with quotes, I'm only including one version. send_gdb "print 'AAA::c'\n" gdb_expect { @@ -178,7 +178,7 @@ gdb_expect { send_gdb "print BBB::CCC::xyzq('x')\n" gdb_expect { -re "\\$\[0-9\]* = 122 'z'\r\n$gdb_prompt $" { - pass "print 'BBB::CCC::xyzq'('x')" + pass "print BBB::CCC::xyzq('x')" } -re ".*$gdb_prompt $" { fail "print BBB::CCC::xyzq('x')" } timeout { fail "(timeout) print BBB::CCC::xyzq('x')" } @@ -235,53 +235,52 @@ if ![runto "C::D::marker2"] then { continue } -gdb_test "print c" "\\$\[0-9\].* = 1" "print c" -gdb_test "print cc" "No symbol \"cc\" in current context." "print cc" -gdb_test "print 'C::cc'" "\\$\[0-9\].* = 2" "print 'C::cc'" -gdb_test "print C::cc" "\\$\[0-9\].* = 2" "print C::cc" -gdb_test "print cd" "\\$\[0-9\].* = 3" "print cd" -gdb_test "print 'C::D::cd'" "\\$\[0-9\].* = 3" "print 'C::D::cd'" -gdb_test "print C::D::cd" "\\$\[0-9\].* = 3" "print C::D::cd" -gdb_test "print 'E::cde'" "\\$\[0-9\].* = 5" "print 'E::cde'" -gdb_test "print E::cde" "\\$\[0-9\].* = 5" "print E::cde" -gdb_test "print shadow" "\\$\[0-9\].* = 13" "print shadow" -gdb_test "print E::ce" "No symbol \"ce\" in namespace \"C::D::E\"." "print E::ce" -gdb_test "ptype C" "type = namespace C::C" "ptype C::C" -gdb_test "ptype E" "type = namespace C::D::E" "ptype C::D::E" - -gdb_test "ptype CClass" "type = class C::CClass \{\r\n public:\r\n int x;\r\n\}" "ptype CClass" -gdb_test "ptype CClass::NestedClass" "type = class C::CClass::NestedClass \{\r\n public:\r\n int y;\r\n\}" "ptype CClass::NestedClass" -gdb_test "ptype NestedClass" "No symbol \"NestedClass\" in current context." "ptype NestedClass" -gdb_test "ptype ::C::CClass" "type = class C::CClass \{\r\n public:\r\n int x;\r\n\}" "ptype ::C::CClass" -gdb_test "ptype ::C::CClass::NestedClass" "type = class C::CClass::NestedClass \{\r\n public:\r\n int y;\r\n\}" "ptype ::C::CClass::NestedClass" -gdb_test "ptype ::C::NestedClass" "No symbol \"NestedClass\" in namespace \"C\"." "ptype ::C::NestedClass" -gdb_test "ptype C::CClass" "No symbol \"Class\" in namespace \"C::C\"" "ptype C::CClass" -gdb_test "ptype C::CClass::NestedClass" "No symbol \"Class\" in namespace \"C::C\"" "ptype C::CClass::NestedClass" -gdb_test "ptype C::NestedClass" "No symbol \"NestedClass\" in namespace \"C::C\"." "ptype C::NestedClass" +gdb_test "print c" "\\$\[0-9\].* = 1" +gdb_test "print cc" "No symbol \"cc\" in current context." +gdb_test "print 'C::cc'" "\\$\[0-9\].* = 2" +gdb_test "print C::cc" "\\$\[0-9\].* = 2" +gdb_test "print cd" "\\$\[0-9\].* = 3" +gdb_test "print C::D::cd" "No type \"D\" within context \"C::C\"." +gdb_test "print 'E::cde'" "\\$\[0-9\].* = 5" +gdb_test "print E::cde" "\\$\[0-9\].* = 5" +gdb_test "print shadow" "\\$\[0-9\].* = 13" +gdb_test "print E::ce" "No symbol \"ce\" in namespace \"C::D::E\"." +gdb_test "ptype C" "type = namespace C::C" +gdb_test "ptype E" "type = namespace C::D::E" + +gdb_test "ptype CClass" "type = class C::CClass \{\r\n public:\r\n int x;\r\n\}" +gdb_test "ptype CClass::NestedClass" "type = class C::CClass::NestedClass \{\r\n public:\r\n int y;\r\n\}" +gdb_test "ptype NestedClass" "No symbol \"NestedClass\" in current context." +gdb_test "ptype ::C::CClass" "type = class C::CClass \{\r\n public:\r\n int x;\r\n\}" +gdb_test "ptype ::C::CClass::NestedClass" "type = class C::CClass::NestedClass \{\r\n public:\r\n int y;\r\n\}" +gdb_test "ptype ::C::NestedClass" "No symbol \"NestedClass\" in namespace \"C\"." +gdb_test "ptype C::CClass" "No symbol \"CClass\" in namespace \"C::C\"." +gdb_test "ptype C::CClass::NestedClass" "No symbol \"CClass\" in namespace \"C::C\"." +gdb_test "ptype C::NestedClass" "No symbol \"NestedClass\" in namespace \"C::C\"." # Tests involving multiple files -gdb_test "ptype OtherFileClass" "type = class C::OtherFileClass \{\r\n public:\r\n int z;\r\n\}" "ptype OtherFileClass" -gdb_test "ptype ::C::OtherFileClass" "type = class C::OtherFileClass \{\r\n public:\r\n int z;\r\n\}" "ptype ::C::OtherFileClass" -gdb_test "ptype C::OtherFileClass" "No symbol \"Class\" in namespace \"C::C\"" "ptype C::OtherFileClass" +gdb_test "ptype OtherFileClass" "type = class C::OtherFileClass \{\r\n public:\r\n int z;\r\n\}" +gdb_test "ptype ::C::OtherFileClass" "type = class C::OtherFileClass \{\r\n public:\r\n int z;\r\n\}" +gdb_test "ptype C::OtherFileClass" "No symbol \"Class\" in namespace \"C::C\"." # Some anonymous namespace tests. -gdb_test "print cX" "\\$\[0-9\].* = 6" "print cX" -gdb_test "print 'F::cXf'" "\\$\[0-9\].* = 7" "print 'F::cXf'" -gdb_test "print F::cXf" "\\$\[0-9\].* = 7" "print F::cXf" -gdb_test "print 'F::cXfX'" "\\$\[0-9\].* = 8" "print 'F::cXfX'" -gdb_test "print F::cXfX" "\\$\[0-9\].* = 8" "print F::cXfX" -gdb_test "print X" "\\$\[0-9\].* = 9" "print X" -gdb_test "print 'G::Xg'" "\\$\[0-9\].* = 10" "print 'G::Xg'" -gdb_test "print G::Xg" "\\$\[0-9\].* = 10" "print G::Xg" -gdb_test "print 'G::XgX'" "\\$\[0-9\].* = 11" "print 'G::XgX'" -gdb_test "print G::XgX" "\\$\[0-9\].* = 11" "print G::XgX" +gdb_test "print cX" "\\$\[0-9\].* = 6" +gdb_test "print 'F::cXf'" "\\$\[0-9\].* = 7" +gdb_test "print F::cXf" "\\$\[0-9\].* = 7" +gdb_test "print 'F::cXfX'" "\\$\[0-9\].* = 8" +gdb_test "print F::cXfX" "\\$\[0-9\].* = 8" +gdb_test "print X" "\\$\[0-9\].* = 9" +gdb_test "print 'G::Xg'" "\\$\[0-9\].* = 10" +gdb_test "print G::Xg" "\\$\[0-9\].* = 10" +gdb_test "print 'G::XgX'" "\\$\[0-9\].* = 11" +gdb_test "print G::XgX" "\\$\[0-9\].* = 11" # Test namespace renaming. -setup_kfail "gdb/830" -gdb_test "print I::h" "\\$\[0-9\].* = 14" "print I::h" +setup_kfail "c++/830" "*-*-*" +gdb_test "print I::h" "\\$\[0-9\].* = 14" # Test using directives. @@ -289,22 +288,22 @@ gdb_test "print I::h" "\\$\[0-9\].* = 14" "print I::h" # have unfortunate interactions with namespace scope issues. As of # this writing, some of these pass, but they pass for the wrong reasons. -setup_kfail "gdb/829" -gdb_test "print j" "\\$\[0-9\].* = 15" "print j" -setup_kfail "gdb/829" -gdb_test "print L::k" "\\$\[0-9\].* = 16" "print L::k" -setup_kfail "gdb/829" -gdb_test "print k" "No symbol \"k\" in current context." "print k" -setup_kfail "gdb/829" -gdb_test "print cdm" "\\$\[0-9\].* = 17" "print cdm" -setup_kfail "gdb/829" -gdb_test "print Q::o" "\\$\[0-9\].* = 18" "print Q::o" -setup_kfail "gdb/829" -gdb_test "print o" "No symbol \"o\" in current context." "print o" +setup_kfail "c++/829" "*-*-*" +gdb_test "print j" "\\$\[0-9\].* = 15" +setup_kfail "c++/829" "*-*-*" +gdb_test "print L::k" "\\$\[0-9\].* = 16" +setup_kfail "c++/829" "*-*-*" +gdb_test "print k" "No symbol \"k\" in current context." +setup_kfail "c++/829" "*-*-*" +gdb_test "print cdm" "\\$\[0-9\].* = 17" +setup_kfail "c++/829" "*-*-*" +gdb_test "print Q::o" "\\$\[0-9\].* = 18" +setup_kfail "c++/829" "*-*-*" +gdb_test "print o" "No symbol \"o\" in current context." # Test using declarations. I should probably test these more. -setup_kfail "gdb/831" -gdb_test "print r1" "\\$\[0-9\].* = 19" "print r1" -setup_kfail "gdb/831" -gdb_test "print r2" "No symbol \"r2\" in current context." "print r2" +setup_kfail "c++/831" "*-*-*" +gdb_test "print r1" "\\$\[0-9\].* = 19" +setup_kfail "c++/831" "*-*-*" +gdb_test "print r2" "No symbol \"r2\" in current context." |