From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by sourceware.org (Postfix) with ESMTPS id 3284E3858D1E for ; Mon, 14 Nov 2022 13:32:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3284E3858D1E 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-io1-xd34.google.com with SMTP id h206so8096141iof.10 for ; Mon, 14 Nov 2022 05:32:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=content-transfer-encoding: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=oYlRO6bLiR74CpyqJnbU9jJ1zXj2i1FoTJNCJKYE2AE=; b=Gw+sMPh6w2vGFxYRoMilCftmsTF+LLcH7cUMnw84PI+20uGWHK+pIUJKXldqkP5Wou Zt/rJMyNkQkliim0hWmJDvZoSv79K2XTDp9z+rQNh3+OKbRoIdz/MmzkhnjukALoECo6 vFFT5q5Qr07cmYDd/ZNHYiEla7NA3OXJbWThjzqiuNfp0/HwTVwLgmH2T+z9Rp3aNdhd ro2cd31+uN5i6LQCQeHFXuIECt+ZWrAlqeqjDSp4yuoSMppRFyy5PSGahHPTyttL9K60 4PJMauB983sxn3Toa8Qld7QxvOEEUGtFOqYTLIjKB9+2WM9UCY+Fwz4duQ4+EPkVY+ID WR0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding: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=oYlRO6bLiR74CpyqJnbU9jJ1zXj2i1FoTJNCJKYE2AE=; b=A/yXZtmhFOjMA6V30JQvKPrht5F6Nv4BUTXp+cTTu7OYMx+ckdE3FGLXonICyqSHTu FlA5VMKuw4QM7o9lmigG+G3L6XAyxVU+IlZQAHvFuMHphGyi7KkqdJnvmjODzaKG+5LA PSmkKCDOztjtkmmncesiFYAmxCpKcXZSsOnoIMzOgv/DnW7RsmPcA7UbTs035zt2Ntbs 7wGVzatfCmwSvdlOF9XpUqOzVsCpT+sysNDdC+kpsWdn8gWFmbZI3yHQqxnPSJaEhJ1i WOb+3aMmvHn+c7+GbpQW/MYW1NczV6JjrqsnEzNxpEwsmb8IS0Ueu8eq2a/oBVJDH5v2 IiKw== X-Gm-Message-State: ANoB5pkWrZubnZS72BMVLAEDTBfzXSnSBlb9h7NwL6YvvuGCsWI5Lkuf aTMyWD0PgeB1Crb872jw5eG78Q== X-Google-Smtp-Source: AA0mqf5MK43k5x7DoCDTmlq2HXiC2mHnLYuw4WnMky3BqkkTMdbL4HjK6kEN8mTalgSFQjgoiK7KOA== X-Received: by 2002:a05:6638:33aa:b0:372:d3e8:a583 with SMTP id h42-20020a05663833aa00b00372d3e8a583mr5655776jav.178.1668432758477; Mon, 14 Nov 2022 05:32:38 -0800 (PST) Received: from murgatroyd (97-122-76-186.hlrn.qwest.net. [97.122.76.186]) by smtp.gmail.com with ESMTPSA id k18-20020a92c9d2000000b00302632f0d20sm962829ilq.67.2022.11.14.05.32.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Nov 2022 05:32:37 -0800 (PST) From: Tom Tromey To: Philippe Waroquiers Cc: Tom Tromey , Keith Seitz , gdb-patches@sourceware.org Subject: Re: [PATCH] Allow 'ptype/o' for assembly References: <20221108201452.1255047-1-tromey@adacore.com> <87tu382llr.fsf@tromey.com> <9767e2c450d88795f0a2c47e3c4b78681447bfd9.camel@skynet.be> X-Attribution: Tom Date: Mon, 14 Nov 2022 06:32:36 -0700 In-Reply-To: <9767e2c450d88795f0a2c47e3c4b78681447bfd9.camel@skynet.be> (Philippe Waroquiers's message of "Fri, 11 Nov 2022 20:50:23 +0100") Message-ID: <874jv1y83v.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.9 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: >>>>> "Philippe" =3D=3D Philippe Waroquiers = writes: Philippe> At work, I relatively often use ptype/o for Ada types. Philippe> As it only works in C mode, as part of our zillions of site alias= es, Philippe> we have added: Philippe> alias Wc =3D with language c -- with annotate 0 -- Philippe> (where annotate 0 avoids spurious language switch messages in the= output). Philippe> So, waiting for Adacore to implement ptype/o for Ada (hint hint := )), Philippe> we use e.g. =C2=A0 Philippe> (gdb) Wc ptype/o sometype I've considered it, and maybe the basics aren't too hard to do, but I didn't really know what to do with types that have a dynamic layout. Here the offsets would maybe have to be symbolic (which I'd suppose is a pain to implement) and holes couldn't really be determined. Maybe gdb could just print a warning in this scenario and drop the '/o' modifier. That might be easier to do. Tom