public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Bruno Larsen <blarsen@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: disable some tests of gdb.cp/typeid.exp when using Clang Date: Fri, 11 Nov 2022 09:17:37 +0000 (GMT) [thread overview] Message-ID: <20221111091739.9BF26385841C@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ebe9ddbce72cb50e8d18663feafd48a7b172fab9 commit ebe9ddbce72cb50e8d18663feafd48a7b172fab9 Author: Bruno Larsen <blarsen@redhat.com> Date: Thu Sep 29 14:51:34 2022 +0200 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> Diff: --- gdb/testsuite/gdb.cp/typeid.exp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.cp/typeid.exp b/gdb/testsuite/gdb.cp/typeid.exp index 6411217191a..fd8e96276c5 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.*"
reply other threads:[~2022-11-11 9:17 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221111091739.9BF26385841C@sourceware.org \ --to=blarsen@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).