From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7862) id 9BF26385841C; Fri, 11 Nov 2022 09:17:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9BF26385841C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668158259; bh=A0ne3CvmVDTNbZ+x2EuOyrkLKNAtQ4lG6X5AxRP0/MM=; h=From:To:Subject:Date:From; b=D1EvABxezbJ9HGYW2BvL0jFVCwLutAiVpG+lB05BCEctd7MYGMk6KXHbFpVHGs2dG Q41F7XoOF8EcRNoCKZik4VpLKtIlsSk8e7rekEIMq8pO22afvXq+hpuhAWkZlBBIs+ 1QtT0FUlM4CHjTyy7XqV24mnNVJrXdC/YWgIm1vk= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Bruno Larsen To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: disable some tests of gdb.cp/typeid.exp when using Clang X-Act-Checkin: binutils-gdb X-Git-Author: Bruno Larsen X-Git-Refname: refs/heads/master X-Git-Oldrev: ad9421bb1532bfd6ff14c6d841177a6e6d07fd27 X-Git-Newrev: ebe9ddbce72cb50e8d18663feafd48a7b172fab9 Message-Id: <20221111091739.9BF26385841C@sourceware.org> Date: Fri, 11 Nov 2022 09:17:37 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Debe9ddbce72c= b50e8d18663feafd48a7b172fab9 commit ebe9ddbce72cb50e8d18663feafd48a7b172fab9 Author: Bruno Larsen Date: Thu Sep 29 14:51:34 2022 +0200 gdb/testsuite: disable some tests of gdb.cp/typeid.exp when using Clang =20 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. =20 Approved-by: Tom Tromey 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)" =20 + 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 + } =20 - foreach simple_var {i cp ccp ca b} { + foreach simple_var $var { gdb_test "print &typeid($simple_var)" \ " =3D \\($type_re \\*\\) $hex.*"