From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0453C433ED for ; Fri, 24 Jul 2020 04:15:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7501820663 for ; Fri, 24 Jul 2020 04:15:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="JiF5BAoc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7501820663 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2185A8D0015; Fri, 24 Jul 2020 00:15:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1C8F58D0007; Fri, 24 Jul 2020 00:15:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 109958D0015; Fri, 24 Jul 2020 00:15:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0167.hostedemail.com [216.40.44.167]) by kanga.kvack.org (Postfix) with ESMTP id EC2748D0007 for ; Fri, 24 Jul 2020 00:15:54 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id AFC2E180A6071 for ; Fri, 24 Jul 2020 04:15:54 +0000 (UTC) X-FDA: 77071656228.20.coal81_0b03ec926f44 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 8526618014B00 for ; Fri, 24 Jul 2020 04:15:54 +0000 (UTC) X-HE-Tag: coal81_0b03ec926f44 X-Filterd-Recvd-Size: 3095 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Fri, 24 Jul 2020 04:15:54 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 038F62064C; Fri, 24 Jul 2020 04:15:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595564153; bh=5uv/3frivuikopVb6EWH8EFMRlKpWGluePcFeWUzSog=; h=Date:From:To:Subject:In-Reply-To:From; b=JiF5BAocVirW9TP0U8FAyeT9SVZQjgUDGXgnrXLrXXa/bkNrzhC13obocOQkHsJBI G6/9CCeZnVe648XY9zTC9oE0ItQHVbsxUgRKoiPeghe8V3v6dh/hHMS6qFwW5jAyCn PzLXxSeoI/wMkM0H9dM9rr/p0kkMwo4aPVIqkFTo= Date: Thu, 23 Jul 2020 21:15:52 -0700 From: Andrew Morton To: akpm@linux-foundation.org, jan.kiszka@siemens.com, kbingham@kernel.org, linux-mm@kvack.org, mm-commits@vger.kernel.org, sgarzare@redhat.com, torvalds@linux-foundation.org Subject: [patch 15/15] scripts/gdb: fix lx-symbols 'gdb.error' while loading modules Message-ID: <20200724041552.hdbc354nL%akpm@linux-foundation.org> In-Reply-To: <20200723211432.b31831a0df3bc2cbdae31b40@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Queue-Id: 8526618014B00 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Stefano Garzarella Subject: scripts/gdb: fix lx-symbols 'gdb.error' while loading modules Commit ed66f991bb19 ("module: Refactor section attr into bin attribute") removed the 'name' field from 'struct module_sect_attr' triggering the following error when invoking lx-symbols: (gdb) lx-symbols loading vmlinux scanning for modules in linux/build loading @0xffffffffc014f000: linux/build/drivers/net/tun.ko Python Exception There is no member named name.: Error occurred in Python: There is no member named name. This patch fixes the issue taking the module name from the 'struct attribute'. Link: http://lkml.kernel.org/r/20200722102239.313231-1-sgarzare@redhat.com Fixes: ed66f991bb19 ("module: Refactor section attr into bin attribute") Signed-off-by: Stefano Garzarella Reviewed-by: Jan Kiszka Reviewed-by: Kieran Bingham Signed-off-by: Andrew Morton --- scripts/gdb/linux/symbols.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/scripts/gdb/linux/symbols.py~scripts-gdb-fix-lx-symbols-gdberror-while-loading-modules +++ a/scripts/gdb/linux/symbols.py @@ -96,7 +96,7 @@ lx-symbols command.""" return "" attrs = sect_attrs['attrs'] section_name_to_address = { - attrs[n]['name'].string(): attrs[n]['address'] + attrs[n]['battr']['attr']['name'].string(): attrs[n]['address'] for n in range(int(sect_attrs['nsections']))} args = [] for section_name in [".data", ".data..read_mostly", ".rodata", ".bss", _