Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6125905ybi; Wed, 31 Jul 2019 08:45:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqyjCgZpy6Ts/Ct/9DIVpTaT1IQdoa0H7jNVAd+mJrfJ123KEAPR5pykRadLUfucjmc2/iYB X-Received: by 2002:a63:184b:: with SMTP id 11mr54076312pgy.112.1564587956353; Wed, 31 Jul 2019 08:45:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564587956; cv=none; d=google.com; s=arc-20160816; b=TwlRXqJWsxAu/w1znkdaI6sGQfCpgg95yHsv8E9Fi/vowGcGk6rFeiE2TK4zr2u6OY U8jZRJfzxcKO4W1ViK/Z+EGnvBhVT6J/K92oGqlIIaDajFKfs3o4+mZhG79tsY/vB5Q3 gikMiDFUrROi5kaw1Z87hmK9B534YTQXIlVLArmewnIjPGfBco+fBni9DYP1bLuHBwcO glOiXuc5kY84FystSaD0Ru58SyA/N9RQ418fGvB/ET5mBg3U31CsGzgql2fVnQ3+7teU JO4T3rSZWBrMcbUVOCcVD7BIH1ZxCvMBgtGKeRFCqKeu1Ks925uDnsEyNJ+PMh//Su9U n80g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=qsX4XfgYHIx0Ks8iO8OgXUq5IkTUq6aae68f1+yjlQI=; b=TLRRg6e9zlXQN65DbA1Sqthc3QS89A/labFYXz29iCarOGDUzwvAih3+g2d3MTkxzD Rlt/VudIEHOGfLwODZc8+VM2o6O2CG4SOF5urP9rHnt673qeC6IsfbIpC2tCT53mmS6N FDSduzUq5n1ZocfkWQKxGxj/EesXxUq21Jgq2TZo7Ctsb1bHTwidsHNjcK+ooGALdV7D YzdU+hAj4d2pyTv5JcpFbL3pcSdKp2LiXlPis7J1SHobc7g9XgyVbCtTU/7mQXiRfBVp 8TcgD1+lnW4x5Ag168tgsC+gZ4zzvBYy3Es0VRBFDq0vUwY+329rxNEQXpsV1KJNJbSH AQkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WxvIw2iy; 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 c1si30991346pgw.444.2019.07.31.08.45.40; Wed, 31 Jul 2019 08:45:56 -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=WxvIw2iy; 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 S1728739AbfGaPot (ORCPT + 99 others); Wed, 31 Jul 2019 11:44:49 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:33363 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725209AbfGaPos (ORCPT ); Wed, 31 Jul 2019 11:44:48 -0400 Received: by mail-io1-f68.google.com with SMTP id z3so18415451iog.0 for ; Wed, 31 Jul 2019 08:44:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qsX4XfgYHIx0Ks8iO8OgXUq5IkTUq6aae68f1+yjlQI=; b=WxvIw2iyPVeIC/iNqk7I2SIHISdvuL90JO15ijRYglvi7BlFkdCQcF6FpMSHtw9dht Jz34vclpuQCNmGLOzlSWm4/DhBnIeTDcgJeajGCyhjsTsICrv14fQI1J7LZ4+vJ0qeyr araBDazAnWOXtK000jiQtp6ObIomOwJ8NRqJ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qsX4XfgYHIx0Ks8iO8OgXUq5IkTUq6aae68f1+yjlQI=; b=VvNGH+tFu4iN3Pfq34I7w2m39HRRPt9w0YGKsSc8QHdEofqs2qNBrc40VeV48WT9fG YfaIWdaY0V9ieQkrKCChX7U8ZZvpAuDuByrOwwIhTQV2vUkj3TyyJx4viz10iEXc3r/3 rizAB07RtcE/1z5SHZ7gxsGefQrcOvkjWxPBHz8LTQnafwIfo7SXPhDotl+K42QGOX38 +swUFjUFHfQd+WQ8P8CuyDpwm24z1doZ0CCez9iczGtnIdENGpJhbTt4cVoMpd3cV3qp ixguSZnXaGEiphBNjCquSw2IhY9XVDGwnSIpIjQz6oTXQOI6lsPW4SlQDoDV2VH9S2m6 rKKg== X-Gm-Message-State: APjAAAXyiiaFtK5EL89TM/SGVRfgQQjYgI6MI2twRXV1tHNXGfQrmVov v6WmSNwf3qgmB+Ug1mnObcyL+QeVMTg= X-Received: by 2002:a5d:964d:: with SMTP id d13mr18753599ios.224.1564587888026; Wed, 31 Jul 2019 08:44:48 -0700 (PDT) Received: from mail-io1-f54.google.com (mail-io1-f54.google.com. [209.85.166.54]) by smtp.gmail.com with ESMTPSA id z17sm90894300iol.73.2019.07.31.08.44.46 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Wed, 31 Jul 2019 08:44:46 -0700 (PDT) Received: by mail-io1-f54.google.com with SMTP id h6so12093657iom.7 for ; Wed, 31 Jul 2019 08:44:46 -0700 (PDT) X-Received: by 2002:a5d:885a:: with SMTP id t26mr4018292ios.218.1564587885757; Wed, 31 Jul 2019 08:44:45 -0700 (PDT) MIME-Version: 1.0 References: <20190730234052.148744-1-dianders@chromium.org> <34bbd6b5-2e37-159a-b75b-36a6be11c506@siemens.com> In-Reply-To: <34bbd6b5-2e37-159a-b75b-36a6be11c506@siemens.com> From: Doug Anderson Date: Wed, 31 Jul 2019 08:44:30 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] scripts/gdb: Handle split debug To: Jan Kiszka Cc: Kieran Bingham , Andrew Morton , kgdb-bugreport@lists.sourceforge.net, Jason Wessel , Daniel Thompson , Stephen Boyd , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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