📄 stab.html
字号:
<html lang="en">
<head>
<title>Using as</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using as">
<meta name="generator" content="makeinfo 4.3">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home">
</head>
<body>
<div class="node">
<p>
Node:<a name="Stab">Stab</a>,
Next:<a rel="next" accesskey="n" href="String.html#String">String</a>,
Previous:<a rel="previous" accesskey="p" href="Space.html#Space">Space</a>,
Up:<a rel="up" accesskey="u" href="Pseudo-Ops.html#Pseudo%20Ops">Pseudo Ops</a>
<hr><br>
</div>
<h3 class="section"><code>.stabd, .stabn, .stabs</code></h3>
<p>There are three directives that begin <code>.stab</code>.
All emit symbols (see <a href="Symbols.html#Symbols">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><var>string</var>
<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><dt><var>type</var>
<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><dt><var>other</var>
<dd>An absolute expression. The symbol's "other" attribute is set to the
low 8 bits of this expression.
<br><dt><var>desc</var>
<dd>An absolute expression. The symbol's descriptor is set to the low 16
bits of this expression.
<br><dt><var>value</var>
<dd>An absolute expression which becomes the symbol's value.
</dl>
<p>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!
<dl>
<dt><code>.stabd </code><var>type</var><code> , </code><var>other</var><code> , </code><var>desc</var><code></code>
<dd>
The "name" 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.
<p>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.
<br><dt><code>.stabn </code><var>type</var><code> , </code><var>other</var><code> , </code><var>desc</var><code> , </code><var>value</var><code></code>
<dd>The name of the symbol is set to the empty string <code>""</code>.
<br><dt><code>.stabs </code><var>string</var><code> , </code><var>type</var><code> , </code><var>other</var><code> , </code><var>desc</var><code> , </code><var>value</var><code></code>
<dd>All five fields are specified.
</dl>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -