1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
|
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on May, 22 2008 by texi2html 1.64-gnat-1 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>ASIS-for-GNAT Reference Manual: Debugging Information</TITLE>
<META NAME="description" CONTENT="ASIS-for-GNAT Reference Manual: Debugging Information">
<META NAME="keywords" CONTENT="ASIS-for-GNAT Reference Manual: Debugging Information">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64-gnat-1">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC31"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC30"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_5.html#SEC32"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> 4. Debugging Information </H1>
<!--docid::SEC31::-->
<P>
There are two kinds of the debugging information available in ASIS-for-GNAT
--- debug images returned by the ASIS query <CODE>Debug_Image</CODE>
<A NAME="IDX75"></A>
(for <CODE>Context</CODE>s,
<CODE>Compilation_Unit</CODE>s and <CODE>Element</CODE>s); and debug output generated by
ASIS queries when the corresponding implementation debug flag is set ON during
ASIS initialization (see <A HREF="asis_rm_4.html#SEC13">3.1.2 Parameters of <CODE>Asis.Implementation.Initialize</CODE></A>).
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="asis_rm_5.html#SEC32">4.1 Interpreting Debug Images</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="asis_rm_5.html#SEC33">4.2 ASIS Debug Flags</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="Interpreting Debug Images"></A>
<HR SIZE="6">
<A NAME="SEC32"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_5.html#SEC31"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_5.html#SEC33"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_5.html#SEC31"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 4.1 Interpreting Debug Images </H2>
<!--docid::SEC32::-->
<P>
It is straightforward to interpret the debug images generated for the main ASIS
abstractions, because most of the information directly
corresponds to ASIS concepts. The following details of debug images are
implementation specific.
</P><P>
<DL COMPACT>
<DT><CODE>Context</CODE>
<DD><P>
<DL COMPACT>
<DT><CODE>Context</CODE> Id
<DD><P>
This is the internal <CODE>Context</CODE> Id used in the
implementation data structures. This Id is assigned to a
<CODE>Context</CODE> when it is associated for the first time, and it
remains unchanged and unique until ASIS is finalized.
</P><P>
<DT>All tree files
<DD><P>
The number of tree files making up the given <CODE>Context</CODE>.
</DL>
<P>
<DT><CODE>Compilation_Unit</CODE>
<DD><P>
<DL COMPACT>
<DT><CODE>Compilation_Unit</CODE> Id
<DD><P>
This is the internal <CODE>Compilation_Unit</CODE> Id used in the
implementation data structures. This Id remains
unchanged and unique until the unit's enclosed <CODE>Context</CODE> is closed.
</P><P>
<DT>Is consistent
<DD><P>
<CODE>True</CODE> if the same version of the unit's source was used for
all the tree files making up the enclosed unit's context,
and <CODE>False</CODE> otherwise
</DL>
<P>
<DT><CODE>Element</CODE>
<DD><P>
<DL COMPACT>
<DT>Node, R_Node, Node_Field_1
<DD><P>
Tree nodes on which the internal representation of a given <CODE>Element</CODE>
is based. They are meaningful only in the tree file indicated in
the <CODE>Enclosing_Tree</CODE> field of the debug image
</P><P>
<DT>Special Case
<DD><P>
Implementation-specific indication of the cases when the
<CODE>Element</CODE> needs some special processing.
</P><P>
<DT>Obtained from the tree
<DD><P>
The Id and the name of the tree file from which
the tree-specific fields of the internal representation of
given <CODE>Element</CODE> were obtained
</P><P>
<DT><CODE>Rel_Sloc</CODE>
<DD><P>
Indicates the (relative) position of the source text of the
<CODE>Element</CODE>, counting from the beginning of the source of its
enclosing compilation unit. Applies to implicit
<CODE>Element</CODE>s also.
</P><P>
</DL>
<P>
</DL>
<P>
<A NAME="ASIS Debug Flags"></A>
<HR SIZE="6">
<A NAME="SEC33"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_5.html#SEC32"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_5.html#SEC31"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 4.2 ASIS Debug Flags </H2>
<!--docid::SEC33::-->
<P>
ASIS provides several internal debug flags, which are described in
<TT>`a_debug.adb'</TT>. When one or more of these flags is set,
useful internal debugging information is directed to <CODE>Standard_Output</CODE>.
Although this information is not always user-oriented, you
may find the following debug flags helpful when you are developing an ASIS
application:
</P><P>
<DL COMPACT>
<DT><CODE>-dc</CODE>
<DD>Outputs the content of the internal data structures for a <CODE>Context</CODE>, when
the <CODE>Context</CODE> is closed and dissociated. By analyzing this information,
you may map other debug information onto unit and tree Ids.
<P>
<DT><CODE>-di</CODE>
<DD>Turns off including the location of an <CODE>Element</CODE> into the result
generated by <CODE>Debug_Image</CODE>. This may be useful if an ASIS program crashes
because of some problem with ASIS structural queries (structural
queries are used by <CODE>Element</CODE>'s <CODE>Debug_Image</CODE> query to compute the
source location of the argument).
<P>
<DT><CODE>-do</CODE>
<DD>When the <CODE>Context</CODE> is opened, lists the tree files being processed, and
the ones selected to represent a given <CODE>Context</CODE>
<P>
<DT><CODE>-dt</CODE>
<DD>Outputs a message whenever a tree file is read in. This
information may be useful for analyzing and reducing the "tree swapping
profile"
<A NAME="IDX76"></A>
of your application.
<P>
</DL>
<P>
<A NAME="Index"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
by <I>Mail Server</I> on <I>May, 22 2008</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html/"><I>texi2html</I></A>
</BODY>
</HTML>
|