Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp394524ybh; Wed, 22 Jul 2020 03:25:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzR0LMen36UBmR1JTAAyOB4CVL58mvSkafJtMTKGYGn2+0biOG//KcjcMP9cewAynt17Q3A X-Received: by 2002:a50:cd95:: with SMTP id p21mr14120369edi.12.1595413544422; Wed, 22 Jul 2020 03:25:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595413544; cv=none; d=google.com; s=arc-20160816; b=FCJMdjazQSdIZPFNC4+Qd7Ud1of+Be2fn4ew6PxAxXrcQfQk1CnFA6rdiznUq5p0eJ qEriAlu2TiSNTU593B0A1vKsWYG4J/KFT/xQm0bjlodhoNVU1pK8NpNog8oU4BW+6C2P qb3XIIjh7PIkuAUxSSKltCkCTCJld0nbJLVPtbbhQUKu5VMh/+vHJkPirgpEHpRqG6LQ ixlQDoUeuMD5dBGOrvCfiIm7qZ4K1cbxTBY+cOHrJrdOkCX64gkOp0ZzhdrOLvSlxCjE u3COzf0FwJkw6BJwRaMjDX/sBe1Hy+Z0zIBnXI6vg4uS6NIwe1sIiYzhuydJv14LZLFu 2ciw== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=GxCgvuoK8NuxbGBXVCCusTbGlNPSfTrnO2P7BCm4FhQ=; b=wAIJxM8mp0aHhYwD2Lf8+pYWWLL4VBPQEr9yxZly4Z29k0DwBD29MTWeeaPQGry5Cy WKYdjocsIiZ0FUfLxyzayvY/90Y/6N45YcTNbbldATYYF1j6pcfdv3jp8OiL5VBUAcox OsFIKAVBxGNhArEd90owKUW+PmQNWgWvjk7nlOvQHyC+bcOxqVZqtBjz5DrqznQ4yA68 WfPEApIkqnrjSrRZY1opc5THsWhejS8TGWrkSDRrpdo72SSLYcyQI5HGK4AKkSIhKDow LT26L1wTrDFX5svCHurwj4f/g7V4q8cTlI2h5EQYwWsSib1x8LVFnSIBEor1sJ8phJZ6 hkog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XD0eZDpm; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lx8si14355770ejb.415.2020.07.22.03.25.20; Wed, 22 Jul 2020 03:25:44 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XD0eZDpm; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729864AbgGVKWv (ORCPT + 99 others); Wed, 22 Jul 2020 06:22:51 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:28283 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726153AbgGVKWu (ORCPT ); Wed, 22 Jul 2020 06:22:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595413369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=GxCgvuoK8NuxbGBXVCCusTbGlNPSfTrnO2P7BCm4FhQ=; b=XD0eZDpmXcfIfAehSLZoRtxAToBdS7mvnkGemvrrR316qtRrSRRwAY7XcEYYyoc0DiQjDe r4P0XcjSbo1h4/XgSIn3rm9H47PccTsELtLOKgTdc0H5O7dlTn2+dBf1JygOzWGuk3jboG vpJ16/cUZdpnVCp/B+fPn5LoryXkJpI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-196-spEUJSSAPy2OXuvs2fPvJQ-1; Wed, 22 Jul 2020 06:22:44 -0400 X-MC-Unique: spEUJSSAPy2OXuvs2fPvJQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F246758; Wed, 22 Jul 2020 10:22:43 +0000 (UTC) Received: from steredhat.redhat.com (ovpn-113-242.ams2.redhat.com [10.36.113.242]) by smtp.corp.redhat.com (Postfix) with ESMTP id A0CDB5D9D3; Wed, 22 Jul 2020 10:22:41 +0000 (UTC) From: Stefano Garzarella To: linux-kernel@vger.kernel.org Cc: Jan Kiszka , Kieran Bingham Subject: [PATCH] scripts/gdb: fix lx-symbols 'gdb.error' while loading modules Date: Wed, 22 Jul 2020 12:22:39 +0200 Message-Id: <20200722102239.313231-1-sgarzare@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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", -- 2.26.2