Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6167723ybi; Wed, 31 Jul 2019 09:25:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtvcRTswLu34h9J65fEsif1iyipZ1Y2YBLgjPidQ8Srnb/54ziiukKFYPmi7Lp5iiRihVN X-Received: by 2002:a65:6281:: with SMTP id f1mr108126562pgv.400.1564590338160; Wed, 31 Jul 2019 09:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564590338; cv=none; d=google.com; s=arc-20160816; b=CwLLGnbjRhqfSpfL/GYtzOxw8ApcgpCZM6C2pSePeMlbWZxHdxbScHudehfeNWj62d vwwJMuZPMXukrOb8FAQXJOCBNnnx/rTVca5KM6fmE0d3DHbsBfe7qa2nKlL49tX0bZTV PhnO9ryNduc7Ip38W0uaF56Yi/P2KA9xmGKQ/TH6NeJ4d6lhlULicETVRtQAFF+eJ2j8 Uqz2Qi8rHzTnS6LowRSPy2tCjKVRZLR0ncCM9MyozGl9zw0UY5qWpf/vS1smTP5UfY94 cdnlNxv/FBE4uszH+vI1DK4ywnY0vVkvTmJ20HAMTEMgfniCx2+j80LsjNuFXCHZOU3h QMCQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=9GXJcRukphIX4939v/26gh9U3B69/cSROLBLCGp+woc=; b=iItLFqSrX53ulKxfgblzGFa+RRl29fUDyOtBzIlutaUSal2O/LaogpdQ1cqXlqw/WI wsRm0RcglPFN/beT3+YYSB0PPRAzsyZRE4mXtuw4QqyfNyIwiMLD1U1utqG94W2NlW7s b+tVwlxQPKoZs50RJmniGuNCX7eo8ifdEloylvdppajiUeTNweBobtlbMGmK/0GDeN+o EST1sm0AXEhAnAG4lXMRiLDa1NgqIbcnGUXO1+jACkRyBOqhNYwhT0wzfZPij5YJJaEE zu6O8L/b1Dq94A9KxCTpBjilVIZ2zpoMP7z2jUPkN1LbAODCpTRS6/9Wgb2H2bhYmdUP QTUg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 15si11364012pgu.98.2019.07.31.09.25.22; Wed, 31 Jul 2019 09:25:38 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728543AbfGaQYO (ORCPT + 99 others); Wed, 31 Jul 2019 12:24:14 -0400 Received: from lizzard.sbs.de ([194.138.37.39]:57591 "EHLO lizzard.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727941AbfGaQYN (ORCPT ); Wed, 31 Jul 2019 12:24:13 -0400 Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id x6VGNsMW016786 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 31 Jul 2019 18:23:54 +0200 Received: from [139.25.68.37] (md1q0hnc.ad001.siemens.net [139.25.68.37] (may be forged)) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id x6VGNsUO025479; Wed, 31 Jul 2019 18:23:54 +0200 Subject: Re: [PATCH] scripts/gdb: Handle split debug To: Doug Anderson Cc: Kieran Bingham , Andrew Morton , kgdb-bugreport@lists.sourceforge.net, Jason Wessel , Daniel Thompson , Stephen Boyd , LKML References: <20190730234052.148744-1-dianders@chromium.org> <34bbd6b5-2e37-159a-b75b-36a6be11c506@siemens.com> From: Jan Kiszka Message-ID: <9e3604b2-57dd-7f79-392d-47bb34eb5137@siemens.com> Date: Wed, 31 Jul 2019 18:23:53 +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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31.07.19 17:44, Doug Anderson wrote: > Hi, > > On Wed, Jul 31, 2019 at 7:24 AM Jan Kiszka wrote: >> >> On 31.07.19 01:40, Douglas Anderson wrote: >>> 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". >> >> Is this split-up depending on additional kernel patches, is this already >> possible with mainline, or is this purely a packaging topic? Wondering because >> of testability in case it's downstream-only. > > It is a packaging topic. You can take a normal elf file and split the > debug out of it using objcopy. Try "man objcopy" and then take a look > at the "--only-keep-debug" option. It'll give you a whole recipe for > doing splitdebug. The suffix used for the debug symbols is arbitrary. > If people have other another suffix besides ".ko.debug" then we could > presumably support that too... > > For portage (which is the packaging system used by Chrome OS) split > debug is supported by default (and the suffix is .ko.debug). ...and > so in Chrome OS we always get the installed elf files stripped and > then the symbols stashed away. > > At the moment we don't actually use the normal portage magic to do > this for the kernel though since it affects our ability to get good > stack dumps in the kernel. We instead pass a script as "strip" [1]. > > > [1] https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/refs/heads/master/eclass/cros-kernel/strip_splitdebug > > > -Doug > Thanks, makes perfect sense to me. You may add my Reviewed-by: Jan Kiszka Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux