[fetter-devel] Re: Visual C++ ABI references
Rayiner Hashem
rayiner at gmail.com
Sat Oct 22 22:55:13 UTC 2005
> I've been trying to learn about C++ ABIs on Windows for an FFI project of my own
> (for which Verrazano would be an almost ideal component). While the GCC
> interface is well-defined (cxxabi.h and a multi-vendor spec, what more could you
> ask for?), I haven't had as much luck with the Visual C++ ABI.
>
> I've found this MSDN article called "C++ Under the Hood"
> (http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarvc/html/jangrayhood.asp)
> from 1996 (i.e. Visual C++ 4.2), and a few nuggets from Raymond Chen's weblog
> (http://blogs.msdn.com/oldnewthing/default.aspx), but not much else.
Yes, this is the same article I'm using as my primary guide.
>
> Can you suggest any additional references (preferably online)? I'm posting this
> to the list so that this can all be added to the general historical record.
In theory the Visual C++ v-table format is the same as the COM one,
but I can't seem to find the COM v-table spec clearly defined
anywhere. Perhaps its in one of the MSDN references, but I haven't
been able to find it online.
What is tremendously useful is the WinDbg app, which has a command
("dt" for dump table), that dumps the virtual-table layout for any
dynamic class. With a little consideration to the special cases of C++
v-table layout (specifically, simple multiple-inheritence, virtual
inheritence, and empty-base-class or near-empty-base-class
optimizations), a little fooling around in WinDbg should tell you
everything you need to know.
Sincerely,
Rayiner Hashem
>
> Trying out Vzn and CFFI on Corman Lisp is on my to-do list
> (http://johnp.net/blog/2005/10/16#corman-projects), but I don't know when I'll
> get to it...
>
> Thanks, and keep up the good work!
Thanks!
Sincerely,
Rayiner Hashem
>
> John :^P
> --
> John Pallister
> john at synchromesh.com
>
More information about the fetter-devel
mailing list