From patchwork Tue Feb 7 13:27:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lancelot SIX X-Patchwork-Id: 64447 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BD0103858C36 for ; Tue, 7 Feb 2023 13:28:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD0103858C36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675776539; bh=gFSoTKJzHzKCasQ75AKHkg/kGPdIEdO8DkptA0pTfu4=; h=To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=t0wZfjaVg7Vok7462uDKLCPOFCJOc4V58FCfw9YCDqqJ5A+IfpWQOifeNiaw/L7zr /JNnP8jMgYhW02YqPG+vJsgtecR0ICdsN4wfEUPxug3/jEmLT7+jdXs/W4YKFmMHaF 1tefXC92CSW8GHU8KKmxVkibxU4WvcdahxLFQwxM= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2081.outbound.protection.outlook.com [40.107.92.81]) by sourceware.org (Postfix) with ESMTPS id 24E3B3858D33 for ; Tue, 7 Feb 2023 13:28:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 24E3B3858D33 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gP7AJlzYwMlqP0vQCOE/DqSREQsqyRpfM0wtRAVfjrPDhJAwMok9b8hirubJH4DGMNKSpmEXZj/ZDJeAgFc1eqbD8qsAw2/FGzn1IVdhCjKjdsICLA9L8zW1GuRJLBH+1Hh8Gr0DHlWyJkvqB/1d2sVbUZ5uo/FYJ2iqZv0cMZ/oMOrRFk7ElPLEk8J2Wtct0VwUBF/Ia/n2qNP95NEtK4PryG0e/oKho3Omd0UfJsWR4N7+TfPpENIbDPBa+ntNzUwVKrXFRuOH9/i2me/qRL3LMR4oCERWLHM3vOjP25TmcEiz1ezsE12ttpisjdwNDqYu9QwYlBObgBV11elTuw== 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=gFSoTKJzHzKCasQ75AKHkg/kGPdIEdO8DkptA0pTfu4=; b=V8+PBXjGd6O7NGUelvg2p9WXVhkCy+Vmu2gPsTWeaHeml8C9pQAv6sxYSymJvBdPqFFNa5BR7x6GRPzMt3eCRTu0y1m3NGzSjm8tEK+3tr+aaZ9e6jS1VlVqi9Di9YFZMfVzheNOl6b74qqKG4Hpe6ZS/LVsV3wON6EYF0oh0l4NlbLF+INlabvCzoF9s/XC0uBvWlMBRgKvXaRZIuQrRY6EsG8GICCh5ctOSfhnZC5c1yD9I377e7YiXDafQh8peTitIgpR3yGR8rHRXyzGSJvrHCUHxV3sO2FAtGG/7FBJ2rLNhlJZADp8B6ghF2gDcjf1cCBcZ3Ukz/KmLsSGVA== 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 Received: from DM6PR11CA0014.namprd11.prod.outlook.com (2603:10b6:5:190::27) by PH8PR12MB6963.namprd12.prod.outlook.com (2603:10b6:510:1be::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34; Tue, 7 Feb 2023 13:28:31 +0000 Received: from DM6NAM11FT010.eop-nam11.prod.protection.outlook.com (2603:10b6:5:190:cafe::55) by DM6PR11CA0014.outlook.office365.com (2603:10b6:5:190::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.35 via Frontend Transport; Tue, 7 Feb 2023 13:28:31 +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 DM6NAM11FT010.mail.protection.outlook.com (10.13.172.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6086.16 via Frontend Transport; Tue, 7 Feb 2023 13:28:31 +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; Tue, 7 Feb 2023 07:28:29 -0600 To: CC: , Lancelot SIX Subject: [PATCH 1/4] gdb: 'show config' shows --with[out]-amd-dbgapi Date: Tue, 7 Feb 2023 13:27:59 +0000 Message-ID: <20230207132802.223510-2-lancelot.six@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230207132802.223510-1-lancelot.six@amd.com> References: <20230207132802.223510-1-lancelot.six@amd.com> MIME-Version: 1.0 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: DM6NAM11FT010:EE_|PH8PR12MB6963:EE_ X-MS-Office365-Filtering-Correlation-Id: f14cdb54-b776-4975-095d-08db090f3491 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ngPlWjL9rMHMlidC2GFo5w9wijeWUBqwl14F4eqEMFQ3NPFS+DihwcVrhUp7K0uEn+m3b72HVd5JNnYr271YNIdVNKsm5y6QvY9Ft6SUtp5SQi0RRWviE6njqSjuTFrz798qUiUFqsrTm0SQWoqChLpoUmRA/g+qwU4cMIoqJKJK+AE37lA6XgTxpn2muuC7nXuCreAN9bQlPDB9dsIB3L+pX8dtE1q8DvNvZBiUFsDDw9QEu5BKePGNsxXpHLhLyKRSHM0d8f44GDFxk1RWera4v/r9JPXS8TZDRnfDFo6eHQwJ6FZE+ZhJkv9srTTIUj3Ww1+5nbz452oN6hnWKSwGLnI6n9Snhbc/J86v4l9/qk+sq3rJbUhckurY9vM3DVzEbPo1OTr/UUeFwCEYqGJEGywgFB1FXfdObQvgDQsowK1rPNg2A1DwUC/h4fdYwd5iaGSbM6F7stcRdv6+vroP3l3tLI/nK88pGS5Mm/5qzFMcPLj5oMhC36JQCDquuxqSFfiQrX/l2XleoyA64rxZh3Mmo8LF4QHm5F9NXDkfvUNUb5mynk6JLQnk8KaQDIYE7fd54M/0GXjlBtJ7vqncam9fkhKHr1YnM8qzOwAsRyJVeAoGoXESgH4gFq7sibb8yVJEOeosSVWoRJtuu+XOqSftWXcVWMOaFFQn/kulAyARrFUwK6oLVj/GiVWGnvakQUDR0EsNja1jIj5/uhJ7XRsAn6CgaMutY2OWQu8= 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)(136003)(39860400002)(376002)(346002)(396003)(451199018)(40470700004)(36840700001)(46966006)(45080400002)(478600001)(7696005)(54906003)(316002)(1076003)(2616005)(82310400005)(16526019)(186003)(6666004)(26005)(36756003)(5660300002)(86362001)(40460700003)(82740400003)(426003)(47076005)(40480700001)(4326008)(83380400001)(336012)(70206006)(8676002)(70586007)(6916009)(2906002)(81166007)(36860700001)(356005)(8936002)(41300700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2023 13:28:31.3199 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f14cdb54-b776-4975-095d-08db090f3491 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: DM6NAM11FT010.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB6963 X-Spam-Status: No, score=-11.4 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Lancelot SIX via Gdb-patches From: Lancelot SIX Reply-To: Lancelot SIX Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" 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..2447ba55bca 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-dbapi\n\ +")); +#endif + #if HAVE_SOURCE_HIGHLIGHT gdb_printf (stream, _("\ --enable-source-highlight\n\