Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753219AbcC2HXL (ORCPT ); Tue, 29 Mar 2016 03:23:11 -0400 Received: from david.siemens.de ([192.35.17.14]:42382 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751025AbcC2HXI (ORCPT ); Tue, 29 Mar 2016 03:23:08 -0400 Subject: Re: [PATCH] scripts/gdb: Fix loading of modules information To: Daniel Wagner References: <1459233699-5541-1-git-send-email-wagi@monom.org> <56FA27E8.2080608@siemens.com> <56FA2B31.4040309@monom.org> Cc: linux-kernel@vger.kernel.org, Daniel Wagner , Jiri Kosina , Rusty Russell , Kieran Bingham From: Jan Kiszka Message-ID: <56FA2D52.2030402@siemens.com> Date: Tue, 29 Mar 2016 09:22:58 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: <56FA2B31.4040309@monom.org> 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 Content-Length: 1860 Lines: 50 On 2016-03-29 09:13, Daniel Wagner wrote: > On 03/29/2016 08:59 AM, Jan Kiszka wrote: >> On 2016-03-29 08:41, Daniel Wagner wrote: >>> for module in module_list(): >>> gdb.write("{address} {name:<19} {size:>8} {ref}".format( >>> - address=str(module['module_core']).split()[0], >>> + module_layout=module['core_layout'] >>> + addressr=str(module_layout['base']) >> >> This looks untested. > > Yep, I send out the untested version. Need more coffee... > >>> name=module['name'].string(), >>> size=str(module['core_size']), >>> ref=str(module['refcnt']['counter']))) >>> diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py >>> index 627750c..8650ede 100644 >>> --- a/scripts/gdb/linux/symbols.py >>> +++ b/scripts/gdb/linux/symbols.py >>> @@ -108,7 +108,8 @@ lx-symbols command.""" >>> >>> def load_module_symbols(self, module): >>> module_name = module['name'].string() >>> - module_addr = str(module['module_core']).split()[0] >>> + module_layout = module['core_layout'] >>> + module_addr = str(module_layout['base']) >>> >>> module_file = self._get_module_file(module_name) >>> if not module_file and not self.module_files_updated: >>> >> >> Thanks, but ad4db3b24a should already be on its way into stable. > > Ah, I haven't got that fix yet because I am still on a older branch. > Also my google-foo didn't help. > > Sorry about that noise. No problem. At least we now know another frequent user. BTW, Kieran and some other people at Linaro started to think about how to auto-test for such regressions - probably the only reliable way to catch them. Jan -- Siemens AG, Corporate Technology, CT RDA ITP SES-DE Corporate Competence Center Embedded Linux