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: Josh Stone <jistone at redhat dot com>
- To: Mark Wielaard <mjw at redhat dot com>
- Cc: Martin Martin <martin at infinio dot com>, "Frank Ch. Eigler" <fche at redhat dot com>, "Yichun Zhang (agentzh)" <agentzh at gmail dot com>, systemtap at sourceware dot org
- Date: Mon, 09 Sep 2013 11:32:16 -0700
- 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> <CAAQ0mPg4CGgNhg9TboiqUjEdBW_DMN6zdUzbi-ua7byzSK-dug at mail dot gmail dot com> <20130909181333 dot GA10261 at toonder dot wildebeest dot org>
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.
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.