This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: How do I trap the return of a function in a user space process?
- From: Martin Martin <martin at infinio dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: "Yichun Zhang (agentzh)" <agentzh at gmail dot com>, systemtap at sourceware dot org
- Date: Mon, 9 Sep 2013 08:23:11 -0400
- Subject: Re: How do I trap the return of a function in a user space process?
- Authentication-results: sourceware.org; auth=none
- References: <CAAQ0mPjJeQcYoKNc=1PhgCF1Z=iQjPuueTxAwQxNnzwCaCY_Hg at mail dot gmail dot com> <CAB4Tn6Oq8O_NVvfWNyrEqaNWuARMDAtK_FGWjLGHd4YaJiNMLw at mail dot gmail dot com> <CAAQ0mPjgOx3oNy5K0iXKj4wiNgC64Xy-dE_K=AeFTJB+3b4bVw at mail dot gmail dot com> <CAAQ0mPi5YLS9uv8EismftJvDcpbQHk2_eqikZsgXpDZBEXX7Lw at mail dot gmail dot com> <CAAQ0mPgQs59g7DCUZEeViKJJZKLuua4ErrBYLVc0-RMKp6xMWw at mail dot gmail dot com> <y0mppslec1l dot fsf at fche dot csb>
Here's a simple one. If you remove the namespace, stap -l shows fun,
but as below, it doesn't:
namespace yummy {
class Foo {
int fun();
};
int Foo::fun() { return 23; }
}
int main()
{
}
A quick google search shows Clang doesn't pass the GDB 7.5 test suite,
so it seems there are known errors with DWARF generation, but
presumably something this basic should work?
http://llvm.org/bugs/show_bug.cgi?id=14330
Best,
Martin
On Fri, Sep 6, 2013 at 8:00 PM, Frank Ch. Eigler <fche@redhat.com> wrote:
> Martin Martin <martin@infinio.com> writes:
>
>> I manged to solve this problem: I was compiling with clang++.
>> Switching to g++ caused all my functions to show up.
>
> Can clang++ generate DWARF data? It'd be interesting to
> see a sample binary that stap cannot deal with.
>
> - FChE