From: HOUSSEN Franck <fghoussen@gmail.com>
To: linux-perf-users@vger.kernel.org
Subject: perf-probe : error "Rebuild with -g, or install an appropriate debuginfo package"
Date: Wed, 30 Nov 2016 14:49:09 +0100 [thread overview]
Message-ID: <CABvthiqmUuGqcDU6LQRJhsPiic4-qePRx8wJtMoj+D+ihjAVdg@mail.gmail.com> (raw)
I compiled myApp.cpp (that contains a function named myFunction) with:
~>mpic++ -O2 -ggdb -fno-omit-frame-pointer -o myApp myApp.cpp
When I try to probe a function from the myApp binary, I get:
~> sudo perf probe --exe ./myApp --add "myFunction:2"
The /home/path/to/myApp file has no debug information.
Rebuild with -g, or install an appropriate debuginfo package.
Error: Failed to add events.
... -g has been set a t compile time and libelf (and libelf-dev) seems
to be installed:
~> dpkg -l *elf*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version
Architecture Description
+++-=====================================-=======================-===================
un elf-binutils <none>
<none> (no description available)
un libelf <none>
<none> (no description available)
ii libelf-dev:amd64 0.166-2.2
amd64 libelf1 development libraries and header files
un libelf0 <none>
<none> (no description available)
ii libelf1:amd64 0.166-2.2
amd64 library to read and write ELF files
ii libelf1:i386 0.166-2.2 i386
library to read and write ELF files
rc libelfg0:amd64 0.8.13-5
amd64 an ELF object file access library
un libelfg0-dev <none>
<none> (no description available)
I googled that without any relevant answer... Could somebody help me
on this ? What's wrong ?
Franck
PS : When I do that
~>sudo perf probe --exe ./myApp --add "myFunction"
Added new event:
probe_myApp:myFunction (on myFunction in /home/path/to/myApp)
It works !?... I need to place the tracepoint at the second line below
the entry of myFunction => replacing "myFunction" with "myFunction:2"
does not work ! Why ?...
next reply other threads:[~2016-11-30 13:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-30 13:49 HOUSSEN Franck [this message]
2016-12-01 5:26 ` perf-probe : error "Rebuild with -g, or install an appropriate debuginfo package" Masami Hiramatsu
2016-12-02 10:40 ` HOUSSEN Franck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABvthiqmUuGqcDU6LQRJhsPiic4-qePRx8wJtMoj+D+ihjAVdg@mail.gmail.com \
--to=fghoussen@gmail.com \
--cc=linux-perf-users@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).