From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +XwGEm0SZ2AlUAAAWB0awg (envelope-from ) for ; Fri, 02 Apr 2021 08:47:41 -0400 Received: by simark.ca (Postfix, from userid 112) id 3C2C11EF62; Fri, 2 Apr 2021 08:47:41 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 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 (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 32DF71EE0E for ; Fri, 2 Apr 2021 08:47:40 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 875EF385781A; Fri, 2 Apr 2021 12:47:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 875EF385781A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1617367659; bh=WFFSFn4keTPpIwEP4KinGwvpmwJP7kv3p0nxQxmvyG0=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=tZxoQwNqBoRdzVCNiF6SGl+IinptqSAHWEJC8GWGty+YtERs45yR2g+pRDGooKIgB 42N6HLWlrdKv/vI3zCLjJWupK+ADwYvU0CZpTUn/WdkLMVfaKBUiJtpXssnJkHwMQg +tEvsX1GSO/uCzC3gww9+oNc0+fw4BFr7GOLEW3A= Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) by sourceware.org (Postfix) with ESMTPS id 5BAB9385781A for ; Fri, 2 Apr 2021 12:47:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5BAB9385781A Received: by mail-qv1-xf33.google.com with SMTP id j3so393358qvs.1 for ; Fri, 02 Apr 2021 05:47:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=WFFSFn4keTPpIwEP4KinGwvpmwJP7kv3p0nxQxmvyG0=; b=PvuM4A6Tt+/1za3/nSkmeKSkL22jmQ5bu1MyWktDU3uOSjvHgQoHs/MK+Cgq8CghPX OH1x86ISudyeeZScyKTHnHPUiK0p5kDBaa7LhER+saGv6SZkmlciWPgEe9zTDXRswfDP yjHQ3gw2Awc839kglmA2tJhRAqkflv9aFXEnUfG+Ip7R5NVnrYKEyQYKhwLA+h7BGpLt E9TMZ1VIBsWMz4+sQiSD/hV63GCGXRz8TrSadDjAuN0+w3JRHCot6nVRmG+IpWDhySxV 6Kz7j3KMkN0FUYTpALNtLi21r1NuwAYsNp6VT8+/TocfnSy1V21rcdpDWwSAeCVuSOLT v8TA== X-Gm-Message-State: AOAM533DVOi8+AFeajxODtNDZOzAUPw5UlOYQELLFqYauEKY5e0hfwhv S1vGMhoZU9qikNn4M/as5AGusNGxrmvqng== X-Google-Smtp-Source: ABdhPJyQyJFZmxFWh1wD61iALc3+OveyVnJDN7WDZPUSf696yCh+N9gkTl9+535S8/qzLzTuAUJJVg== X-Received: by 2002:a05:6214:2ea:: with SMTP id h10mr12782690qvu.55.1617367655992; Fri, 02 Apr 2021 05:47:35 -0700 (PDT) Received: from ?IPv6:2804:7f0:4841:2841:f992:e27d:ad79:b212? ([2804:7f0:4841:2841:f992:e27d:ad79:b212]) by smtp.gmail.com with ESMTPSA id w197sm7130784qkb.89.2021.04.02.05.47.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Apr 2021 05:47:35 -0700 (PDT) Subject: Re: [PATCH 1/2] gdb: Allow address space qualifier parsing in C++. To: "Willgerodt, Felix" , Tom Tromey , Felix Willgerodt via Gdb-patches References: <20210326142609.245016-1-felix.willgerodt@intel.com> <20210326142609.245016-2-felix.willgerodt@intel.com> <878s61ooph.fsf@tromey.com> Message-ID: <95020d6f-b5eb-9c55-3800-8deaf8484860@linaro.org> Date: Fri, 2 Apr 2021 09:47:32 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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: , From: Luis Machado via Gdb-patches Reply-To: Luis Machado Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Hi, On 4/2/21 9:33 AM, Willgerodt, Felix via Gdb-patches wrote: >> Do we have or want a test for this? >> >> Tom > > This '@address_space_qualifier' is a bit of an undocumented and untested feature AFAIK. Even the avr tests for __flash don't test it. > I did search the git history a bit, but couldn't really determine why it was added. Only that it was added years before the __flash patch was. > But since it is there and since I need a language agnostic way to specify this, I plan to use it for a future target. Just to give some context, I have used this feature multiple times for architectures that expose separate address classes via DWARF, none of which have made its way upstream (the most recent port to use this is the ARM Morello one, for capability types). I think IBM's Cell BE has used it as well, but the port was removed from the tree a few years ago. But yes, it is a bit undocumented and obscure. It is hard to see tests for this because they tend to be arch-specific. Cell BE had tests for it (gdb/testsuite/gdb.cell/ea-test.exp), now removed. > > The only test I could currently write for this patch is something like: > gdb_test "*(@somerandomqualifiername int *) 0x12345678" "Unknown address space specifier: \"somerandomqualifiername\"" > > for a C++ program on any target. If you think that is valuable, I can easily add that. > The target I want to use this for in the end won't be ready for upstream for a while unfortunately. > > Thanks, > Felix > Intel Deutschland GmbH > Registered Address: Am Campeon 10, 85579 Neubiberg, Germany > Tel: +49 89 99 8853-0, www.intel.de > Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva > Chairperson of the Supervisory Board: Nicole Lau > Registered Office: Munich > Commercial Register: Amtsgericht Muenchen HRB 186928 >