Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5264536ybi; Tue, 30 Jul 2019 17:22:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQQ1F+slnQoc8Hc0GiyC1qJMKvaHPk5rzJS9Dd5UR0FHBdb5qbglsIZZKCwPOuvqu3MyeH X-Received: by 2002:a62:ae02:: with SMTP id q2mr43430935pff.1.1564532579227; Tue, 30 Jul 2019 17:22:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564532579; cv=none; d=google.com; s=arc-20160816; b=VV8zfIXVZhnqcLGNCBuxSCtq+hh5VDrw21qpliqfpn1N5rZcSMp4gsngcH0kLtd3P1 hEJWWbiPDzDDv55ODNVibT1kY0JdA/zWjDnKWs3bZAZFDjEPKhBU/HDjO1vf0bFhPPAp P5sIdiuTTwKke/jrUJtXGt5VdBBd76lpJthHXISdtO9VBEogR7Z7HWmwM4rwzU2Ihrns GX3y6EdrwvRL+dxoLGn5tMa86Vp582E2/QI0sUgYSlJzgy3FYSBWtlNapYZBGa5NGZ/l wGk60W7fDa0wXgdD8HtlDbT+c1yPujmFfAtXoPgDe735/86kdHBs6WofrgJ7nACPIRu2 wzRQ== 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=BSa7l69bHF4dPAb8gb5NP/5/SL+YaF6sYOOZvuhAWNI=; b=jJ5o1Eexcm+gxZdoLlyuzEAEU0J6mAInKvxU0TPtf7rXRo/8TQnPldRF9funOwaYvL qZTfkMN8mK4zf0C9psnyUYsmpYb0XaRRpTILvwMSVXmL4Bn19GIbkBr2ukT50QOrxRKs sxSbF/xgbvLAAaq8bLLgf/HnjqrMGetYt2IXurJOJ17iit1ROTljxnDRCkILvAqQZWDQ BvrKv0t/w1XNyKvNw1Fkvsu+4jxY7HSIe8gnYrtyE51F8AndRvKZQukcUV0OfyKH8Pk0 h3wWijiMI2m1NKq1UjqVmh4dwOsubdwVTfdHlob1SrZbEE028nfKwrPiaIWq8Bm0Dv6T dpcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=MoqGY6iT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x25si31665231pfn.13.2019.07.30.17.22.44; Tue, 30 Jul 2019 17:22:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=MoqGY6iT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727813AbfG3XlG (ORCPT + 99 others); Tue, 30 Jul 2019 19:41:06 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:37303 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725877AbfG3XlG (ORCPT ); Tue, 30 Jul 2019 19:41:06 -0400 Received: by mail-pl1-f194.google.com with SMTP id b3so29550109plr.4 for ; Tue, 30 Jul 2019 16:41:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BSa7l69bHF4dPAb8gb5NP/5/SL+YaF6sYOOZvuhAWNI=; b=MoqGY6iTg3hEO4gKx4Wtf3pREuvvP0H7nvS1wLo0diUb+vTJKR+vvBSQ4FF0nxpYzg sHGhTOg6OVimuC48NJhn/Hwu3P2aK1D/xsIJWXY8WLT0vAw/qDbF0cJE8bST3SvdkZoU bNhwoPpAdn+FnMjJdzKHo4F+aetnvnhz7ohTU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BSa7l69bHF4dPAb8gb5NP/5/SL+YaF6sYOOZvuhAWNI=; b=QpGBlWg+0klwv9PBpC7UXWJKcmmBwANYtJhV9URw6V4h8h4bBowaP0E2xVPRtDWfsv 8wXe2yRxYl18+YfyN2a15KfAJL6ylUBea0dVGfLsK8MQSK3x9wEvBmuuvg030UUJdwYB rrNW9jfZV/rKAarLQ1mmaoSFA07hDmVXzW++wl/7cELOFtxaD/jJnXAdYeZ/0jeQIqor PaMYVK5oxMv++JKoEiV76wkZE68FNltGkKlo8y/GsFkT+ZUeaxzL1z9nNdPxvpSZWF0L GtnQ+FvViwXHNoDt3SzG1ghWb9lEp0HaW9+pGRg5a9S69rm2mxaCpfgvks5cssCWaQtJ p8gw== X-Gm-Message-State: APjAAAWdOF5guu62CBGZ6/EXD/aYcSEd0jWR6C/axqONozWpJNT2r4Hk Px6BrkRwQtfb4sqFaF05uHFA2Q== X-Received: by 2002:a17:902:24a2:: with SMTP id w31mr41359301pla.324.1564530065665; Tue, 30 Jul 2019 16:41:05 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:24fa:e766:52c9:e3b2]) by smtp.gmail.com with ESMTPSA id u128sm74772530pfu.48.2019.07.30.16.41.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 30 Jul 2019 16:41:05 -0700 (PDT) From: Douglas Anderson To: Jan Kiszka , Kieran Bingham , Andrew Morton Cc: kgdb-bugreport@lists.sourceforge.net, Jason Wessel , Daniel Thompson , Stephen Boyd , Douglas Anderson , linux-kernel@vger.kernel.org Subject: [PATCH] scripts/gdb: Handle split debug Date: Tue, 30 Jul 2019 16:40:52 -0700 Message-Id: <20190730234052.148744-1-dianders@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some systems (like Chrome OS) may use "split debug" for kernel modules. That means that the debug symbols are in a different file than the main elf file. Let's handle that by also searching for debug symbols that end in ".ko.debug". Signed-off-by: Douglas Anderson --- scripts/gdb/linux/symbols.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py index 2f5b95f09fa0..34e40e96dee2 100644 --- a/scripts/gdb/linux/symbols.py +++ b/scripts/gdb/linux/symbols.py @@ -77,12 +77,12 @@ lx-symbols command.""" gdb.write("scanning for modules in {0}\n".format(path)) for root, dirs, files in os.walk(path): for name in files: - if name.endswith(".ko"): + if name.endswith(".ko") or name.endswith(".ko.debug"): self.module_files.append(root + "/" + name) self.module_files_updated = True def _get_module_file(self, module_name): - module_pattern = ".*/{0}\.ko$".format( + module_pattern = ".*/{0}\.ko(?:.debug)?$".format( module_name.replace("_", r"[_\-]")) for name in self.module_files: if re.match(module_pattern, name) and os.path.exists(name): -- 2.22.0.709.g102302147b-goog