Some hints for debugging DOH types added

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5853 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2004-04-09 19:57:35 +00:00
commit c92d04d848

View file

@ -49,11 +49,7 @@ beazley@cs.uchicago.edu </br>
<li><a name="i6" href="#6">6. Plans for SWIG 2.0</a> <li><a name="i6" href="#6">6. Plans for SWIG 2.0</a>
<li><a name="i7" href="#7">7. C/C++ Wrapper Support Functions</a> <li><a name="i7" href="#7">7. C/C++ Wrapper Support Functions</a>
<li><a name="i8" href="#8">8. Symbol Naming Guidelines for Generated C/C++ Code</a> <li><a name="i8" href="#8">8. Symbol Naming Guidelines for Generated C/C++ Code</a>
<li><a name="i9" href="#9">9. Reserved</a> <li><a name="i9" href="#9">9. Debugging SWIG</a>
<li><a name="i10" href="#10">10. Guile Support</a>
<li><a name="i11" href="#11">11. Python Support</a>
<li><a name="i12" href="#12">12. Perl Support</a>
<li><a name="i13" href="#13">13. Java Support</a>
</ul> </ul>
<a name="1" href="#i1"> <a name="1" href="#i1">
@ -966,36 +962,54 @@ In the past SWIG has generated many symbols which flout the standard especially
<a name="9" href="#i9"> <a name="9" href="#i9">
<h2>9. Reserved</h2> <h2>9. Debugging SWIG</h2>
</a> </a>
Warning. Debugging SWIG is for the very patient.
<p>
<a name="10" href="#i10"> The DOH types are all typedefined to void.
<h2>10. Guile Support</h2> Consequently, it is impossible for debuggers to extract any information about DOH objects.
</a> Most debuggers will be able to display useful variable information when an object is cast to the appropriate type.
Below are some tips for displaying some of the DOH objects.
Be sure to compile with compiler optimisations turned off before attempting the casts shown in a debugger window else they are unlikely to work.
Even displaying the underlying string in a String* doesn't work straight off in all debuggers due to the multiple definition of String as a struct and a void.
<p>
The information that used to live here has moved to the user Below are a list of common SWIG types.
documentation, file <code>Guile.html</code>. With each is the cast that can be used in the debugger to extract the underlying type information and the underlying char * string.
<a name="11" href="#i11"> <ul>
<h2>11. Python Support</h2>
</a>
[TODO] <p>
<li>String *s;</li>
<br>
(String *)((DohBase *)s)->data
<br>
The underlying char * string can be displayed with
<br>
((String *)((DohBase *)s)->data)->str
<a name="12" href="#i12"> <p>
<h2>12. Perl Support</h2> <li>SwigType *t;</li>
</a> <br>
(String *)((DohBase *)t)->data
<br>
The underlying char * string can be displayed with
<br>
((String *)((DohBase *)t)->data)->str
[TODO] <p>
<li>String_or_char *sc;</li>
Either <br>
((String *)((DohBase *)sc)->data)->str
<br> or <br>
(char *)sc
<br> will work depending on whether the underlying type is really a String * or char *.
<a name="13" href="#i13"> </ul>
<h2>13. Java Support</h2>
</a>
[TODO]
<hr> <hr>
Copyright (C) 1999-2001 Copyright (C) 1999-2004
<a href="mailto:swig-dev@cs.uchicago.edu">SWIG Development Team</a> <a href="mailto:swig-dev@cs.uchicago.edu">SWIG Development Team</a>
</body> </body>