From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933921AbcCNJ4S (ORCPT ); Mon, 14 Mar 2016 05:56:18 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:37730 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754961AbcCNJ4L (ORCPT ); Mon, 14 Mar 2016 05:56:11 -0400 Subject: Re: [PATCH] scripts/gdb: Account for changes in module data structure To: Jan Kiszka , Andrew Morton , Linux Kernel Mailing List References: <56E5BF25.3030403@web.de> Cc: Peter Griffin From: Kieran Bingham Message-ID: <56E68AB8.6000900@linaro.org> Date: Mon, 14 Mar 2016 09:56:08 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56E5BF25.3030403@web.de> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/03/16 19:27, Jan Kiszka wrote: > From: Jan Kiszka > > Commit 7523e4dc50 factored out the module_layout structure. Adjust the > symbol loader and the lsmod command to this. > > Signed-off-by: Jan Kiszka Testing this has shown me that the module ko search path can find old modules versions in preference to newer ones, but that does not block this patch and can be investigated separately : Reviewed-by: Kieran Bingham Tested-by: Kieran Bingham (qemu-{ARM,x86}) -- Regards Kieran > --- > > Probably too late for 4.5, still a regression. > > scripts/gdb/linux/modules.py | 5 +++-- > scripts/gdb/linux/symbols.py | 2 +- > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/scripts/gdb/linux/modules.py b/scripts/gdb/linux/modules.py > index 25db8cf..0a35d6d 100644 > --- a/scripts/gdb/linux/modules.py > +++ b/scripts/gdb/linux/modules.py > @@ -73,10 +73,11 @@ class LxLsmod(gdb.Command): > " " if utils.get_long_type().sizeof == 8 else "")) > > for module in module_list(): > + layout = module['core_layout'] > gdb.write("{address} {name:<19} {size:>8} {ref}".format( > - address=str(module['module_core']).split()[0], > + address=str(layout['base']).split()[0], > name=module['name'].string(), > - size=str(module['core_size']), > + size=str(layout['size']), > ref=str(module['refcnt']['counter']))) > > source_list = module['source_list'] > diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py > index 627750c..9a0f892 100644 > --- a/scripts/gdb/linux/symbols.py > +++ b/scripts/gdb/linux/symbols.py > @@ -108,7 +108,7 @@ lx-symbols command.""" > > def load_module_symbols(self, module): > module_name = module['name'].string() > - module_addr = str(module['module_core']).split()[0] > + module_addr = str(module['core_layout']['base']).split()[0] > > module_file = self._get_module_file(module_name) > if not module_file and not self.module_files_updated: >