Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp1299898pjb; Thu, 23 Jul 2020 03:26:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyE3n1Iwn16ETx4LWPvKfz+CS5XpS2UXqGvyK7JZ3wg5DIJyfg3etU+ZqftLwzCFjx09GJT X-Received: by 2002:aa7:cb55:: with SMTP id w21mr3606577edt.380.1595499978415; Thu, 23 Jul 2020 03:26:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595499978; cv=none; d=google.com; s=arc-20160816; b=VowvfwLaEvLWJiv4LUgfyASekcp+GclEFi3PcU/uz7oaQDqwYAb3A1hx6tqVen3CU7 +R2MDFNMHjM0aRsyxR8nlFXv1aPJnc5Nl/hr4I8WAkDL9ML2u2hHxLbRIMT5f2rHG5tp oEhwgZAGG2RbH7aP8H7FJbUn4QWu7Vp9ih/kgA2Il4K3WJONz/iJPHdGqprQtQ6qCEnf jrmlgoAuDeir0mLG3UO7dudXuUemSF3dIgYQ50Q6zMOQ0pRRM47eyogFhv1BXH3CtJho n4Nkzsjc5ia1h0nc/kxARR02sant6AjNud/UUpoL0DKD3/LuWoCXr+Yw1xEJEKus1OJs aDRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=2/FoHLzNHhB+f25sTUaJUGklCVBPz6FYH9fw5D5rUwE=; b=ebAgfcRaPY2eLMGFnNB6LnV+OTJV6zAytfSH03qobJTqzkq59f/B3ns4C4IYjCFn4f zyxPd1u5BI0zaZ2E6O4jFmwpOxH7r8lOoMD+vr/QgZsAXmuguLZ0chKDSXz/hXnGs803 fLgTLiEH2DazwAEkhNaMEJSXy9IwYYRKSo0rIoB+uDtA/VTsmorOs0+ksLih3pIc+WCp 5DR18Nk4mrrH1VhvdaPyCGMSP7ChmRCcdiDOGGb+RoQdiXKDqZOsVIyCM+6tlb3kRo9f wR5avL8LD9BAux25fv2YfyaJ9ciI7k+c0WZVcMXsmCOYPPseBtWFYHBGmNkCk3R8QmAO fvnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h22si1715982eja.596.2020.07.23.03.25.55; Thu, 23 Jul 2020 03:26:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728123AbgGWKZa (ORCPT + 99 others); Thu, 23 Jul 2020 06:25:30 -0400 Received: from gecko.sbs.de ([194.138.37.40]:46523 "EHLO gecko.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726867AbgGWKZ3 (ORCPT ); Thu, 23 Jul 2020 06:25:29 -0400 Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id 06NAPMTB009202 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 Jul 2020 12:25:22 +0200 Received: from [139.25.68.37] ([139.25.68.37]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 06NAPMp8032716; Thu, 23 Jul 2020 12:25:22 +0200 Subject: Re: [PATCH] scripts/gdb: fix lx-symbols 'gdb.error' while loading modules To: Stefano Garzarella , linux-kernel@vger.kernel.org, Andrew Morton Cc: Kieran Bingham References: <20200722102239.313231-1-sgarzare@redhat.com> From: Jan Kiszka Message-ID: <418f0953-1815-1844-e3f5-a11f2a5eaf33@siemens.com> Date: Thu, 23 Jul 2020 12:25:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200722102239.313231-1-sgarzare@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22.07.20 12:22, Stefano Garzarella wrote: > 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'. > > Signed-off-by: Stefano Garzarella > --- > scripts/gdb/linux/symbols.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py > index be984aa29b75..1be9763cf8bb 100644 > --- a/scripts/gdb/linux/symbols.py > +++ b/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", > Reviewed-by: Jan Kiszka Thanks, Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux