From patchwork Fri Mar 3 16:44:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 63987 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp511342wrd; Fri, 3 Mar 2023 08:45:27 -0800 (PST) X-Google-Smtp-Source: AK7set/y1qxmAXJe2ntCxR+hbrEBl90wfF2WoX87UfF32xr7vma1M2BKJQv2dpvtf4UVOiO60v/Q X-Received: by 2002:a17:906:3893:b0:885:a62c:5a5c with SMTP id q19-20020a170906389300b00885a62c5a5cmr2493610ejd.46.1677861927202; Fri, 03 Mar 2023 08:45:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677861927; cv=none; d=google.com; s=arc-20160816; b=jOSJvuaJcsyJTaR836rC0g19VGqxzLOCuNzOP08q2L0UM0cSLVdiPAIo5AhMz2xAXh uDDspYvnhoXorOAooU0fumeEdAA5S0OQ8Rwjk/Q8WbGipz92338vn0FyUTsHtVrFQH6K WBZ2P2tpsxpA8HkXap0iSs0I5KP4Tju+WnxHqrkIAAvSoTDdxCKHy2Z/IgCoQdlP+721 tawoZTTFJNusuwi+LbXqmA7AxhT6+5bZ4T6EnP/vuvGIMcV771a8bRVmKJ3z4CbxgARB ItUeqHYNSf44oPxndZ2/eW/SB0aHlvYDg6fmamxgt1z3vA7vC27KnL3duQXa63gK8LQu jYfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=BG/mA9agn28bWUpW0Xfb+GPopvrP9HP/e5gco+11UWE=; b=WGcJdh9gO0U50EFexfQvMGd3oeHT8Z0KSIiBMqE7ncPvJkXk6Q6QCGuoZRRKtUa6Fl UQ7FWPprOxV6ogW/fUPMLpETzNqFU+rL3QvyBOsyot+dM1HcbWViOzL3FLYy36jKIn69 sz28+3XdkPmaO9UpnlMamqPXquIo6BrCfFUxtTfvmbsFpNOpnJOIAn7gWGHAplSAMJ4V HMJbceC8yQIP5QMt87KyPhd1xJnkyO5J+Z9a8olNhZeU948OTokUTBSIs9WUKuM6BWla kKEbgkMbS1J4rWg8bdBMOtgVB4Uk+NNGWY3CTKPxZNNx5psx4y5FWLupf6mW9g84Q8V6 zISg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=JojmxONV; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id l3-20020a056402124300b004acddcb7501si3053657edw.116.2023.03.03.08.45.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Mar 2023 08:45:27 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=JojmxONV; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 080AF3858C3A for ; Fri, 3 Mar 2023 16:45:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 080AF3858C3A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677861926; bh=BG/mA9agn28bWUpW0Xfb+GPopvrP9HP/e5gco+11UWE=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=JojmxONVqi4g+esiYe2eq5z4RQMFdo3TCuTjRV3+RgA3QcFajEy5OwCOV/zU8l6iW uyBAfLYdpNloyt53uKgcN8Tcxl1QNaYHPF7k4PPk232+9HxXFLxUMCX9t/jV+/Qd/L pxvzS+BO3SdISdQhSqT5XFRwSCR9MgnYpXxnWGoU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id A3BEC3858D37 for ; Fri, 3 Mar 2023 16:44:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A3BEC3858D37 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-588-u_BLZ32MPO-mnkEL_hZK2Q-1; Fri, 03 Mar 2023 11:44:40 -0500 X-MC-Unique: u_BLZ32MPO-mnkEL_hZK2Q-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 72B21380406A for ; Fri, 3 Mar 2023 16:44:40 +0000 (UTC) Received: from localhost (unknown [10.33.36.174]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3376A2166B2B for ; Fri, 3 Mar 2023 16:44:40 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [PATCH] gcc: Adjust gdbhooks.py VecPrinter for vec layout changes Date: Fri, 3 Mar 2023 16:44:39 +0000 Message-Id: <20230303164439.1625702-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759365748274068982?= X-GMAIL-MSGID: =?utf-8?q?1759365748274068982?= OK for trunk? gcc/ChangeLog: * gdbhooks.py (VecPrinter): Adjust for new vec layout. --- gcc/gdbhooks.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/gdbhooks.py b/gcc/gdbhooks.py index c9dea9bf828..78e6c97c30d 100644 --- a/gcc/gdbhooks.py +++ b/gcc/gdbhooks.py @@ -461,7 +461,11 @@ class VecPrinter: return m_vecpfx = self.gdbval['m_vecpfx'] m_num = m_vecpfx['m_num'] - m_vecdata = self.gdbval['m_vecdata'] + typ = self.gdbval.type + if typ.code == gdb.TYPE_CODE_PTR: + typ = typ.target() + typ = typ.template_argument(0) # the type T + m_vecdata = (self.gdbval.address + 1).cast(typ.pointer()) for i in range(m_num): yield ('[%d]' % i, m_vecdata[i])