<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi!<br>
<br>
You could trace the dynamic call graph with execution advice instead
if call advice. This has the advantage that you get the signature of
the right (dynamically dispatched) target function in case of
virtual function calls or calls via function pointers.<br>
<br>
If you actually need context information from the caller side, which
is not the case in your example code, you could also implement a
combination of call and execution advice. For instance, if you push
the function name on a stack (per thread) in the execution advice,
the top of stack can be used in the call advice to obtain the
caller's name.<br>
<br>
Best regards,<br>
<br>
Olaf<br>
<br>
<br>
<div class="moz-cite-prefix">On 06/28/2016 02:02, João Bispo wrote:<br>
</div>
<blockquote
cite="mid:CAE-XfAWb75iBOxUWGnFjdbbe0Xiogf7MuqEtR98ubXpcFiBiyw@mail.gmail.com"
type="cite">
<div dir="ltr">Hello,
<div><br>
</div>
<div>I would like to build a call graph using AspectC++, and for
this, for each function call, I need the caller and the
callee. I already know how to get the callee:</div>
<div><br>
</div>
<div>
<div><br>
</div>
<div> advice call("% %()") : before() {</div>
<div><br>
</div>
<div> std::cout << "Callee: " <<
JoinPoint::signature() << std::endl;</div>
<div><br>
</div>
<div> }</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div>Is there a way to obtain the caller in the same aspect as
the callee?</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>João Bispo</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
aspectc-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:aspectc-user@aspectc.org">aspectc-user@aspectc.org</a>
<a class="moz-txt-link-freetext" href="http://www.aspectc.org/mailman/listinfo/aspectc-user">http://www.aspectc.org/mailman/listinfo/aspectc-user</a>
</pre>
</blockquote>
<br>
</body>
</html>