How do I trap the return of a function in a user space process?

Martin Martin martin@infinio.com
Mon Sep 9 12:23:00 GMT 2013


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



More information about the Systemtap mailing list