]> code.ossystems Code Review - openembedded-core.git/commit
package.bbclass: only one hardlink of separated debug info file in each directory
authorHongxu Jia <hongxu.jia@windriver.com>
Fri, 24 Aug 2018 07:00:31 +0000 (15:00 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 28 Aug 2018 09:27:15 +0000 (10:27 +0100)
commitd4eaf42f7708f8d3a31a04d958bd7420dd7dd6b9
treee2d44a146653961b3ecccc312894d9d6a78daa7c
parent0791c4d39edbedaa493a9fc6aa6e7415f14980bb
package.bbclass: only one hardlink of separated debug info file in each directory

While multiple hardlinks of binary located in different dirs,
there are also multiple hardlinks of separated debug info file
with the same binary name in same debug dirs. But in each dir,
only one debug file with original name works. Because all of
binary hardlinks have one `.gnu_debuglink' which is added in
`splitdebuginfo'. It caused gdb could not find debugging
symbols.

[Before the patch]
$ find .
./usr/bin/foo
./usr/bin/foo-hd1
./usr/bin/.debug
./usr/bin/.debug/foo
./usr/bin/.debug/foo-hd1
./usr/libexec/foo-hd2
./usr/libexec/.debug
./usr/libexec/.debug/foo-hd2

$ readelf --debug-dump usr/libexec/foo-hd2
Contents of the .gnu_debuglink section:
  Separate debug info file: foo

$ gdb usr/libexec/foo-hd2
Reading symbols from usr/libexec/foo-hd2...(no debugging symbols found)...done.
[Before the patch]

[Apply the patch]
$ find .
./usr/bin/foo
./usr/bin/foo-hd1
./usr/bin/.debug
./usr/bin/.debug/foo
./usr/libexec/foo-hd2
./usr/libexec/.debug
./usr/libexec/.debug/foo

$ gdb usr/libexec/foo-hd2
Reading symbols from usr/libexec/foo-hd2...Reading symbols from usr/libexec/.debug/foo...done.
[Apply the patch]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass