From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id tyj8D1u/X2rpZSEAWB0awg (envelope-from ) for ; Tue, 21 Jul 2026 14:50:03 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=L51wFXwU; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 2CD2C1E033; Tue, 21 Jul 2026 14:50:03 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 5D8401E033 for ; Tue, 21 Jul 2026 14:50:02 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A144F4BA2E08 for ; Tue, 21 Jul 2026 18:50:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A144F4BA2E08 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=L51wFXwU Received: from omta36.uswest2.a.cloudfilter.net (omta36.uswest2.a.cloudfilter.net [35.89.44.35]) by sourceware.org (Postfix) with ESMTPS id B28A24BA2E11 for ; Tue, 21 Jul 2026 18:49:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B28A24BA2E11 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B28A24BA2E11 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=35.89.44.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784659778; cv=none; b=ZbZIcjzn5s9r8Nfqnq7pLgRmg4jicYCGJdBkaqPMepC7uryFMvoF6s2lj52EQdb+Ig9IUeXOswSWe5K61QcQaE2Q3SDgb1N2K8HKgoG4xMKOiIxkTiBtqhUDJbA7NxcMH9s00mmFpoApb7/h8PB7CNme9TZGWpPZNTnneujxD98= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784659778; c=relaxed/simple; bh=VebtcVHgl4xuJb0a2nqg22ROM19LQ38sv30lPo//qoY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=QaOTyWhDQfNQ/7zJxUUQCdB7HL+lGKJx54kR/w/tUnYpGnYm8JOifr7WkK8CE6HCxvl3xJk/WA/90NFPnbdTYGTXkMzjnxetQ4HUR4DP6Bedk6sXyIqwvjfpKTmkAIiSpeqFFjri56nOVfhGROM2/19O6N5bK/71exZo35wrL2U= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=L51wFXwU reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B28A24BA2E11 Received: from eig-obgw-6001b.ext.cloudfilter.net ([10.0.30.143]) by cmsmtp with ESMTPS id mDrNwJVHuusRSmFX6wDcYG; Tue, 21 Jul 2026 18:49:36 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id mFX6wNEzmUsP9mFX6w7lXl; Tue, 21 Jul 2026 18:49:36 +0000 X-Authority-Analysis: v=2.4 cv=UPvdHDfy c=1 sm=1 tr=0 ts=6a5fbf40 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=RAioF0-LDSMA:10 a=ItBw4LHWJt0A:10 a=zd2uoN0lAAAA:8 a=BgrLDShrXdKzT85H5rIA:9 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=lYq0hT4DkiepdA7MTbWfmA8HIQ50DqfiNQSvlfpR76E=; b=L51wFXwUaAVD0EUO5IB0QCOIoM s2enk7CXt1W2upCVo8L9XrbUn1plgX4be6Fktoz5qtOSO16L9AAPGtmPqGNuwPofaHVyOWYCNqYxM fMI7KxU5GK9hBGhYXRsxOFgxb; Received: from 75-166-225-82.hlrn.qwest.net ([75.166.225.82]:34858 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.99.2) (envelope-from ) id 1wmFX5-00000003kDw-3DrX; Tue, 21 Jul 2026 12:49:35 -0600 From: Tom Tromey To: Tankut Baris Aktemur Cc: Subject: Re: [PATCH 06/16] gdb: split make_type_with_address_space In-Reply-To: <20260713-users-aktemur-type-instance-flags-v1-6-779cad0c85ec@amd.com> (Tankut Baris Aktemur's message of "Mon, 13 Jul 2026 09:00:05 -0500") References: <20260713-users-aktemur-type-instance-flags-v1-0-779cad0c85ec@amd.com> <20260713-users-aktemur-type-instance-flags-v1-6-779cad0c85ec@amd.com> X-Attribution: Tom Date: Tue, 21 Jul 2026 12:49:34 -0600 Message-ID: <87v7a8rxdt.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.225.82 X-Source-L: No X-Exim-ID: 1wmFX5-00000003kDw-3DrX X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-225-82.hlrn.qwest.net (bapiya) [75.166.225.82]:34858 X-Source-Auth: tom+tromey.com X-Email-Count: 16 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfBknBk+vlXu6MN2YWlTVWOx3A3PzX9EzkNQrko4lLF0XtryFuXqnSukvYs4oERtquce4d7aLkZpBYT0xLWA/upnwqADgChzqt9AtP7PNnCX+jz2xrmAQ e3hUW6l7JOOaGmxNtV+VqKA4rv58SIZH40jTclL9zkZnvYnNkhD9UPe+SLhz/rSVcZ/CnNhO4NzQfltjn8muEmuMEYEk5A3hiGs= 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 >>>>> Tankut Baris Aktemur writes: > The function make_type_with_address_space is used for creating a type > variant with a particular Harvard address space or an address class > id. The argument is type instance flags. Split the function into > two, each doing one task: (1) making a type variant with a given > Harvard address space id, and (2) making a type variant with a given > address class id. This is a step towards making function signatures > clearer and more descriptive. A couple minor nits for this one. > +make_type_with_harvard_address_space (struct type *type, > + enum harvard_address_space aspace) > +{ > + type_instance_flags new_flags > + = (enum type_instance_flag_value) (aspace << 2); > + > + gdb_assert ((new_flags & ~(TYPE_INSTANCE_FLAG_CODE_SPACE > + | TYPE_INSTANCE_FLAG_DATA_SPACE)) == 0); > + new_flags |= (type->instance_flags () > + & ~(TYPE_INSTANCE_FLAG_CODE_SPACE > + | TYPE_INSTANCE_FLAG_DATA_SPACE)); > + > + return make_qualified_type (type, new_flags, NULL); Could you use nullptr here? > +enum harvard_address_space > +{ > + HARVARD_ASPACE_NONE = 0, > + HARVARD_ASPACE_CODE = 1, > + HARVARD_ASPACE_DATA = 2, > +}; This could use some kind of comment. Tom