This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap 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: How do I trap the return of a function in a user space process?


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


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