From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2057.outbound.protection.outlook.com [40.107.243.57]) by sourceware.org (Postfix) with ESMTPS id A58BA3858C60 for ; Thu, 9 Feb 2023 11:26:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A58BA3858C60 Authentication-Results: sourceware.org; dmarc=fail (p=quarantine dis=none) header.from=amd.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BvWk3ZqYT3m86FKMgzqUTT30J1wqc89AVM7YPX9FZQvYlUb2zS0hs2zLoC20UD8bQU2LEl+hXaF5HmPmF56j1EfJC3zu7JBdTdz0+vVMTj6HCJKrqabfsy+7Gm1dZA/QWukVoA+qEyxBJEnDSWYqMy2PgfD3FZnBV++QuURXl12w1PvYJ74114VlbFyQ/oGwp/ggpwe2DRmO3XUJ8sRP62Xq2yMXBMOKAtkgMqmbyCIDKeNMToRuWoe3M0+0h0zf59UW6E6qXGpljTuteq4jLM/EUka+Lup4KdmNaKdh6yp2jSYIH6kMqi7uib+awAPBXNuLBTS+vRvhc2/WjzHveg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YpqhxEupvDnU+PNW8ZJtjtPsJEa5C/l7bMyvXND9EAY=; b=EMucK6L+L654nInlol67dv+SamyFvDWl/YwPFGBw304h0s5E/QujwsR0LYbyt+RVaNLZyjqNsnUCEen8v6epV1rnj6+qTBD6lP/Dkg/9gBzQi7++KDLVlKHTlC/cHGeg6uRIesgoIapdK/9UYyQa3lwo/SL/i8wJ6zdIYezDoNL6VLm8GG1UkJle2GCAVKMcJDKWSWE9C+XA9BSy9olN7UM7eqedRodjYBiNkV158cgrU/NJvrzJV9jX9NkJRENCznobGRyyBa0INYcVck/Nw50GGEbUzV/CdSFP9JzY3ZPXM3ixMxKaURTtUt3Idct6AWGd6Wr3Gr4jCtyAgPnKvQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=sourceware.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YpqhxEupvDnU+PNW8ZJtjtPsJEa5C/l7bMyvXND9EAY=; b=q6WHxMZ7DmlteoEMtqA9EZ/CIj2Z7qhn1H3U+mz2kGiMgLSyXzgdoH2UbnjPfQU2BjBBKddjmTcUNGQ25fraV22EzyB7fX9bgBTNQpcxIJ+hH9AUpy5VSLbVJa1gha+JdXZ9TclKWu1VsMYIXYki3dM/lNei+XqlLQ/gbOB0uFk= Received: from BLAPR03CA0144.namprd03.prod.outlook.com (2603:10b6:208:32e::29) by SA1PR12MB6725.namprd12.prod.outlook.com (2603:10b6:806:254::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.36; Thu, 9 Feb 2023 11:26:33 +0000 Received: from BL02EPF00010208.namprd05.prod.outlook.com (2603:10b6:208:32e:cafe::eb) by BLAPR03CA0144.outlook.office365.com (2603:10b6:208:32e::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.19 via Frontend Transport; Thu, 9 Feb 2023 11:26:32 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BL02EPF00010208.mail.protection.outlook.com (10.167.241.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6064.21 via Frontend Transport; Thu, 9 Feb 2023 11:26:32 +0000 Received: from khazad-dum.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 9 Feb 2023 05:26:31 -0600 From: Lancelot SIX To: CC: , Lancelot SIX Subject: [PATCH v2 1/5] gdb: 'show config' shows --with[out]-amd-dbgapi Date: Thu, 9 Feb 2023 11:26:09 +0000 Message-ID: <20230209112613.922098-2-lancelot.six@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230209112613.922098-1-lancelot.six@amd.com> References: <20230209112613.922098-1-lancelot.six@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF00010208:EE_|SA1PR12MB6725:EE_ X-MS-Office365-Filtering-Correlation-Id: a05cd059-4328-4718-3368-08db0a907f25 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Z+0z4nDIamIuboXbE4jooaD6SORvb+weyPXskigY+HiRScNrpBFQGZy6KQoBFRXgaUwJk0/0F6qRMI879VsEwVrKGPAPrLV6JDNiN3RUIOybgQ4nySrV+CWAvDQTuuMXi2OGOGbXrn6Flyqnwc5cQVOXBD/fYfsj3Tf8uf9Ah5lJB5oOTbx7g1bUTfKtZlW5nqee5U76U9HlU7mdyPjwVpTmevBxBDBRjfOBs2td/zAzzND2kBhQE0Y7XC49i7K9mOclhJoQMNSUs9StUsGRZjVTmTfkod81Rd4BN/ECRwukKis2dUVuYVSGm1KQXh3CJcrfZM15AR8nn3ewcrwD9ZV/XFM/7VI1M5RyqJvogzBIi3i1weJcx2Hu80yUrPvMeW1PloNw/yLHw3C3JJM+uLghULG8G9fo1YI/Uit5da9qMb7jl3NI91Dr6BlyIxwBpTf8iUVj8e51g3u+lcjURIGMok6f6iaBGu4RuhhcJ2xBqUYtZbZAyYuCvnfSndmG8dfeDjJynYHkmk1rzF4PejpHk6rMDe6T7ugGyo8HOBLu7ba4FpDhN3B+vFH+xzY5n+Kipvx+OKt6QgYPQRMUaKr+IMjQvuHqpQt9AcayC3sYpvy5SXkcUEltmLi+e/lg+QvC7Z1Tdt2+S0yi9QNsPMiUWJo2AB1lrQhvtkG1UkXFAcQFapgu/wsakk9QBI7vKmNfYjHw53aVNBtZfnOBwqwKD+ZHUBbCIWiOTH2TGeY= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230025)(4636009)(346002)(376002)(39860400002)(396003)(136003)(451199018)(40470700004)(36840700001)(46966006)(2906002)(40460700003)(356005)(5660300002)(82740400003)(81166007)(6666004)(47076005)(36756003)(7696005)(2616005)(86362001)(478600001)(336012)(1076003)(26005)(16526019)(6916009)(40480700001)(82310400005)(8676002)(70586007)(70206006)(36860700001)(8936002)(41300700001)(4326008)(83380400001)(426003)(316002)(186003)(54906003)(45080400002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2023 11:26:32.6989 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a05cd059-4328-4718-3368-08db0a907f25 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF00010208.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6725 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Ensure that the "show configuration" command and the "--configuration" command line switch shows if GDB was built with the AMDGPU support or not. This will be used in a later patch in this series. --- gdb/config.in | 3 +++ gdb/configure | 3 +++ gdb/configure.ac | 1 + gdb/top.c | 10 ++++++++++ 4 files changed, 17 insertions(+) diff --git a/gdb/config.in b/gdb/config.in index 7da131ebf04..a6027847444 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -84,6 +84,9 @@ */ #undef HAVE_ALLOCA_H +/* Define if amd-dbgapi is being linked in. */ +#undef HAVE_AMD_DBGAPI + /* Define to 1 if you have the `btowc' function. */ #undef HAVE_BTOWC diff --git a/gdb/configure b/gdb/configure index 113b7cf8a30..8b2039912e7 100755 --- a/gdb/configure +++ b/gdb/configure @@ -18252,6 +18252,9 @@ $as_echo "yes" >&6; } fi if test "$has_amd_dbgapi" = "yes"; then + +$as_echo "#define HAVE_AMD_DBGAPI 1" >>confdefs.h + TARGET_OBS="$TARGET_OBS amd-dbgapi-target.o" # If --enable-targets=all was provided, use the list of all files depending diff --git a/gdb/configure.ac b/gdb/configure.ac index 7c7bf88b3fb..79eb013ce19 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -275,6 +275,7 @@ if test "$gdb_require_amd_dbgapi" = true \ [has_amd_dbgapi=yes], [has_amd_dbgapi=no]) if test "$has_amd_dbgapi" = "yes"; then + AC_DEFINE(HAVE_AMD_DBGAPI, 1, [Define if amd-dbgapi is being linked in.]) TARGET_OBS="$TARGET_OBS amd-dbgapi-target.o" # If --enable-targets=all was provided, use the list of all files depending diff --git a/gdb/top.c b/gdb/top.c index 205eb360ba3..1b189d7c5ab 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -1629,6 +1629,16 @@ This GDB was configured as follows:\n\ ")); #endif +#if HAVE_AMD_DBGAPI + gdb_printf (stream, _("\ + --with-amd-dbgapi\n\ +")); +#else + gdb_printf (stream, _("\ + --without-amd-dbgapi\n\ +")); +#endif + #if HAVE_SOURCE_HIGHLIGHT gdb_printf (stream, _("\ --enable-source-highlight\n\ -- 2.34.1