mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Stefano Garzarella <sgarzare@redhat.com>,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Kieran Bingham <kbingham@kernel.org>
Subject: Re: [PATCH] scripts/gdb: fix lx-symbols 'gdb.error' while loading modules
Date: Thu, 23 Jul 2020 12:25:22 +0200	[thread overview]
Message-ID: <418f0953-1815-1844-e3f5-a11f2a5eaf33@siemens.com> (raw)
In-Reply-To: <20200722102239.313231-1-sgarzare@redhat.com>

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 <class 'gdb.error'> 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 <sgarzare@redhat.com>
> ---
>   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 <jan.kiszka@siemens.com>

Thanks,
Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

  reply	other threads:[~2020-07-23 10:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-22 10:22 Stefano Garzarella
2020-07-23 10:25 ` Jan Kiszka [this message]
2020-07-23 10:39   ` Kieran Bingham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=418f0953-1815-1844-e3f5-a11f2a5eaf33@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=akpm@linux-foundation.org \
    --cc=kbingham@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sgarzare@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®