From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 9SRHHtSeYGo3ziQAWB0awg (envelope-from ) for ; Wed, 22 Jul 2026 06:43:32 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=F3ySr85P; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 5A3E61E099; Wed, 22 Jul 2026 06:43:32 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 1322A1E099 for ; Wed, 22 Jul 2026 06:43:31 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1F9BD4BA2E38 for ; Wed, 22 Jul 2026 10:43:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F9BD4BA2E38 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=F3ySr85P Received: from SA9PR02CU001.outbound.protection.outlook.com (mail-southcentralusazlp170130001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c10c::1]) by sourceware.org (Postfix) with ESMTPS id 6A1224BA2E0B for ; Wed, 22 Jul 2026 10:42:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6A1224BA2E0B Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=amd.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6A1224BA2E0B Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:c10c::1 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1784716970; cv=pass; b=F71igS6MrvgYvrK15zvmJEcwRT6bA5XlroM9+YkF8bTcLQn4px6vhXKR17JwH5dqXMC47GBCojzSEsQB1wKOP8Rbm030ohvpV4sl9gHEQOd4oJ5rQ6kivsXefsA/nE/vkUFb4nmZKTvc6QNuYM3CmQ6fVPc49AaGx2/OQnPN7ns= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1784716970; c=relaxed/simple; bh=mgTQx5SV982qx83rzdA2/tkMypaqmJ+uqkAFbn3pNFI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=lyHm3hsv4OlpNtpzcvMcyYJkbgpVk3gHq1UOakK2hqtGsZ/zB1AB19f7VG0BYjBSthUWu/c3Fq/44in20TfwOS8VEqnIiNbmZ9CT/zo0KW/aRkeGCm3U7JlDA1W+juCWVgSFyCu/p1cdMmZkw6sEjQMFS87cB0kCpQ+GeC6f/X4= ARC-Authentication-Results: i=2; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=F3ySr85P DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6A1224BA2E0B ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Wk7JIkBJX/07cMzXcKpyS648yChEbLNXQ5XhIjX8hTarW3/Ay7MD3X4CmUpCWC/qqoCkv9Y9BYm4eJeByeFk07UYAPz8+t87aCWDn7O2ESgwq30NYIjM0R5BeBI7UpT8DssUoZLEHc419z+2VYL9HI+GEO8jraZRRPaoYbWYIuIeWeTuODu53VM/IHrYBs0uRR6AHxkrY3vm73Mn2Usg0JrR6EePCe3PcBumNCD5zZLH0vZyeh95UXJUV8rWE8uxjpCTJoXglEVhFK7t3JcqOlPGNa4fZIWNh3/ijt4DXLnduie6tFd4APAXfoTvTeQnxWUNL1va+4MkiXpymr+S4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=eApGdotAOhIUNcIfKW/cZnJBZTbnOHd8aXMMb3jGVjo=; b=mISMDvnsyucOa3wkTxB4QHsbiqklDIcSyq3hWtYy2t+nbOCqeyvLX5o6XWl9CAJuhsdf5u1IrI9qcRkMBFi0+i4GiGmIhFo6hGDBFOPmyL5tnC2JEli4WUi0TDSe9fAWq/JbNESrZlPPxUK8WhL+iRp+Q3RnshzZRQovdrURTGFWvueQeZaE0+D1XHsEj14HtgAXXBM8lg+9TrbOC8k6rqUIDcCS7Z6j2EOWBaanhTGK6NZtkV/jdfoaBmC1/WzZMzKZv//8B/nlzE8YoVSb1b+rfbSvo0J2+B+/6BRLfJZJyTIDCA4aHgotqfuNC+voyjp57qMdQ5+OTiO6HU5Tgg== 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 (0) 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=eApGdotAOhIUNcIfKW/cZnJBZTbnOHd8aXMMb3jGVjo=; b=F3ySr85PFAuwwHGkpXOgQF6YV/ZQcbRqnoem758j8LgmA/q9iwmnNNIe6WcQJoWTAD8hYgwLQ/avpw2S+CThoSI3fMUPBkNhiCP9zwxRlxjbi0eYkyIScArQD10KtB3uHxRefYYt+zhLVhHu5N6gw3kHXFHqJCCGPc33QyotQMM= Received: from CH0PR03CA0112.namprd03.prod.outlook.com (2603:10b6:610:cd::27) by DS7PR12MB8276.namprd12.prod.outlook.com (2603:10b6:8:da::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.245.10; Wed, 22 Jul 2026 10:42:47 +0000 Received: from CH3PEPF00000013.namprd21.prod.outlook.com (2603:10b6:610:cd:cafe::11) by CH0PR03CA0112.outlook.office365.com (2603:10b6:610:cd::27) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.245.10 via Frontend Transport; Wed, 22 Jul 2026 10:42:46 +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=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by CH3PEPF00000013.mail.protection.outlook.com (10.167.244.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.270.0 via Frontend Transport; Wed, 22 Jul 2026 10:42:46 +0000 Received: from ctr-rack32-mi300x-1.amd.com (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Wed, 22 Jul 2026 05:42:43 -0500 From: Tankut Baris Aktemur To: CC: Subject: [PATCH v2 09/17] gdb: convert TYPE_NOTTEXT macro to type::is_nottext Date: Wed, 22 Jul 2026 05:41:58 -0500 Message-ID: <20260722-users-aktemur-type-instance-flags-v2-9-d60dcbc2a76f@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260722-users-aktemur-type-instance-flags-v2-0-d60dcbc2a76f@amd.com> References: <20260722-users-aktemur-type-instance-flags-v2-0-d60dcbc2a76f@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Mailer: b4 0.15.0 Content-Transfer-Encoding: 8bit X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: satlexmb08.amd.com (10.181.42.217) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PEPF00000013:EE_|DS7PR12MB8276:EE_ X-MS-Office365-Filtering-Correlation-Id: 1fdfa6e7-a7f3-42f0-3a2b-08dee7ddf81f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|36860700016|1800799024|23010399003|376014|22082099003|18002099003|11063799006|10067099003|56012099006|6133799003; X-Microsoft-Antispam-Message-Info: 2oL84jGTrcSuPYLBB2x1W3CXDR8w2vLWxfjG3VDPSdVJlOt1KlbIKyTQocGnONwlVa0iJ1Ylm3GNqpEVu1Xll0TCnnGXER4hykW7Yf37n0I3t8ZUsOh8tm8NPRHmYN03UI3eDq8fm4IU6gfPn+pJGH5u+58sneH8BwDmKyxr8b0oEcrsqHfgWTG72Rj8oP44sCbFt52X/QfcAGeaBdV3p+KzNMsFIdj+s4Uh51fk4mMBWhNRB2nrHAWHsjLoELVNXlIH35lSqdbBK6iuPHoGaOGK2mJtVLcj/y3UGMuJRuqC9m/cN6yl6X440Wxw9yQaMd9OL0O+UGeFe3+Vz/AldZFs+2CWg9f+aqwVnhAL08CkTMGX2PJCbP8XiQLLdcIkWrVfLTdDMyzQPNa9hwhhhT4yllnnae7E/6mZF1CalLDbrSDucfT2Y9fIl3+6PCA542lWrMzPKRW5pwUE2tbRhg1X0RjyE8XQdEZbP+LFoPmFQuOoZvawF76Rdl0zfJwfR1KzAxesSaRV13YIJrNIZvGP/CVo+DBfTrBYbe/XAz4coOUcfi3xKXX4ku4xRkMYnM9cXzBvgWX4xYzpGlVUAXkCH1q3wtG3iwa0+RaIyTEs0MiP9R/nHF26m9f1rlvutUFoLkcL7DPGfbuuZSpVAunTU9pVm6BREHDlbFIJAbAE60D+Vk0+PwAlVw53izHkEqLFlO5ci1A3Wfbc1XbD5A== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:satlexmb07.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(82310400026)(36860700016)(1800799024)(23010399003)(376014)(22082099003)(18002099003)(11063799006)(10067099003)(56012099006)(6133799003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wqSpDe5ti0+MmicU4sdJ57W38RQ3Us0XBBOBpQqL/7t8SJy/hw8lqp3NUlB1DvlF8hnXdMDxUMMIexnyYXTTn6zKcmmET5JIrSBJk4x8BiI35Av9rRPvoGqUGbWvJaOU77h5x/+nv8WUTA0jU0gsfjVmUji/Gg/U3gv/JRBdmYIXzcW5ndDbjQriyXboNyg3xKXufGauNXrolF10fp2J5zgddI5iuwMHuUkhoIrssSzuyFeGR4izL7XNiOxdx22tjfe3bbGGoX0DWqP8CkbapVRsCjQ0oYZUQLXPhv6+dHjPNlR+cs/yZxH2wu/vd2n7+UjutJz/1/5/r7NnQhT+nlK+WI5dpVqC4jRNngBGJkXbFYQhIvd45LkYGvHkl8VBIwyFnMobYGeBxpzsdBKc0/weYRX7Zqn1nlTdG2Z0+efpZfiK0sZpA+0NndMqiNS5 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2026 10:42:46.9243 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1fdfa6e7-a7f3-42f0-3a2b-08dee7ddf81f 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=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CH3PEPF00000013.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB8276 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Convert the TYPE_NOTTEXT macro to a method of the type class. This is a refactoring. --- gdb/c-valprint.c | 2 +- gdb/gdbtypes.c | 8 +++----- gdb/gdbtypes.h | 7 ++++++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index 9f9f61ea2e0..2ee65c41061 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -109,7 +109,7 @@ c_textual_element_type (struct type *type, char format) being used as data. */ if (true_type->code () == TYPE_CODE_INT && true_type->length () == 1 - && !TYPE_NOTTEXT (true_type)) + && !true_type->is_nottext ()) return 1; } diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index a866f36d1ea..dd73d9e624f 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -4126,7 +4126,7 @@ check_types_equal (struct type *type1, struct type *type2, || type1->endianity_is_not_default () != type2->endianity_is_not_default () || type1->has_varargs () != type2->has_varargs () || type1->is_vector () != type2->is_vector () - || TYPE_NOTTEXT (type1) != TYPE_NOTTEXT (type2) + || type1->is_nottext () != type2->is_nottext () || type1->instance_flags () != type2->instance_flags () || type1->num_fields () != type2->num_fields ()) return false; @@ -5091,10 +5091,8 @@ recursive_dump_type (struct type *type, int spaces) { gdb_puts (" TYPE_FIXED_INSTANCE"); } - if (TYPE_NOTTEXT (type)) - { - gdb_puts (" TYPE_NOTTEXT"); - } + if (type->is_nottext ()) + gdb_puts (" TYPE_NOTTEXT"); gdb_puts ("\n"); gdb_printf ("%*snfields %d ", spaces, "", type->num_fields ()); if (type->dyn_prop (DYN_PROP_ASSOCIATED) != nullptr diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 11a08428baf..176d3936661 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -168,7 +168,6 @@ struct type_instance_flags bool is_atomic : 1; }; -#define TYPE_NOTTEXT(t) (((t)->instance_flags ()).is_nottext) #define TYPE_CONST(t) (((t)->instance_flags ()).is_const) #define TYPE_VOLATILE(t) (((t)->instance_flags ()).is_volatile) #define TYPE_RESTRICT(t) (((t)->instance_flags ()).is_restrict) @@ -1201,6 +1200,12 @@ struct type this->m_instance_flags.is_nottext = flag; } + /* Return if this type is nottext. */ + bool is_nottext () const + { + return this->m_instance_flags.is_nottext; + } + /* Get the bounds bounds of this type. The type must be a range type. */ range_bounds *bounds () const { -- 2.34.1