<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Could you please try reproducing this
with Clang 3.2 or the latest SVN version
(<a class="moz-txt-link-freetext" href="http://clang.llvm.org/get_started.html">http://clang.llvm.org/get_started.html</a>)?<br>
<br>
On 1/15/2013 6:06 PM, Andrew Hankins wrote:<br>
</div>
<blockquote
cite="mid:20130116020606.0716D6081EB@mail.etherstack.com"
type="cite">Hi all,
<br>
<br>
Using libclang with the python bindings to parse some header files
and hopefully generate the equivalent Python ctypes definition for
the structures requested.
<br>
After parse as I'm walking through the tree I am hitting a
segfault in CXIndex.cpp:134 from struct2ctype.py:87
<br>
Looks like in CXTypes.cpp getCursorTU(C) returns null and freaks
out on the next line where its dereferenced - Every valid cursor
should have a valid TU right?
<br>
I've attach two files that can be used to reproduce the issue.
Invoke with the following command
<br>
<br>
python2.7 struct2ctypes.py -d . StructName
<br>
<br>
I've had some mixed results reproducing the issue. With library I
built from head I hit the issue having only parsed the single file
but library shipped with ubuntu I need to place the file in a
directory structure with plenty of other files.
<br>
<br>
My machine details
<br>
- Linux 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC
2012 x86_64 x86_64 x86_64 GNU/Linux
<br>
- Python 2.7.3 (default, Aug 1 2012, 05:14:39)
<br>
- clang version 3.0
<br>
<br>
Happy to work further on this - just need some direction
<br>
<br>
Cheers,
<br>
Andrew
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>