From patchwork Mon Feb 23 01:08:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 44885 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CA90521554 for ; Mon, 23 Feb 2015 01:09:06 +0000 (UTC) Received: by lamq1 with SMTP id q1sf9897875lam.0 for ; Sun, 22 Feb 2015 17:09:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:cc:subject:date :message-id:x-original-sender:x-original-authentication-results; bh=2ApvpEAsQasj4/R+jSGPU/BgGXs1rQDggwUTrugKSSU=; b=ZaxuPl9kwPok8MdAMjJ4WP/+ALO8jx84rqTD1fj42M08jIaxU0CfINlCtiPQ+U4Mdb iH01tjimbimMTaXxImcV+jp1GnvUXQG47okpg82Lpgeslz6xXkERHOWUHbQEvu1hxiQv bUUxiT4/3e9rjMSxE8j9Cg+lcP0w2krtMBpR+zi5mhWxEL3OywrPEjIqizRI6+pZeUEg AroaIhgiiNqmgGDNHJoq6UzB4NUvzg9ARfjEHW8paNFecyktMqC0Fc1AhgufGTIuSZUO qtnYzxI1zy8zLSn6Z5U4n8SK920eS3BF+hyQZNzeKhyFAQMbdPNzZ3ZocO+mRODYBALY uYqQ== X-Gm-Message-State: ALoCoQlbAhohEGnhOOsstbdqW88z71PdaHha6yL2tMNuySQB2R8VpebN9UGF0qDINz+zxBU7nlBF X-Received: by 10.112.144.130 with SMTP id sm2mr967715lbb.9.1424653744638; Sun, 22 Feb 2015 17:09:04 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.234.165 with SMTP id uf5ls482660lac.60.gmail; Sun, 22 Feb 2015 17:09:04 -0800 (PST) X-Received: by 10.152.42.238 with SMTP id r14mr7683259lal.13.1424653744349; Sun, 22 Feb 2015 17:09:04 -0800 (PST) Received: from mail-lb0-x236.google.com (mail-lb0-x236.google.com. [2a00:1450:4010:c04::236]) by mx.google.com with ESMTPS id pc8si1816072lbc.5.2015.02.22.17.09.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Feb 2015 17:09:03 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::236 as permitted sender) client-ip=2a00:1450:4010:c04::236; Received: by lbjb6 with SMTP id b6so15721378lbj.2 for ; Sun, 22 Feb 2015 17:09:03 -0800 (PST) X-Received: by 10.152.115.136 with SMTP id jo8mr3812020lab.32.1424653743889; Sun, 22 Feb 2015 17:09:03 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp966775lbj; Sun, 22 Feb 2015 17:09:02 -0800 (PST) X-Received: by 10.68.69.71 with SMTP id c7mr15069429pbu.154.1424653741137; Sun, 22 Feb 2015 17:09:01 -0800 (PST) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id y7si10868125par.84.2015.02.22.17.09.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Feb 2015 17:09:01 -0800 (PST) Received-SPF: pass (google.com: domain of gdb-patches-return-120133-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 4087 invoked by alias); 23 Feb 2015 01:08:53 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 4070 invoked by uid 89); 23 Feb 2015 01:08:52 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f52.google.com Received: from mail-pa0-f52.google.com (HELO mail-pa0-f52.google.com) (209.85.220.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 23 Feb 2015 01:08:51 +0000 Received: by pabrd3 with SMTP id rd3so23369435pab.4 for ; Sun, 22 Feb 2015 17:08:49 -0800 (PST) X-Received: by 10.68.178.100 with SMTP id cx4mr15019201pbc.158.1424653729505; Sun, 22 Feb 2015 17:08:49 -0800 (PST) Received: from localhost.localdomain (61-205-4-107m5.grp1.mineo.jp. [61.205.4.107]) by mx.google.com with ESMTPSA id dy3sm34029750pab.33.2015.02.22.17.08.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 22 Feb 2015 17:08:48 -0800 (PST) From: AKASHI Takahiro To: gdb-patches@sourceware.org Cc: will.deacon@arm.com, dsaxena@linaro.org, yufeng.zhang@arm.com, AKASHI Takahiro Subject: [PATCH] aarch64: correct a size of struct elf_prstatus Date: Mon, 23 Feb 2015 10:08:01 +0900 Message-Id: <1424653681-18053-1-git-send-email-takahiro.akashi@linaro.org> X-Original-Sender: takahiro.akashi@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::236 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 When gdb reads a vmcore file that kdump generated, it fails, saying warning: Couldn't find general-purpose registers in core file. This is because elf64_aarch64_grok_prstatus() fails to read a note section in a vmcore file due to a wrong size of struct elf_prstatus. The following commit on kernel changed ELF_NGREG in elf_gregset_t. commit 9cf2b72b25f3f6a5a1a46a4f36037e66de52465c Author: Will Deacon Date: Tue Jan 22 15:34:40 2013 +0000 arm64: elf: fix core dumping to match what glibc expects This patch fixes an immediate value in elf64_aarch64_grok_prstatus(). Signed-off-by: AKASHI Takahiro --- bfd/elf64-aarch64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bfd/elf64-aarch64.c b/bfd/elf64-aarch64.c index 94d90c5..0454a18 100644 --- a/bfd/elf64-aarch64.c +++ b/bfd/elf64-aarch64.c @@ -1529,7 +1529,7 @@ elf64_aarch64_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) default: return FALSE; - case 408: /* sizeof(struct elf_prstatus) on Linux/arm64. */ + case 392: /* sizeof(struct elf_prstatus) on Linux/arm64. */ /* pr_cursig */ elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);