Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1734075rwl; Wed, 12 Apr 2023 18:12:03 -0700 (PDT) X-Google-Smtp-Source: AKy350Z5OBeMjQknLxoMq/1o8qgNh6O8FPiIRWFrGRKOLEcCK91muHEAzg5WGdww7SLrD9hxyZ+4 X-Received: by 2002:aa7:c482:0:b0:505:75f:a2be with SMTP id m2-20020aa7c482000000b00505075fa2bemr600615edq.24.1681348323087; Wed, 12 Apr 2023 18:12:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681348323; cv=none; d=google.com; s=arc-20160816; b=Wd6V/dTvVRXENMX4zWdMcPad7mh8dPE8UDbpGD5Kp4aPWTkORlLlkA9vunzdlPq6nX rX5ZxZ9YMxMkpYhcHepH/HMGQFzW9C7L2azOWFJa7X41V1LK8KCK804IpxVSZIMATiKl 3sqc3P+QSgNtEj9KxlR+Hu1UwpYueAzmsg4tey8uQixIKxfWlqelP8qT8yyUjnN31YNf 7j6UFgATRLhkL0VpqMxNEhpzEQV7+ACJvtbWB+j0pHdymZ1iaR/lCfiOlHtblvpROQf6 F1LQTivVaA6C/hR6I1e6cQ8k2Uny0g3PMYZy6uFWB0MDBc7Bewd05R0++EMaclgxfhPR ABjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=96Io3kHhPRZFLb64v4GRm5wz/k2ztuhR/59YTAmjOGg=; b=RorIafcm9IxYj/vAmWABQe67SkmwQ6wUKMo0InRtaXGwv6uTCQmTDSsQ0azOKdGJQL 04H0FDnDvw/Wo+ubwHDKAVLdSxlZTLHH40vEQUJh/nXva7QxNXt0cgaIMz+GW5mowwgR Am2IdGCJU6IqBD8co68hvuXzFPcEgshbKH+AgYRTenc3ReOpPEKFA1dn6S0t0b1PaE7N 2f3CmIy4po14gqfXdqs2VCGkbeq8lDyN+/D+uqQ/WTMTmXglxv9fo0TlU/CQMLlE2h2w 5x8zidHjAd1zCNhyrhPhMlw3r3rPllnCXNG7GBVNmyxHALA78D77gHr+FmP7ujyJJ1Sl 7Omw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=ZmOtKjTd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t9-20020aa7d709000000b0050480cf2d9csi330505edq.546.2023.04.12.18.11.38; Wed, 12 Apr 2023 18:12:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=ZmOtKjTd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229522AbjDMAxU (ORCPT + 99 others); Wed, 12 Apr 2023 20:53:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjDMAxT (ORCPT ); Wed, 12 Apr 2023 20:53:19 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 640962D66 for ; Wed, 12 Apr 2023 17:53:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=96Io3kHhPRZFLb64v4GRm5wz/k2ztuhR/59YTAmjOGg=; b=ZmOtKjTdvvcrtbSFQ5qm6xAzz/ q3FPe22PEuSCd453TOwHycyDNtnpKMURcem1gaRqcRTB6pPnfPX4h7bYSadxl3aaeUziQSoOy6dmf mPe+UNnGVjGQVgCCRC1rSpLobbnLLNt39QCdc2ZlKVQuhYpGvkzJKO+0doKLr1SUhDGlSkcaRv1bP 9+b4uhUioxr24IUQTPSBkQ0Dq9xc8vTp5vh1BpDHZ52WlrpQGauMT7+USN73IAmeVgUoG6Gkz0yy7 d/OHOf7g+64cKNmo/IDrqpEQp6tVN8uc5eVVvs7PpIgL308w4CmOjsFVB4IFoiaDVpEbpNlDPC0Ix lzEinwdA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1pmlD5-004j9X-2f; Thu, 13 Apr 2023 00:53:11 +0000 Date: Wed, 12 Apr 2023 17:53:11 -0700 From: Luis Chamberlain To: Pankaj Raghav Cc: jan.kiszka@siemens.com, kbingham@kernel.org, gost.dev@samsung.com, linux-kernel@vger.kernel.org, song@kernel.org Subject: Re: [PATCH v2] scripts/gdb: use mem instead of core_layout to get the module address Message-ID: References: <20230412202516.1027149-1-p.raghav@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230412202516.1027149-1-p.raghav@samsung.com> Sender: Luis Chamberlain X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 12, 2023 at 10:25:18PM +0200, Pankaj Raghav wrote: > commit ac3b43283923 ("module: replace module_layout with module_memory") > changed the struct module data structure from module_layout to > module_memory. The core_layout member which is used while loading > modules are not available anymore leading to the following error while > running gdb: > > (gdb) lx-symbols > loading vmlinux > Python Exception : There is no member named core_layout. > Error occurred in Python: There is no member named core_layout. > > Replace core_layout with its new counterpart mem[MOD_TEXT]. > > Fixes: ac3b43283923 ("module: replace module_layout with module_memory") > Signed-off-by: Pankaj Raghav > --- > scripts/gdb/linux/constants.py.in | 3 +++ > scripts/gdb/linux/modules.py | 4 ++-- > scripts/gdb/linux/symbols.py | 4 ++-- > 3 files changed, 7 insertions(+), 4 deletions(-) > > diff --git a/scripts/gdb/linux/constants.py.in b/scripts/gdb/linux/constants.py.in > index 36fd2b145853..471300ba176c 100644 > --- a/scripts/gdb/linux/constants.py.in > +++ b/scripts/gdb/linux/constants.py.in > @@ -62,6 +62,9 @@ LX_GDBPARSED(hrtimer_resolution) > LX_GDBPARSED(IRQD_LEVEL) > LX_GDBPARSED(IRQ_HIDDEN) > > +/* linux/module.h */ > +LX_GDBPARSED(MOD_TEXT) Should we just fill in the rest of the other sections too while at it? Luis