From patchwork Sat Jul 17 14:44:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Indu Bhagat X-Patchwork-Id: 1506469 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=tecsTNdg; dkim-atps=neutral Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GRrXt6LyTz9sT6 for ; Sun, 18 Jul 2021 00:46:54 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9D70D383B833 for ; Sat, 17 Jul 2021 14:46:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D70D383B833 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1626533212; bh=zErH6h0xUYCMkG6CpCo/T7Mc6vLZasnYT3nwzmhaKOM=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=tecsTNdgNcTXJ0lZ+Q5DXfqUMfcX0hHbDy8ehOzBvdIXvfEbJxIZ2ICRNN+vuQput 4J64hrTl93TbmIiMwAnmAvadSCmWzxWHdpN/a73eJOuYJmAX/rjTE7iMXQN/kOtcns 0S5s4zWPzduOue1ZPo425s/+6C9bzbDNMeKsRaM8= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 4986D3855005 for ; Sat, 17 Jul 2021 14:44:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4986D3855005 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16HEg2C1001511 for ; Sat, 17 Jul 2021 14:44:29 GMT Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 39unmbgj33-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 17 Jul 2021 14:44:28 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 16HEetnj120525 for ; Sat, 17 Jul 2021 14:44:27 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2109.outbound.protection.outlook.com [104.47.58.109]) by aserp3020.oracle.com with ESMTP id 39uq11ck5s-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 17 Jul 2021 14:44:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VamdLg7FCPBK5wkJY4aEm6+qIY95XLGVxf10q0wUaVBPe4ToEK64ZZv0p46apPK97jtYhl72oNDzt+8VsYkjINWlJ0F2pF+YJt1I3787JO68iI6EIUaUU2MfnRYLOOC0jXko+5vRLxE/2tQH/HzXNUZT3t95yRlaR8CcALjrk4ey1V73v/gkWTlv1twi3OG8kVdtSpoBddEpEeq9/2sFDb/Dvt4SanvnJ/rYPj5E3AqK1BGiRJgsjj+2VXlD5pkGAMJC9xc5soNShczLErE5mguI3ptBd7yrmjjs6DK83P03x7EonPp4heLXylmZ4W9IlIbK9C0uokkSDWljdclpew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zErH6h0xUYCMkG6CpCo/T7Mc6vLZasnYT3nwzmhaKOM=; b=gCRuIW2rS+JtMHbbnBtsGYMvpu94gj4BvfOsAEXIr7C9j+hSSDi0VJ64QAKgy3QOoIdND4oBFRn5dBKsQyNlkEGIyS0/8EtrckKmAJdN8VpD5LZb8CiAdUfGZIl3yEbOOvajBiXo/0Kj57tMpbK3uameuM2oBvHy4r0OTCNrdv2on0luBPbYYjtTtup2KGCBCun1nQmotC2EpB9+z5LB6LD0bTY7driSeL34PW6o4AfB9JiKzrUadQ8+xglL1MMHj7Rxeadp6fBMoJa+CcBnipffsEwe5E9Pbfhjgho6SbTRl683Jl4VBoqFKvh300tKaFkFfCm6W6Sm8bIucUlZ8g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from BN6PR1001MB2147.namprd10.prod.outlook.com (2603:10b6:405:2e::26) by BN6PR10MB1315.namprd10.prod.outlook.com (2603:10b6:404:44::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.26; Sat, 17 Jul 2021 14:44:26 +0000 Received: from BN6PR1001MB2147.namprd10.prod.outlook.com ([fe80::6c5a:122e:1941:e875]) by BN6PR1001MB2147.namprd10.prod.outlook.com ([fe80::6c5a:122e:1941:e875%7]) with mapi id 15.20.4264.026; Sat, 17 Jul 2021 14:44:26 +0000 To: gcc-patches@gcc.gnu.org Subject: [PATCH 2/2] debug: Allow means for targets to opt out of CTF/BTF support Date: Sat, 17 Jul 2021 07:44:18 -0700 Message-Id: <1626533058-12491-3-git-send-email-indu.bhagat@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1626533058-12491-1-git-send-email-indu.bhagat@oracle.com> References: <1626533058-12491-1-git-send-email-indu.bhagat@oracle.com> X-ClientProxiedBy: MWHPR04CA0048.namprd04.prod.outlook.com (2603:10b6:300:ee::34) To BN6PR1001MB2147.namprd10.prod.outlook.com (2603:10b6:405:2e::26) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from ibhagatpc.hitronhub.home (24.80.24.133) by MWHPR04CA0048.namprd04.prod.outlook.com (2603:10b6:300:ee::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend Transport; Sat, 17 Jul 2021 14:44:25 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 273af462-abbf-4689-9336-08d949315fe9 X-MS-TrafficTypeDiagnostic: BN6PR10MB1315: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 79Te6ToDYl5qkOYCB2Ysf97h8cdOaJ28sBREOjUvAtYJWgJ/lfyzDJZSsQsmCNp9Bx3+ZWhE5kfExzjkGyvhfUIMViudXDJVDCkmkiD0bFHTE5tvuTEU3NpAeMh4d9npJSDvuR7uHOpsW6iCdL3275vNeR5MA1+2HWtm2rnvTWzCLVAtdayl/kReb/Lxew0gcKkW6uQD2hFA1DjaSsaFRpkKr3znuxh7Fau51P+cYEArY/3f5uJfpxrekhDar5zTxhSnWsldsQCMF7AiVlPwsG8NB9Hh8DbTgtr1u4sXY/Rp9pu/qN7t7QwHTApWQLNpJXfs2XljhH1tzaSeVktURW2PiKgAX66k1FTfoMee8v3K5sCt3QAirMR+F0FS1gMbSn/FaxrchPtTEpht5DsdMvS1Os66a6rF7lzfGAnYgMt9U2uueR2jxnczRhST5hkXlJ+VuMISBSZ5I6rqxEVDgr6hgigmj8T+TAE1pb1PSwf8ncyN970aoOXT7Fmqul2gzDUoH82ZOkuTsySflEDO1qL5GL0FFGlXbhpLhljA/fAw3VKdhP983uLpe/zdq/QrlXh3lk9qSQ4xAEDZxX+YVC+IFV3SAr4PJ23nNSST753pD1IAOUnfu/dVDtqBYbXwziieJBruJMnsF2pKP5lXKvAO5fg+JqDcXYGsggd8qkq0romK8204BmXUQPgFcAKzpyaPZEfzGVLhXRJRmiJJDpfNQmX14B1GzBB8rVCqimbpU+lknvQY0g7G44IxMMLdCIvime1wxVvfbRY/AyIZkkxuwjp9nAqZ5NudUXYVr1Kp53IVRcTPELssG7eLXWLa X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR1001MB2147.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(346002)(136003)(396003)(366004)(376002)(39860400002)(36756003)(956004)(6486002)(8676002)(6666004)(316002)(8936002)(2616005)(6916009)(6512007)(38100700002)(478600001)(52116002)(26005)(44832011)(186003)(2906002)(38350700002)(6506007)(86362001)(66556008)(66476007)(66946007)(83380400001)(5660300002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xX+eHEuMGcuf1nGUBSBV2NZBKyzlRy+QEJoj93hJPY5NSdy8ahxWHGgjA3RePRomW0avZKlYimDuJLFcrKutyq2JcwA8ey4owvoMGRkHLwEDHTxZXNh2s1YFw/s0ZAMcqpZY0DDMbiybH+lvjWwRkDgG7yljPyi3WBjzrM7XL7e5DQoJ9AKuSEROVN318FmAtOaB7yH9+KqLzKgfOSNmJ6IPErpRvBtYvGrRUn8lO6/cSky13hp5kbghmCXbDDepC2/dnosC4L5rld96rKTS2IvsnK3Wn/7sVAqDlMRM0/EjqWVctZaLLs3Z8e49Zi5ZLU2qvW+ePjlA3kvbslrcZWMKLR8fR7N9x21Wkr76xny2TLdNObV4eEBW6DsjrDlZSiqUg3NpYy/Ch6I5rekx23M3muXAy9Fa2yuAZ6pjruEXCNpxMfgnRCYyWHL7b+ldjmfNfnB/XEBleMSM7hZjdrzyvunMoLWQkAlg+iUFH8OC9qKa6T+FKMsXti3RIm1O7y6NHU/hTgkSW8jY6DuI1ojFHb9VK610TvMfJcCevnXBi/xDb/Ip4/vJCVGAYCaq6jGIh/uEKXfHWy0Lld+9JlCEXYHxOpRkWfNqajIMLM5vt7sanj+WN6nmpOcXHAC41f+43Y+nz6eEPfCvpN+lAXOXREI2Bt+rvh/yCYJ4R2klpkpoxOv5Io1DZrDhDG1hRSokiqFzHLbOD18/sHHU/z6MPc6VVHxUu1EmHQ9ANMVA+YG+WWYuzKnLhZ8iua9O9JLblUAfB0PIhn7ErLchO4cASpAJxqNEgcQiTrpEDKVRorp1A+qCgWxM+mMFZpvNQhNe5aIQxW0l4nptnh0oo1v2SXdI412rckdjj2EY66sMKnBhYPyQyxV5VOUDiFC4cxOzT5yfFK9qDOze/xL/iPHJQrZcUFFd4cco5elBWzxAq8oALlc4ln+WtpCyMo+6NdIl7JYB4OR+cw1Yzbeeclgtva3mz7n4vDfXWd2Su7Liqn+0obOSwNzoLHljsd8hS0nmKdt3SUX46yaxvunrL9+xKF0/3JDxPhJ7e3tRB5uCb2m1oKikbCp1gxgf03eogv8iVkgHioYJO29aAD/UOdet4FsluL+/P7giUqQ6W/dlsyJ6z6zYx9RhTlTfQiCjt7IP20Fl7tAynK5p44YE1NMkEHjIEz+khxVdYhrmCNEFKLye6YcdY6+b6OmKCpA9Gd+zan9UbGMbHH5tUVS6aOtsNWOgeTOsYXZfSmk+jXKfz/+59wad5FWo1HDF+lIbGPlmijNPFjcXfjZYRpgLqb24/7xFDWZtlDFG6oxOC15mWwGvX0tVnX5D1K48i5O1 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 273af462-abbf-4689-9336-08d949315fe9 X-MS-Exchange-CrossTenant-AuthSource: BN6PR1001MB2147.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2021 14:44:26.3212 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: uq17GeITMLKT+GiFW8FrulkOFoPbWQnr+sBVbio0egSQ+L8D3MOmWYzmCosCiL5dSgWkBsJRpb1Vx7BItJlEwQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR10MB1315 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10047 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 bulkscore=0 spamscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107170087 X-Proofpoint-GUID: 5icunzAr1Us94UOMPVyXV_jUy0CnGmWa X-Proofpoint-ORIG-GUID: 5icunzAr1Us94UOMPVyXV_jUy0CnGmWa X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Indu Bhagat via Gcc-patches From: Indu Bhagat Reply-To: Indu Bhagat Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" CTF/BTF debug formats can be safely enabled for all ELF-based targets by default in GCC. CTF/BTF debug formats now adopt a similar approach as taken for DWARF debug format via the DWARF2_DEBUGGING_INFO. - By default, CTF/BTF formats can be enabled for all ELF-based targets. - By default, CTF/BTF formats can be disabled for all non ELF-based targets. - If the user passed a -gctf but CTF is not enabled for the target, GCC issues an error to the user (as is done currently with other debug formats) - "target system does not support the 'ctf' debug format". Analogous behavior for -gbtf command line option. A previous commit disabled the CTF and BTF testcases on the AIX platform. This is not necessary now that CTF and BTF debug formats are disabled by default on all non-ELF targets. GCC emits an error message when -gctf/-gbtf is used on such platforms and these tests will be skipped. gcc/Changelog: * config/elfos.h (CTF_DEBUGGING_INFO): New definition. (BTF_DEBUGGING_INFO): Likewise. * doc/tm.texi.in: Document the new macros. * doc/tm.texi: Regenerated. * toplev.c: Guard initialization of debug hooks. gcc/testsuite/Changelog: * gcc.dg/debug/btf/btf.exp: Do not run BTF testsuite if target does not support BTF format. Remove redundant check for AIX. * gcc.dg/debug/ctf/ctf.exp: Do not run CTF testsuite if target does not support CTF format. Remove redundant check for AIX. * lib/gcc-dg.exp: Remove redundant check for AIX. --- gcc/config/elfos.h | 8 ++++++++ gcc/doc/tm.texi | 26 ++++++++++++++++++++++++++ gcc/doc/tm.texi.in | 26 ++++++++++++++++++++++++++ gcc/testsuite/gcc.dg/debug/btf/btf.exp | 16 +++++++++------- gcc/testsuite/gcc.dg/debug/ctf/ctf.exp | 16 +++++++++------- gcc/testsuite/lib/gcc-dg.exp | 1 - gcc/toplev.c | 11 +++++++++-- 7 files changed, 87 insertions(+), 17 deletions(-) diff --git a/gcc/config/elfos.h b/gcc/config/elfos.h index 7a736cc..e5cb487 100644 --- a/gcc/config/elfos.h +++ b/gcc/config/elfos.h @@ -68,6 +68,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define DWARF2_DEBUGGING_INFO 1 +/* All ELF targets can support CTF. */ + +#define CTF_DEBUGGING_INFO 1 + +/* All ELF targets can support BTF. */ + +#define BTF_DEBUGGING_INFO 1 + /* The GNU tools operate better with dwarf2, and it is required by some psABI's. Since we don't have any native tools to be compatible with, default to dwarf2. */ diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 3ad3944..c8f4abe 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -9947,6 +9947,8 @@ This describes how to specify debugging information. * File Names and DBX:: Macros controlling output of file names in DBX format. * DWARF:: Macros for DWARF format. * VMS Debug:: Macros for VMS debug format. +* CTF Debug:: Macros for CTF debug format. +* BTF Debug:: Macros for BTF debug format. @end menu @node All Debuggers @@ -10374,6 +10376,30 @@ behavior is controlled by @code{TARGET_OPTION_OPTIMIZATION} and @code{TARGET_OPTION_OVERRIDE}. @end defmac +@need 2000 +@node CTF Debug +@subsection Macros for CTF Debug Format + +@c prevent bad page break with this line +Here are macros for CTF debug format. + +@defmac CTF_DEBUGGING_INFO +Define this macro if GCC should produce debugging output in CTF debug +format in response to the @option{-gctf} option. +@end defmac + +@need 2000 +@node BTF Debug +@subsection Macros for BTF Debug Format + +@c prevent bad page break with this line +Here are macros for BTF debug format. + +@defmac BTF_DEBUGGING_INFO +Define this macro if GCC should produce debugging output in BTF debug +format in response to the @option{-gbtf} option. +@end defmac + @node Floating Point @section Cross Compilation and Floating Point @cindex cross compilation and floating point diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index f881cda..9c4b501 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -6613,6 +6613,8 @@ This describes how to specify debugging information. * File Names and DBX:: Macros controlling output of file names in DBX format. * DWARF:: Macros for DWARF format. * VMS Debug:: Macros for VMS debug format. +* CTF Debug:: Macros for CTF debug format. +* BTF Debug:: Macros for BTF debug format. @end menu @node All Debuggers @@ -6994,6 +6996,30 @@ behavior is controlled by @code{TARGET_OPTION_OPTIMIZATION} and @code{TARGET_OPTION_OVERRIDE}. @end defmac +@need 2000 +@node CTF Debug +@subsection Macros for CTF Debug Format + +@c prevent bad page break with this line +Here are macros for CTF debug format. + +@defmac CTF_DEBUGGING_INFO +Define this macro if GCC should produce debugging output in CTF debug +format in response to the @option{-gctf} option. +@end defmac + +@need 2000 +@node BTF Debug +@subsection Macros for BTF Debug Format + +@c prevent bad page break with this line +Here are macros for BTF debug format. + +@defmac BTF_DEBUGGING_INFO +Define this macro if GCC should produce debugging output in BTF debug +format in response to the @option{-gbtf} option. +@end defmac + @node Floating Point @section Cross Compilation and Floating Point @cindex cross compilation and floating point diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf.exp b/gcc/testsuite/gcc.dg/debug/btf/btf.exp index e173515..15593fd 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf.exp +++ b/gcc/testsuite/gcc.dg/debug/btf/btf.exp @@ -24,11 +24,6 @@ if { [istarget nvptx-*-*] } { return } -if { [istarget "powerpc-ibm-aix*"] } { - set torture_execute_xfail "powerpc-ibm-aix*" - return -} - # If a testcase doesn't have special options, use these. global DEFAULT_CFLAGS if ![info exists DEFAULT_CFLAGS] then { @@ -39,8 +34,15 @@ if ![info exists DEFAULT_CFLAGS] then { dg-init # Main loop. -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\] ]] \ - "" $DEFAULT_CFLAGS +set comp_output [gcc_target_compile \ + "$srcdir/$subdir/../trivial.c" "trivial.S" assembly \ + "additional_flags=-gbtf"] +if { ! [string match "*: target system does not support the * debug format*" \ + $comp_output] } { + remove-build-file "trivial.S" + dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\] ]] \ + "" $DEFAULT_CFLAGS +} # All done. dg-finish diff --git a/gcc/testsuite/gcc.dg/debug/ctf/ctf.exp b/gcc/testsuite/gcc.dg/debug/ctf/ctf.exp index 0b650ed..7ad6723 100644 --- a/gcc/testsuite/gcc.dg/debug/ctf/ctf.exp +++ b/gcc/testsuite/gcc.dg/debug/ctf/ctf.exp @@ -24,11 +24,6 @@ if { [istarget nvptx-*-*] } { return } -if { [istarget "powerpc-ibm-aix*"] } { - set torture_execute_xfail "powerpc-ibm-aix*" - return -} - # If a testcase doesn't have special options, use these. global DEFAULT_CFLAGS if ![info exists DEFAULT_CFLAGS] then { @@ -39,8 +34,15 @@ if ![info exists DEFAULT_CFLAGS] then { dg-init # Main loop. -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\] ]] \ - "" $DEFAULT_CFLAGS +set comp_output [gcc_target_compile \ + "$srcdir/$subdir/../trivial.c" "trivial.S" assembly \ + "additional_flags=-gctf"] +if { ! [string match "*: target system does not support the * debug format*" \ + $comp_output] } { + remove-build-file "trivial.S" + dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\] ]] \ + "" $DEFAULT_CFLAGS +} # All done. dg-finish diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 81f4bb2..7edd070 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -641,7 +641,6 @@ proc gcc-dg-frontend-supports-ctf { target_compile trivial } { proc gcc-dg-target-supports-debug-format { target_compile trivial type } { global srcdir subdir - if {$type == "-gctf" && [istarget *-*-aix*]} { return 0 } set comp_output [$target_compile \ "$srcdir/$subdir/$trivial" "trivial.S" assembly \ "additional_flags=$type"] diff --git a/gcc/toplev.c b/gcc/toplev.c index 43f1f7d..14d1335 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1463,8 +1463,15 @@ process_options (void) debug_hooks = &xcoff_debug_hooks; #endif #ifdef DWARF2_DEBUGGING_INFO - else if (dwarf_debuginfo_p () - || dwarf_based_debuginfo_p ()) + else if (dwarf_debuginfo_p ()) + debug_hooks = &dwarf2_debug_hooks; +#endif +#ifdef CTF_DEBUGGING_INFO + else if (ctf_debuginfo_p ()) + debug_hooks = &dwarf2_debug_hooks; +#endif +#ifdef BTF_DEBUGGING_INFO + else if (btf_debuginfo_p ()) debug_hooks = &dwarf2_debug_hooks; #endif #ifdef VMS_DEBUGGING_INFO