From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) by sourceware.org (Postfix) with ESMTPS id EED443858D20 for ; Wed, 9 Nov 2022 15:28:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EED443858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-il1-x12a.google.com with SMTP id d3so7177498ils.1 for ; Wed, 09 Nov 2022 07:28:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=7H77G++kmnkeojCeutWlNvVu8DgSd0VEyoD98sflqD8=; b=W478+j0z6zJ73Zr1UCj/zzh+m+gy3Y/h7t7fUGaFgFjE3eTwPm3B4LqnEWJesQLPMy R9ys7tQPN5XI3tPK6xCnA2hbeasVVRMFbi2wwRWGnPWc30yKUcmSzyzxcI7eoQNEEZJi bwV+pyeEta9UsJVQgORPOWQCZyuOe9zdTZklXumXucH+S+IZT96uc+64UgwiY+1/USjt aJoGKnbRmRDdJ9j+WpON+BG7mCt+qrxqX2nHFWOePBIhAGGzYbBErLJ1iuF0qJf1vWfG pXbyPaMDfXxIeMcBh1dNPCsn+qS5SnVhi+OjlHw8T/8VGgIWc6lYXp5r3LBZ5nN5hhkj /ang== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=7H77G++kmnkeojCeutWlNvVu8DgSd0VEyoD98sflqD8=; b=Yj8hZ+kX87OtDgw7EUEUj5gSrFwVzLIB0ELrDQfm2YS7Ih14G3FzqQeupOJM+sYvQU +6uiQcma20vXeytxTgnHWLM1GIWC2IokN86DaCdNohcsGTrFWc6Pb9FOa1kB3Qu2K3HB coWMuwA1lJHl8RGZKCT9e6Uyt6rJSu4ZqKmfdT7mSq00vYZzXU3ifdAhVsTzbzwuhEE/ KYi0UJ3VmZphTDWkcyRgjXomqCt2YC/Dwvz6kOXujXjRJaD69xf3LVfWC3yGbYTxd4pc N3evbOy1Tu4aWGUelxSE5Yud6MDSIpkUiLRlySzkhTBlL7SpDYtB0GqHlTWMD4fYOitA f4gQ== X-Gm-Message-State: ACrzQf00jaPJNkBu/Ebl7JB2TdBPqfCyDL1/NJLtQohhS0i4VkgU8bBg ON6Pi1xXZY/s4gjNvRGsM3b9s7rWavDMPg== X-Google-Smtp-Source: AMsMyM54JsfRclZzgPwDkYbya7lU22Tvh0D/3ESVsz2zoRJBl/F1YTOYRXcuXc7fF750sPg6uxWk+w== X-Received: by 2002:a92:1947:0:b0:2fc:6475:5113 with SMTP id e7-20020a921947000000b002fc64755113mr33573432ilm.196.1668007714197; Wed, 09 Nov 2022 07:28:34 -0800 (PST) Received: from murgatroyd (97-122-76-186.hlrn.qwest.net. [97.122.76.186]) by smtp.gmail.com with ESMTPSA id ay27-20020a5d9d9b000000b006cad30ad430sm5597172iob.23.2022.11.09.07.28.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 07:28:33 -0800 (PST) From: Tom Tromey To: Keith Seitz Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH] Allow 'ptype/o' for assembly References: <20221108201452.1255047-1-tromey@adacore.com> X-Attribution: Tom Date: Wed, 09 Nov 2022 08:28:32 -0700 In-Reply-To: (Keith Seitz's message of "Tue, 8 Nov 2022 13:19:57 -0800") Message-ID: <87tu382llr.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: >> PR exp/28359 points out that 'ptype/o' does not work when the current >> language is "asm". Keith> I hesitate to bring this up, but... Keith> Why would the current language matter in this case? Keith> [I understand that the print options are set before Keith> the expression is evaluated...] Keith> Since we have the type of the symbol, couldn't we Keith> simply use that? Maybe it's not worth being so Keith> pedantic? Ordinarily this would be fine, but for non-C languages it's sometimes useful to "set lang c" and see what the C type-printer thinks. For example, in Ada there are "fat pointers" that are really just a kind of struct. Ada will always print these as ordinary access types, but it can be handy to look under the hood and see that it's really a struct type. Maybe there's some better way to do this kind of thing. Like we could add "ptype/c" for "C style printing". Keith> In any case, it LGTM. I recommend you approve your patch. Thanks. Tom