diff options
author | Bruno Larsen <blarsen@redhat.com> | 2022-09-29 14:51:34 +0200 |
---|---|---|
committer | Bruno Larsen <blarsen@redhat.com> | 2022-11-11 10:13:45 +0100 |
commit | ebe9ddbce72cb50e8d18663feafd48a7b172fab9 (patch) | |
tree | 77023e94950d9fc46ab1bf8922dcc49af3bf4aa4 /gdb | |
parent | ad9421bb1532bfd6ff14c6d841177a6e6d07fd27 (diff) | |
download | gdb-ebe9ddbce72cb50e8d18663feafd48a7b172fab9.zip gdb-ebe9ddbce72cb50e8d18663feafd48a7b172fab9.tar.gz gdb-ebe9ddbce72cb50e8d18663feafd48a7b172fab9.tar.bz2 |
gdb/testsuite: disable some tests of gdb.cp/typeid.exp when using Clang
Since Clang chooses to not add any debug information for base types,
expecting it to be included with libraries' informations, gdb.cp/typeid.exp
will always fail if the program hasn't started. This commit fixes that by
making it so when using Clang, the base type variables aren't tested.
Approved-by: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/gdb.cp/typeid.exp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.cp/typeid.exp b/gdb/testsuite/gdb.cp/typeid.exp index 6411217..fd8e962 100644 --- a/gdb/testsuite/gdb.cp/typeid.exp +++ b/gdb/testsuite/gdb.cp/typeid.exp @@ -29,8 +29,16 @@ proc do_typeid_tests {started} { # We might see the standard type or gdb's internal type. set type_re "(std::type_info|gdb_gnu_v3_type_info)" + set var {ca b} + if {$started || ![test_compiler_info clang-*-* c++]} { + # Clang doesn't place type information for the base types in + # the executable, and relies on this being linked in from the + # standard library. As a result, type information for these + # variables is only available once the inferior is started. + lappend var i cp ccp + } - foreach simple_var {i cp ccp ca b} { + foreach simple_var $var { gdb_test "print &typeid($simple_var)" \ " = \\($type_re \\*\\) $hex.*" |