Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Generating Debug Info Files
@ 2015-05-13 16:40 John OSullivan
  2015-05-14 19:59 ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: John OSullivan @ 2015-05-13 16:40 UTC (permalink / raw)
  To: buildroot

Hi,

When I run perf on my buildroot based system it complains about missing
symbols for my libraries and applications. I know it is possible to generate
binaries with symbolic information in the staging area by selecting 'build
packages with debugging symbols', but is there any way of generating
separate .debug type files or do I need to do this in postBuild with a
script based on objcopy.

 

Regards

John

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150513/dc056904/attachment.html>

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

* [Buildroot] Generating Debug Info Files
  2015-05-13 16:40 [Buildroot] Generating Debug Info Files John OSullivan
@ 2015-05-14 19:59 ` Thomas Petazzoni
  2015-05-15 11:05   ` John OSullivan
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2015-05-14 19:59 UTC (permalink / raw)
  To: buildroot

Dear John OSullivan,

On Wed, 13 May 2015 17:40:31 +0100, John OSullivan wrote:

> When I run perf on my buildroot based system it complains about missing
> symbols for my libraries and applications. I know it is possible to generate
> binaries with symbolic information in the staging area by selecting 'build
> packages with debugging symbols', but is there any way of generating
> separate .debug type files or do I need to do this in postBuild with a
> script based on objcopy.

No, we don't have support for separate .debug files currently.

But how would it work exactly, since perf is running on the target?

Don't you simply need to have debugging symbols on the target? If
that's the case, you can simply do BR2_ENABLE_DEBUG=y and
BR2_strip_none=y.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] Generating Debug Info Files
  2015-05-14 19:59 ` Thomas Petazzoni
@ 2015-05-15 11:05   ` John OSullivan
  2015-05-15 13:12     ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: John OSullivan @ 2015-05-15 11:05 UTC (permalink / raw)
  To: buildroot

Hi Thomas,
Thanks for your reply, I already have debugging symbols on for the test 
application running on my target but perf still complains:
Failed to open test_application, continuing without symbols

The file has symbols and is not stripped and gdb has no problem finding 
the symbols so I think the issue is that perf is expecting to find the 
symbols in some separate file, its difficult to get clarity on this but 
I believe that in Ubuntu you would install a debug package, I believe 
this installs separate files with symbol information in certain 
locations like for example /usr/lib/.debug for libraries.
I was going to try and do something similar with my buildroot file 
system to see if it resolved the perf problem.

regards
John

On 14/05/15 20:59, Thomas Petazzoni wrote:

> Dear John OSullivan,
>
> On Wed, 13 May 2015 17:40:31 +0100, John OSullivan wrote:
>
>> When I run perf on my buildroot based system it complains about missing
>> symbols for my libraries and applications. I know it is possible to generate
>> binaries with symbolic information in the staging area by selecting 'build
>> packages with debugging symbols', but is there any way of generating
>> separate .debug type files or do I need to do this in postBuild with a
>> script based on objcopy.
> No, we don't have support for separate .debug files currently.
>
> But how would it work exactly, since perf is running on the target?
>
> Don't you simply need to have debugging symbols on the target? If
> that's the case, you can simply do BR2_ENABLE_DEBUG=y and
> BR2_strip_none=y.
>
> Best regards,
>
> Thomas

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

* [Buildroot] Generating Debug Info Files
  2015-05-15 11:05   ` John OSullivan
@ 2015-05-15 13:12     ` Thomas Petazzoni
  2015-05-15 15:46       ` John O'Sullivan
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2015-05-15 13:12 UTC (permalink / raw)
  To: buildroot

Dear John OSullivan,

On Fri, 15 May 2015 12:05:25 +0100, John OSullivan wrote:

> Thanks for your reply, I already have debugging symbols on for the test 
> application running on my target but perf still complains:
> Failed to open test_application, continuing without symbols

Ok.

> The file has symbols and is not stripped and gdb has no problem finding 
> the symbols so I think the issue is that perf is expecting to find the 
> symbols in some separate file, its difficult to get clarity on this but 
> I believe that in Ubuntu you would install a debug package, I believe 
> this installs separate files with symbol information in certain 
> locations like for example /usr/lib/.debug for libraries.
> I was going to try and do something similar with my buildroot file 
> system to see if it resolved the perf problem.

I am not sure that having the debugging symbols in a separate file
makes a difference here. It's indeed the way desktop/server distros
such as Ubuntu distribute the debugging symbols, but I 'm not sure it
will make a difference for perf.

Maybe perf needs some dependency such as libunwind to be able to use
the debugging symbols?

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] Generating Debug Info Files
  2015-05-15 13:12     ` Thomas Petazzoni
@ 2015-05-15 15:46       ` John O'Sullivan
  0 siblings, 0 replies; 5+ messages in thread
From: John O'Sullivan @ 2015-05-15 15:46 UTC (permalink / raw)
  To: buildroot



On 15/05/15 14:12, Thomas Petazzoni wrote:
> Dear John OSullivan,
>
> On Fri, 15 May 2015 12:05:25 +0100, John OSullivan wrote:
>
>> Thanks for your reply, I already have debugging symbols on for the test
>> application running on my target but perf still complains:
>> Failed to open test_application, continuing without symbols
> Ok.
>
>> The file has symbols and is not stripped and gdb has no problem finding
>> the symbols so I think the issue is that perf is expecting to find the
>> symbols in some separate file, its difficult to get clarity on this but
>> I believe that in Ubuntu you would install a debug package, I believe
>> this installs separate files with symbol information in certain
>> locations like for example /usr/lib/.debug for libraries.
>> I was going to try and do something similar with my buildroot file
>> system to see if it resolved the perf problem.
> I am not sure that having the debugging symbols in a separate file
> makes a difference here. It's indeed the way desktop/server distros
> such as Ubuntu distribute the debugging symbols, but I 'm not sure it
> will make a difference for perf.
>
> Maybe perf needs some dependency such as libunwind to be able to use
> the debugging symbols?
Then I guess I would need to move from buildroot 2013-05 to 
buildroot-2015-02 before the perf stuff would work as this would give me 
libunwind. I can try that and see if it makes a difference.
>
> Thomas

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

end of thread, other threads:[~2015-05-15 15:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-13 16:40 [Buildroot] Generating Debug Info Files John OSullivan
2015-05-14 19:59 ` Thomas Petazzoni
2015-05-15 11:05   ` John OSullivan
2015-05-15 13:12     ` Thomas Petazzoni
2015-05-15 15:46       ` John O'Sullivan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox