<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<div class="post-text" itemprop="text" style="margin: 0px 0px 5px;
padding: 0px; border: 0px; font-size: 15px; width: 660px;
word-wrap: break-word; line-height: 1.3; color: rgb(36, 39, 41);
font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; orphans: auto; text-align: left;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px;
font-size: 15px; clear: both;">EDIT: I am working with this
setup: LLVM +Clang Compiler for C++, Ubuntu 64bit,</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px;
font-size: 15px; clear: both;">I am currently looking for:</p>
<ol style="margin: 0px 0px 1em 30px; padding: 0px; border: 0px;
font-size: 15px; list-style-type: decimal;">
<li style="margin: 0px 0px 0.5em; padding: 0px; border: 0px;
font-size: 15px; word-wrap: break-word;">
<p style="margin: 0px; padding: 0px; border: 0px; font-size:
15px; clear: both;">a way to get the return addresses of
virtual function call and non virtual C++ methods inside
Clang and LLVM and</p>
</li>
<li style="margin: 0px; padding: 0px; border: 0px; font-size:
15px; word-wrap: break-word;">
<p style="margin: 0px; padding: 0px; border: 0px; font-size:
15px; clear: both;">a way to get the candidate addresses
where the return address points back after each function
return was performed.</p>
</li>
</ol>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px;
font-size: 15px; clear: both;">I have a few questions and
hopefully you guys can help me out.</p>
<ol style="margin: 0px 0px 1em 30px; padding: 0px; border: 0px;
font-size: 15px; list-style-type: decimal;">
<li style="margin: 0px 0px 0.5em; padding: 0px; border: 0px;
font-size: 15px; word-wrap: break-word;">
<p style="margin: 0px; padding: 0px; border: 0px; font-size:
15px; clear: both;">The return-addresses of indirect
function calls to virtual functions (and thus v-tables), are
they pointers? If not, what format do they have? How are
those handled by Clang?</p>
</li>
<li style="margin: 0px 0px 0.5em; padding: 0px; border: 0px;
font-size: 15px; word-wrap: break-word;">
<p style="margin: 0px; padding: 0px; border: 0px; font-size:
15px; clear: both;">Is the return address of a non virtual
function in Clang a pointer or a hardcoded value?</p>
</li>
<li style="margin: 0px 0px 0.5em; padding: 0px; border: 0px;
font-size: 15px; word-wrap: break-word;">
<p style="margin: 0px; padding: 0px; border: 0px; font-size:
15px; clear: both;">How can I get the return addresses of an
indirect call to a virtual function using LLVM? Do i have to
import them from Clang and make them available during LTO?</p>
</li>
<li style="margin: 0px 0px 0.5em; padding: 0px; border: 0px;
font-size: 15px; word-wrap: break-word;">
<p style="margin: 0px; padding: 0px; border: 0px; font-size:
15px; clear: both;">Is thinLTO a better candidate for
helping me recuperate this information?</p>
</li>
<li style="margin: 0px; padding: 0px; border: 0px; font-size:
15px; word-wrap: break-word;">
<p style="margin: 0px; padding: 0px; border: 0px; font-size:
15px; clear: both;">Does the return address of a function
called from an indirect call-site always jump back to the
next line (instruction) of assembly code after the callsite
instruction. Are there some occurrences where it doesn't?
How is this handled in Clang?</p>
</li>
</ol>
</div>
see also it here:<br>
<a class="moz-txt-link-freetext" href="https://stackoverflow.com/questions/41019601/recuperate-return-addresses-of-virtual-and-non-virtual-c-methods-with-clang-an">https://stackoverflow.com/questions/41019601/recuperate-return-addresses-of-virtual-and-non-virtual-c-methods-with-clang-an</a><br
class="Apple-interchange-newline">
</body>
</html>