<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Dear dev's,<br>
first sorry for this "user" question here, but i don't found a
llvm-user Mailinglist. I hope it is okay to ask here.<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Hi search for a way to dump the memory layout of a
class/structure/datatype with clang (x64 primary target).<br>
I have a simple application based on [1].<br>
<br>
I also added this function <br>
<br>
<br>
bool VisitFieldDecl(FieldDecl *F)<br>
{<br>
F->dump();<br>
std::cerr << F->getQualifiedNameAsString() <<
" " << F->getBitWidthValue(*Context) << " " <<
std::endl;<br>
F->dump() ;<br>
std::cerr << "-----------------------------------------"
<< std::endl;<br>
return true;<br>
}<br>
<br>
<br>
Unfortunately getBitWidthValue also returns zero for my types.<br>
<br>
I need the complete memory-layout recursively for each class and all
nested types. Including sizes/offsets.<br>
<br>
Maybe the AST is the wrong place, and i need a other hook to start,
can you give me some hints?<br>
<br>
[1]: <a class="moz-txt-link-freetext" href="http://clang.llvm.org/docs/RAVFrontendAction.html">http://clang.llvm.org/docs/RAVFrontendAction.html</a><br>
<br>
<pre class="moz-signature" cols="72">--
Dipl.-Inf. Matthias Goldhoorn
Space and Underwater Robotic
Universität Bremen
FB 3 - Mathematik und Informatik
AG Robotik
Robert-Hooke-Straße 5
28359 Bremen, Germany
Tel.: +49 421 178 45-4193
Zentrale: +49 421 178 45-6550
Fax: +49 421 178 45-4150
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:matthias.goldhoorn@uni-bremen.de">matthias.goldhoorn@uni-bremen.de</a>
Weitere Informationen: <a class="moz-txt-link-freetext" href="http://www.informatik.uni-bremen.de/robotik">http://www.informatik.uni-bremen.de/robotik</a></pre>
</body>
</html>