This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: profile mode output analysis (call stacks to source code mapping)


On Fri, May 7, 2010 at 7:09 AM, Karel Gardas <gardask@gmail.com> wrote:
> with recent fixes into profile mode I've succeed even using it for
> MICO[1] on OpenSolaris platform. Is there any tool which
> translates call stacks to humans or is there any documentation/hint
> how to use generated call stack information to find out appropriate
> place in the source code?
Mapping code addresses to function names and line numbers is system
dependent. That's one reason why line numbers are not produced by the
profile mode directly.
If you are using binutils, this should give you precise line number
information for debug binaries.
addr2line -e <path_to_binary> addr1 addr2 ...
If you don't have debug information or the debug information is
imprecise, you should still be able to map addresses to function
names:
addr2line -f -e <path_to_binary> addr1 addr2 ...
Other useful addr2line options are -i (print inlined stacks) and -C
(demangle C++ names).
Silvius

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

AltStyle によって変換されたページ (->オリジナル) /