From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by sourceware.org (Postfix) with ESMTPS id 1F4603856DC8 for ; Tue, 31 May 2022 12:57:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1F4603856DC8 Received: by mail-io1-xd2f.google.com with SMTP id y8so13945307iof.10 for ; Tue, 31 May 2022 05:57:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dVqnWH2fkm+rq1ZWHfsh0L+v2NokZopiVimKW8kzXAY=; b=ucNTG45EgHZKr9P1HPQZ8VaBauFf52ahvOI769o+he0q2GrAyMwIvsQegKtGBtFrgf iZRjZUrhBKrQf1KYcYK6VOiiCG40ygPxxRLMYhWyrs8Bd6f+3vnEfZfJqc8zKTI2FJOW z4OMawnE08kpQ1IO12tYT/TJFOlZGNRoaL/NpzCnX3+nfXiGU2KoNMT2f8KN9rUtKYXV z6oO0WU6ZiBXBLy7zwvR0x4z6TtvrAsbNAezKzwZb0iANDNGP3ZRUshe5/ng2VpyGLSj YwZMZbFzBZsNBQRL6mihu/D2YXR1nBMEJ4W1zN19NrEyWaMoYpMDkX1U9Rc5S5Vwn/EF +9WQ== X-Gm-Message-State: AOAM532c9y4Q2Nw3zEanxZ8i4Y1oD22ZWFJoZeIpIPtNhoYq6tt9D6ZD AA4Wj1s4aqeLkuOnrpTu0h9R5SZ8QokQjg== X-Google-Smtp-Source: ABdhPJzLGIEVov3bNO4I1FrI0tfGaWppOuYoqg2A9PEJKpDFnln7ZLVq8Tk+i9CZ70iwhykzcrC3bg== X-Received: by 2002:a05:6638:1442:b0:331:330:7c09 with SMTP id l2-20020a056638144200b0033103307c09mr9738611jad.300.1654001854391; Tue, 31 May 2022 05:57:34 -0700 (PDT) Received: from murgatroyd.Home (71-211-167-178.hlrn.qwest.net. [71.211.167.178]) by smtp.gmail.com with ESMTPSA id q16-20020a5d8510000000b0065a47e16f5asm3834829ion.44.2022.05.31.05.57.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 05:57:34 -0700 (PDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 1/3] Fix bugs in aarch64-ravenscar-thread.c Date: Tue, 31 May 2022 06:57:29 -0600 Message-Id: <20220531125731.1280943-2-tromey@adacore.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220531125731.1280943-1-tromey@adacore.com> References: <20220531125731.1280943-1-tromey@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: 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: , X-List-Received-Date: Tue, 31 May 2022 12:57:37 -0000 We found a few bugs in aarch64-ravenscar-thread.c. First, some of the register offsets were incorrect. The "bb-runtimes" file for this runtime had the wrong offsets in comments, which GDB took to be correct. However, those comments didn't account for alignment. This patch adjusts the offsets. Next, the "FPU Saved field" is not a register -- it is an implementation detail of the runtime. This is removed. Finally, I think the FP registers are actually named V0-V31, and the "Q" names are pseudo-registers. This patch fixes the comment. --- gdb/aarch64-ravenscar-thread.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/gdb/aarch64-ravenscar-thread.c b/gdb/aarch64-ravenscar-thread.c index a60471d7275..dc35537e3d5 100644 --- a/gdb/aarch64-ravenscar-thread.c +++ b/gdb/aarch64-ravenscar-thread.c @@ -47,21 +47,18 @@ static const int aarch64_context_offsets[] = 80, 88, 96, 88, NO_OFFSET, - /* Q0 - Q31 */ - 112, 128, 144, 160, - 176, 192, 208, 224, - 240, 256, 272, 288, - 304, 320, 336, 352, - 368, 384, 400, 416, - 432, 448, 464, 480, - 496, 512, 528, 544, - 560, 576, 592, 608, + /* V0 - V31 */ + 128, 144, 160, 176, + 192, 208, 224, 240, + 256, 272, 288, 304, + 320, 336, 352, 368, + 384, 400, 416, 432, + 448, 464, 480, 496, + 512, 528, 544, 560, + 576, 592, 608, 624, /* FPSR, FPCR */ - 104, 108, - - /* FPU Saved field */ - 624 + 112, 116, }; /* The register layout info. */ -- 2.34.1