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?


On Mon, Sep 09, 2013 at 11:32:16AM -0700, Josh Stone wrote:
> On 09/09/2013 11:13 AM, Mark Wielaard wrote:
> > The problem is that clang generates both the foo declaration TAG and
> > the actual foo subprogram TAG under the namespace and class_type TAG.
> 
> FWIW, on my system (with clang-3.3-0.6.rc3.fc19.x86_64) I get the second
> subprogram within just the namespace, not the class.  Don't know if
> yours is different, or maybe you just misread the indentation.  It would
> be not quite so ugly if dwarf_getfuncs only had to descend into
> namespace DIEs.

Your eyes are clearly better than mine :) Indeed the declaration is
under the class_type, but the instance is just under the namespace.
 
> BTW, there is a similar problem with GCC nested functions, e.g. stap
> can't see the deepen() functions in stap's own loc2c.c.  Iterating
> namespaces wouldn't help here, not even adding class/struct, as these
> DIEs are nested within other functions.

Hmmm. You are right. And it is a fun example because there are actually
two "deepen" functions nested in two different other functions.

Seems it is time to create some example binaries for elfutils of
where dwarf_getfuncs() doesn't find some functions/subprograms
with the current approach and see if we can fix it or whether we
need to have a totally different function/approach.

Thanks,

Mark


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