[Main]
Title=.stabd
See Also=SEC127N: .stabn, SEC127S: .stabs

[Top]
Syntax: <B>.stabd <I>type</I>, <I>other</I>, <I>desc</I></B>
<BR><BR>
There are three directives that begin <CODE>.stab</CODE>.
All emit symbols (see <A HREF="$$LINK(SEC45)">Symbols</A>), for use by symbolic debuggers.
The symbols are not entered in the <CODE>as</CODE> hash table: they
cannot be referenced elsewhere in the source file.
Up to five fields are required:
<DL>
<DT><I>string</I>
<DD>This is the symbol's name.  It may contain any character except
<CODE>\000</CODE>, so is more general than ordinary symbol names.  Some
debuggers used to code arbitrarily complex structures into symbol names
using this field.
<BR><BR>
<DT><I>type</I>
<DD>An absolute expression.  The symbol's type is set to the low 8 bits of
this expression.  Any bit pattern is permitted, but <CODE>ld</CODE>
and debuggers choke on silly bit patterns.
<BR><BR>
<DT><I>other</I>
<DD>An absolute expression.  The symbol's &quot;other&quot; attribute is set to the
low 8 bits of this expression.
<BR><BR>
<DT><I>desc</I>
<DD>An absolute expression.  The symbol's descriptor is set to the low 16
bits of this expression.
<BR><BR>
<DT><I>value</I>
<DD>An absolute expression which becomes the symbol's value.
</DL>
If a warning is detected while reading a <CODE>.stabd</CODE>, <CODE>.stabn</CODE>,
or <CODE>.stabs</CODE> statement, the symbol has probably already been created;
you get a half-formed symbol in your object file.  This is
compatible with earlier assemblers!
<BR><BR>
If <CODE>.stabd</CODE> is used, the &quot;name&quot; of the symbol generated
is not even an empty string.
It is a null pointer, for compatibility.  Older assemblers used a
null pointer so they didn't waste space in object files with empty
strings.
<BR><BR>
The symbol's value is set to the location counter,
relocatably.  When your program is linked, the value of this symbol
is the address of the location counter when the <CODE>.stabd</CODE> was
assembled.
If <CODE>.stabn</CODE> is used, the name of the symbol is set to the empty
string <CODE>&quot;&quot;</CODE>.
If <CODE>.stabs</CODE> is used, all five fields are required.
