* gdb.c++/local.cc (main): Move call to marker1() inside nested
scope so that the nested scope tests will make sense.
* gdb.c++/local.exp: Write patterns that actually work with gcc
(the HP patterns "were never known to work with gcc").
Keep the old aCC patterns too.
* gdb.c++/method.exp: Require "const ... A * ..." for "ptype this"
in a const method. Add some xfail and fail cases for configurations
that do not emit the "const ...".
* gdb.c++/method.exp: Use gdb_test instead of send_gdb/gdb_expect.
Accept "A * const" and "const A * const" as type of "this".
Fix spelling of getFunky throughout. Make messages uniform.
* gdb.c++/classes.exp: Accept 'A const' or 'const A' in copy
constructors.
* gdb.c++/derivation.exp: Likewise.
* gdb.c++/templates.exp: Likewise.
* gdb.c++/virtfunc.exp: Likewise.
gdb.c++/inherit.exp, gdb.c++/method.exp,
gdb.c++/namespace.exp, gdb.c++/templates.exp,
gdb.c++/userdef.exp, gdb.c++/virtfunc.exp: Updates for v3 demangler
and class layout support.
* gdb.c++/templates.exp (test_template_breakpoints):
If we get an overload menu, but it does not match what
we expect, we still need to issue the "cancel" command.
* gdb.c++/templates.exp: Replace "void \\*" with "void ?\\*",
making the whitespace optional. Argument for "new" may be
"unsigned" as well as "unsigned int/long".
* gdb.c++/templates.exp: Replace "const &" with "const ?&",
making the whitespace optional. Also replace "(void) with
"((void|)), making the keyword "void" optional.
* gdb.c++/virtfunc.exp: Replace "const &" with "const ?&",
making the whitespace optional. Also replace "(void) with
"((void|)), making the keyword "void" optional.
* gdb.c++/overload.exp: Select overloadfnarg(void) or overloadfnarg(),
depending on what the symbol table contains.
* gdb.c++/derivation.exp: Accept both "foo(void)" and "foo()" in
the output of the ptype command. Similarly, accept both "const &"
and "const&".
significant in *un*mangled method names. Use strcmp_iw to compare
them, not STREQ. (Fix from Daniel Berlin.)
* gdb/testsuite/gdb.c++/userdef.exp: Check that GDB tolerates whitespace in
unmangled operator names.
file -- to prevent failing when the compile fails but we have no
intention of running the tests anyway.
* gdb.base/long_long.exp: Test target_info for no_long_long, skip
tests if set.
* gdb.base/maint.exp: Support 2 byte integers as well as 4 byte
integers.
* gdb.c++/ctti.exp: Skip tests if skip_cplus_tests returns true.
* gdb.c++/namespace.exp: Ditto.
Fix PR gdb/16.
* gdb.c++/classes.exp (do_tests): Change runto statements
from "runto 'foo(void)'" to "runto 'foo'". This makes the
statements demangler agnostic.
* gdb.c++/virtfunc.exp (do_tests): Likewise.
(gdb_virtfunc_restart): Likewise.
* gdb.c++/cplusfuncs.cc (dm_type_char_star): New function.
Helps the test script figure out which demangler is in use.
(dm_type_foo_ref): Ditto.
(dm_type_int_star): Ditto.
(dm_type_long_star): Ditto.
(dm_type_unsigned_int): Ditto.
(dm_type_void): Ditto.
(dm_type_void_star): Ditto.
* gdb.base/cplusfuncs.exp (probe_demangler): New function.
Probe the gdb demangler and set variables to accommodate
formatting differences.
(info_func_regexp): New function. Same as info_func, but
matches against a regexp.
(info_func): Match against a literal string.
(print_addr_2): New function. Match against a literal string,
which can be different from the input to gdb.
(print_addr): Simply call print_addr_2 with the same argument twice.
(test_lookup_operator_functions): Use demangler formatting variables.
Blow away the xfails and workarounds for gnats gdb bug gdb/18. Sort
the tests in the same order as the C++ class declaration.
(test_paddr_operator_functions): Ditto.
(test_paddr_overloaded_functions): Ditto.
(test_paddr_hairy_functions): Use demangler formatting variables.
Add reference to gdb/19 for related tests.
(do_tests): Call probe_demangler.