All of lore.kernel.org
 help / color / mirror / Atom feed
* how to configure an image with *full* debugging info in the libs and binaries?
@ 2021-07-16 19:10 Robert P. J. Day
  2021-07-16 21:52 ` [OE-core] " Khem Raj
  2021-07-20  0:05 ` Ross Burton
  0 siblings, 2 replies; 6+ messages in thread
From: Robert P. J. Day @ 2021-07-16 19:10 UTC (permalink / raw)
  To: OE Core mailing list


  colleague just asked me what it would take to generate an image
where the executables and libraries contain all the gdb-related
debugging info in the same files (that is, not broken out in the
.debug directories).

  i pointed out that this would increase the size of the installable
target image substantially but, apparently, that is of no concern.

  said colleague pointed me here as to what they were perusing:

https://developer.ridgerun.com/wiki/index.php?title=Preparing_Yocto_Development_Environment_for_Debugging

so, once i finish this current task, i'm going to take a shot at
testing whether the following would do it:

  # Specifies to build packages with debugging information
  DEBUG_BUILD = "1"
  # Do not remove debug symbols
  INHIBIT_PACKAGE_STRIP = "1"
  # OPTIONAL: Do not split debug symbols in a separate file
  INHIBIT_PACKAGE_DEBUG_SPLIT= "1"

am i on the right track? this seems straightforward enough, i'll just
have to confirm those variables still exist, and that they do what i
want.

  thoughts? is this as simple as i think it should be?

rday

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] how to configure an image with *full* debugging info in the libs and binaries?
  2021-07-16 19:10 how to configure an image with *full* debugging info in the libs and binaries? Robert P. J. Day
@ 2021-07-16 21:52 ` Khem Raj
  2021-07-16 21:57   ` Robert P. J. Day
  2021-07-20  0:05 ` Ross Burton
  1 sibling, 1 reply; 6+ messages in thread
From: Khem Raj @ 2021-07-16 21:52 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list

On Fri, Jul 16, 2021 at 12:10 PM Robert P. J. Day <rpjday@crashcourse.ca> wrote:
>
>
>   colleague just asked me what it would take to generate an image
> where the executables and libraries contain all the gdb-related
> debugging info in the same files (that is, not broken out in the
> .debug directories).
>
>   i pointed out that this would increase the size of the installable
> target image substantially but, apparently, that is of no concern.
>
>   said colleague pointed me here as to what they were perusing:
>
> https://developer.ridgerun.com/wiki/index.php?title=Preparing_Yocto_Development_Environment_for_Debugging
>
> so, once i finish this current task, i'm going to take a shot at
> testing whether the following would do it:
>
>   # Specifies to build packages with debugging information
>   DEBUG_BUILD = "1"
>   # Do not remove debug symbols
>   INHIBIT_PACKAGE_STRIP = "1"
>   # OPTIONAL: Do not split debug symbols in a separate file
>   INHIBIT_PACKAGE_DEBUG_SPLIT= "1"
>
> am i on the right track? this seems straightforward enough, i'll just
> have to confirm those variables still exist, and that they do what i
> want.
>
>   thoughts? is this as simple as i think it should be?

I think you should try

EXTRA_IMAGE_FEATURES_append = " tools-debug dbg-pkgs"

this should get you all needed debug info and tools on target

then if you want to make optimization levels to favor debug info generation
set DEBUG_BUILD = "1"

>
> rday
>
> 
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] how to configure an image with *full* debugging info in the libs and binaries?
  2021-07-16 21:52 ` [OE-core] " Khem Raj
@ 2021-07-16 21:57   ` Robert P. J. Day
  0 siblings, 0 replies; 6+ messages in thread
From: Robert P. J. Day @ 2021-07-16 21:57 UTC (permalink / raw)
  To: Khem Raj; +Cc: OE Core mailing list

On Fri, 16 Jul 2021, Khem Raj wrote:

> On Fri, Jul 16, 2021 at 12:10 PM Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> >
> >
> >   colleague just asked me what it would take to generate an image
> > where the executables and libraries contain all the gdb-related
> > debugging info in the same files (that is, not broken out in the
> > .debug directories).
> >
> >   i pointed out that this would increase the size of the installable
> > target image substantially but, apparently, that is of no concern.
> >
> >   said colleague pointed me here as to what they were perusing:
> >
> > https://developer.ridgerun.com/wiki/index.php?title=Preparing_Yocto_Development_Environment_for_Debugging
> >
> > so, once i finish this current task, i'm going to take a shot at
> > testing whether the following would do it:
> >
> >   # Specifies to build packages with debugging information
> >   DEBUG_BUILD = "1"
> >   # Do not remove debug symbols
> >   INHIBIT_PACKAGE_STRIP = "1"
> >   # OPTIONAL: Do not split debug symbols in a separate file
> >   INHIBIT_PACKAGE_DEBUG_SPLIT= "1"
> >
> > am i on the right track? this seems straightforward enough, i'll just
> > have to confirm those variables still exist, and that they do what i
> > want.
> >
> >   thoughts? is this as simple as i think it should be?
>
> I think you should try
>
> EXTRA_IMAGE_FEATURES_append = " tools-debug dbg-pkgs"

  pretty sure you don't need both "EXTRA_" and "_append". :-)

> this should get you all needed debug info and tools on target
>
> then if you want to make optimization levels to favor debug info
> generation set DEBUG_BUILD = "1"

  i'm ... not convinced (i'll be trying this later), but to be clear,
i don't want separate .debug content, i want a single image with all
the debug info right in the binaries and executables.

  i'll try some things later and we'll see what happens.

rday


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] how to configure an image with *full* debugging info in the libs and binaries?
  2021-07-16 19:10 how to configure an image with *full* debugging info in the libs and binaries? Robert P. J. Day
  2021-07-16 21:52 ` [OE-core] " Khem Raj
@ 2021-07-20  0:05 ` Ross Burton
  2021-07-20 17:58   ` Andre McCurdy
  1 sibling, 1 reply; 6+ messages in thread
From: Ross Burton @ 2021-07-20  0:05 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list

On Fri, 16 Jul 2021 at 20:10, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
>   colleague just asked me what it would take to generate an image
> where the executables and libraries contain all the gdb-related
> debugging info in the same files (that is, not broken out in the
> .debug directories).
>
>   i pointed out that this would increase the size of the installable
> target image substantially but, apparently, that is of no concern.

This is where I have to ask "why?".  All known debugging tools can
handle split-out debuginfo, and getting them all installed into an
image is as simple as IMAGE_FEATURES += dbg-pkgs, as Khem says.

Ross

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] how to configure an image with *full* debugging info in the libs and binaries?
  2021-07-20  0:05 ` Ross Burton
@ 2021-07-20 17:58   ` Andre McCurdy
  2021-07-20 18:10     ` Robert P. J. Day
  0 siblings, 1 reply; 6+ messages in thread
From: Andre McCurdy @ 2021-07-20 17:58 UTC (permalink / raw)
  To: Ross Burton; +Cc: Robert P. J. Day, OE Core mailing list

On Mon, Jul 19, 2021 at 5:06 PM Ross Burton <ross@burtonini.com> wrote:
> On Fri, 16 Jul 2021 at 20:10, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> >   colleague just asked me what it would take to generate an image
> > where the executables and libraries contain all the gdb-related
> > debugging info in the same files (that is, not broken out in the
> > .debug directories).
> >
> >   i pointed out that this would increase the size of the installable
> > target image substantially but, apparently, that is of no concern.
>
> This is where I have to ask "why?".  All known debugging tools can
> handle split-out debuginfo, and getting them all installed into an
> image is as simple as IMAGE_FEATURES += dbg-pkgs, as Khem says.

Why is an interesting side discussion. Getting back to the original
question though, either OE officially supports creating unstripped
binaries or it doesn't. The documentation should perhaps be updated to
make that clear (and if there's legacy support for creating unstripped
binaries still lurking in the code but we don't want anyone to use it,
then maybe it should be removed...).

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] how to configure an image with *full* debugging info in the libs and binaries?
  2021-07-20 17:58   ` Andre McCurdy
@ 2021-07-20 18:10     ` Robert P. J. Day
  0 siblings, 0 replies; 6+ messages in thread
From: Robert P. J. Day @ 2021-07-20 18:10 UTC (permalink / raw)
  To: openembedded-core


Quoting Andre McCurdy <armccurdy@gmail.com>:

> On Mon, Jul 19, 2021 at 5:06 PM Ross Burton <ross@burtonini.com> wrote:
>> On Fri, 16 Jul 2021 at 20:10, Robert P. J. Day  
>> <rpjday@crashcourse.ca> wrote:
>> >   colleague just asked me what it would take to generate an image
>> > where the executables and libraries contain all the gdb-related
>> > debugging info in the same files (that is, not broken out in the
>> > .debug directories).
>> >
>> >   i pointed out that this would increase the size of the installable
>> > target image substantially but, apparently, that is of no concern.
>>
>> This is where I have to ask "why?".  All known debugging tools can
>> handle split-out debuginfo, and getting them all installed into an
>> image is as simple as IMAGE_FEATURES += dbg-pkgs, as Khem says.
>
> Why is an interesting side discussion. Getting back to the original
> question though, either OE officially supports creating unstripped
> binaries or it doesn't. The documentation should perhaps be updated to
> make that clear (and if there's legacy support for creating unstripped
> binaries still lurking in the code but we don't want anyone to use it,
> then maybe it should be removed...).

It *appears* the combination of:

INHIBIT_PACKAGE_STRIP = '1'
INHIBIT_PACKAGE_DEBUG_SPLIT = '1'

does what I want (at least at first glance). As to "why", I have been
told there is a build/test infrastructure in place that works with just
this format, and they would like to just keep doing that. And, frankly,
that's a perfectly good reason.

rday






^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-20 18:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-16 19:10 how to configure an image with *full* debugging info in the libs and binaries? Robert P. J. Day
2021-07-16 21:52 ` [OE-core] " Khem Raj
2021-07-16 21:57   ` Robert P. J. Day
2021-07-20  0:05 ` Ross Burton
2021-07-20 17:58   ` Andre McCurdy
2021-07-20 18:10     ` Robert P. J. Day

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.