scripts/gdb: handle split debug
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
This 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" .
Signed-off-by: Douglas Anderson <email@example.com>
Reviewed-by: Stephen Boyd <firstname.lastname@example.org>
Reviewed-by: Jan Kiszka <email@example.com>
Cc: Kieran Bingham <firstname.lastname@example.org>
Cc: Jason Wessel <email@example.com>
Cc: Daniel Thompson <firstname.lastname@example.org>
Signed-off-by: Andrew Morton <email@example.com>
1 file changed