All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Doug Anderson <dianders@chromium.org>
Cc: Kieran Bingham <kbingham@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	kgdb-bugreport@lists.sourceforge.net,
	Jason Wessel <jason.wessel@windriver.com>,
	Daniel Thompson <daniel.thompson@linaro.org>,
	Stephen Boyd <swboyd@chromium.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] scripts/gdb: Handle split debug
Date: Wed, 31 Jul 2019 18:23:53 +0200	[thread overview]
Message-ID: <9e3604b2-57dd-7f79-392d-47bb34eb5137@siemens.com> (raw)
In-Reply-To: <CAD=FV=Uqa79UyFFj6zrr_B=rrwfmJAFLLatf8wQ73V70U-frvA@mail.gmail.com>

On 31.07.19 17:44, Doug Anderson wrote:
> Hi,
> 
> On Wed, Jul 31, 2019 at 7:24 AM Jan Kiszka <jan.kiszka@siemens.com> 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.kiszka@siemens.com>

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

      reply	other threads:[~2019-07-31 16:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 23:40 [PATCH] scripts/gdb: Handle split debug Douglas Anderson
2019-07-31 14:17 ` Stephen Boyd
2019-07-31 14:24 ` Jan Kiszka
2019-07-31 15:44   ` Doug Anderson
2019-07-31 16:23     ` Jan Kiszka [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e3604b2-57dd-7f79-392d-47bb34eb5137@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=akpm@linux-foundation.org \
    --cc=daniel.thompson@linaro.org \
    --cc=dianders@chromium.org \
    --cc=jason.wessel@windriver.com \
    --cc=kbingham@kernel.org \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swboyd@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.