[yocto] Question about automatic debug package generation

Hans Beckérus hans.beckerus at gmail.com
Thu Sep 26 23:49:53 PDT 2013


On Fri, Sep 27, 2013 at 8:11 AM, Brad Litterell <brad at evidence.com> wrote:
> Thanks Nicolas!
>
> Sent from my Windows Phone
> ________________________________
> From: Nicolas Dechesne
> Sent: 9/26/2013 15:29
> To: Brad Litterell
> Cc: yocto at yoctoproject.org
> Subject: Re: [yocto] Question about automatic debug package generation
>
>
> On Fri, Sep 27, 2013 at 12:00 AM, Brad Litterell <brad at evidence.com> wrote:
>>
>> My recipe builds and ships an executable in /foo/bin/fooapp
>>
>> FILES_${PN} += "/foo/bin/*"
>>
>> WARNING: QA Issue: foo: Files/directories were installed but not shipped
>>   /foo/bin/.debug
>>   /foo/bin/.debug/fooapp
>>
>> This file doesn't appear in the image, but is in the package folder:
>> ./package/foo/bin/.debug/fooapp
>>
>> It appears something is automatically creating these .debug files during
>> the packaging steps, but the corresponding file isn't under packages-split.
>>
>> Can someone point me to a place to learn more about how these are created
>> and packaged?
>
>
> this is done in meta/classes/package.bbclass. at the beginning of that file,
> you will find an overall description of what the 'packaging' steps are, and
> you can see, among many things:
>
> # d) split_and_strip_files - split the files into runtime and debug and
> strip them.
> #    Debug files include debug info split, and associated sources that end
> up in -dbg packages
> you can then check the source code for the function split_and_strip_files.
>
> Now, about 'packaging' the files, you need to look at meta/conf/bitbake.conf
> and search for FILES_{PN}-dbg. this is the default variable that specifies
> which files go into the -dbg package. Your issue above is because the
> 'default' path for binary is /usr/bin, hence the 'default' path for debug
> variants is /usr/bin/.debug. But if you need '/foo' , you can change these
> default in your recipe, by modifying FILES_{PN}xxx in your .bb file.
>
>
Actually, I have a related question. If you choose to install -dbg
variants, you will get a .debug folder copied to the target.
That .debug folder can then be pointed out by debuggers etc. to get
the symbol information, right?
How can the package handler know what files to strip? Does it use some
simple file magic match? I have a case now for which I made a set of
working recipes for Erlang. Erlang .beam files also contain symbols
that can be stripped, but not the conventional way. I guess I need to
add something to the do_package phase to compensate for that, but will
it interfere with what is done in package.bbclass?

Thanks.
Hans

>
>
>
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



More information about the yocto mailing list