From patchwork Fri Jan 3 19:15:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Machado X-Patchwork-Id: 37166 Received: (qmail 49132 invoked by alias); 3 Jan 2020 19:15:34 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 49056 invoked by uid 89); 3 Jan 2020 19:15:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=investigating X-HELO: mail-qk1-f176.google.com Received: from mail-qk1-f176.google.com (HELO mail-qk1-f176.google.com) (209.85.222.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 03 Jan 2020 19:15:26 +0000 Received: by mail-qk1-f176.google.com with SMTP id j9so34972228qkk.1 for ; Fri, 03 Jan 2020 11:15:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=uT7AykWHiafwfBZjpyOeeFM3Eh9xXJchH5znmg/yHBs=; b=txwR53TK1nGySabedtD/wED80YRM0+qKnCCUyT2juDHI658JXNPtffrfpbQtcpv0wl MdO50T+5gnbTQ09w+3uPw8UV7MCkK34zKjEV3UIsWV2/sds8eBGlUXVxFvydsx9T/o0Z Gosciby8EsPKu+0/F955XPFHdve+tNY4CSVev47eSkRyH3k21UxrKZ4mAajTVqtKuCtC gg7j7jQQSw3bRtPoi8Kd4iW55i0smqvQLDRQmZMh9DdCpZe0vm2F2cakWTooKuAdBIbT /EdwuIxpqD/DOQA+EFwhWkmMuCZzkoWLXBEUZlDbonXtJ2e9ElHbFyOeEgwyjGiyz6gy Q7pA== Return-Path: Received: from localhost.localdomain ([177.158.83.254]) by smtp.gmail.com with ESMTPSA id r6sm18650821qtm.63.2020.01.03.11.15.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jan 2020 11:15:20 -0800 (PST) From: Luis Machado To: gdb-patches@sourceware.org Cc: Alan.Hayward@arm.com Subject: [PATCH] [AArch64] Fix erroneous use of spu architecture bfd Date: Fri, 3 Jan 2020 16:15:12 -0300 Message-Id: <20200103191512.28770-1-luis.machado@linaro.org> X-IsSubscribed: yes While investigating some SVE code, i noticed the use of two spu bfd variables. This looks like an oversight, as the "id" field is available for non-spu architectures as well, even though its primary use was the Cell BE architecture. The following patch fixes this. gdb/ChangeLog: 2020-01-03 Luis Machado * aarch64-linux-nat.c (aarch64_linux_nat_target::thread_architecture): Use bfd_arch_aarch64 and bfd_mach_aarch64. Change-Id: I817673e9a12cadfa88638870f0ff524241cf6a34 --- gdb/aarch64-linux-nat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c index 62f5cdb1fc..4e712ebfb7 100644 --- a/gdb/aarch64-linux-nat.c +++ b/gdb/aarch64-linux-nat.c @@ -970,7 +970,7 @@ aarch64_linux_nat_target::thread_architecture (ptid_t ptid) unavailable, to distinguish from an unset value of 0. */ struct gdbarch_info info; gdbarch_info_init (&info); - info.bfd_arch_info = bfd_lookup_arch (bfd_arch_spu, bfd_mach_spu); + info.bfd_arch_info = bfd_lookup_arch (bfd_arch_aarch64, bfd_mach_aarch64); info.id = (int *) (vq == 0 ? -1 : vq); return gdbarch_find_by_info (info); }