📄 c-shell2.html
字号:
<table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="94217"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Variable</font></b></div></th><td width="10"> </td><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="94219"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Result</font></b></div></th><td width="10"> </td></tr><tr><td colspan="20"><hr class="tablerule2"></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="94221"> </a><b class="symbol_UC">SH_GET_TASK_IO</b> </div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="94223"> </a>Sets the I/O redirection mode for called functions. The default is "on", which redirects input and output of called functions to WindSh. To have input and output of called functions appear in the target console, set <b class="symbol_UC">SH_GET_TASK_IO</b> to "off." </div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="94225"> </a><b class="symbol_UC">LD_CALL_XTORS</b> </div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="94227"> </a>Sets the C++ strategy related to constructors and destructors. The default is "target", which causes WindSh to use the value set on the target using <b class="routine"><i class="routine">cplusXtorSet</i></b><b>( )</b>. If <b class="symbol_UC">LD_CALL_XTORS</b> is set to "on", the C++ strategy is set to automatic (for the current WindSh only). "Off" sets the C++ strategy to manual for the current shell. </div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="94229"> </a><b class="symbol_UC">LD_SEND_MODULES</b> </div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="94231"> </a>Sets the load mode. The default "on" causes modules to be transferred to the target server. This means that any module WindSh can see can be loaded. If <b class="symbol_UC">LD_SEND_MODULES</b> if "off", the target server must be able to see the module to load it.</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="94233"> </a><b class="symbol_UC">LD_PATH</b> </div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="94235"> </a>Sets the search path for modules using the separator ";". When a <b class="routine"><i class="routine">ld</i></b><b>( )</b> command is issued, WindSh first searches the current directory and loads the module if it finds it. If not, WindSh searches the directory path for the module. </div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="101093"> </a><b class="symbol_UC">LD_COMMON_MATCH_ALL</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="101095"> </a>Sets the loader behavior for common symbols. If it is set to <b class="symbol_lc">on</b>, the loader tries to match a common symbol with an existing one. If a symbol with the same name is already defined, the loader take its address. Otherwise, the loader creates a new entry. If set to <b class="symbol_lc">off</b>, the loader does not try to find an existing symbol. It creates an entry for each common symbol. </div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="101456"> </a><b class="symbol_UC"></b>DSM_HEX_MOD </div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="101458"> </a>Sets the disassembling "symbolic + offset" mode. When set to "off" the "symbolic + offset" address representation is turned on and addresses inside the disassembled instructions are given in terms of "symbol name + offset." When set to "on" these addresses are given in hexadecimal.</div></td><td width="10"> </td></tr><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p></p><dd><p class="Body"><a name="94174"> </a>Because <b class="tclProc">shConfig</b> is a Tcl procedure, use the ? to move from the C interpreter to the Tcl interpreter. (See <a href="c-shell7.html#86713"><i class="title">6.7.2 Tcl: Calling under C Control</i></a>.)</p></dl></dl><h4 class="EntityTitle"><a name="94242"><font face="Helvetica, sans-serif" size="-1" class="sans">Example 6-1: Using shConfig to Modify WindSh Behavior</font></a></h4><dl class="margin"><dl class="margin"><dd><pre class="Code"><b><a name="94243"></b><tt class="output">-></tt><b> ?shConfig </b><tt class="output">SH_GET_TASK_IO = on LD_CALL_XTORS = target LD_SEND_MODULES = on LD_PATH = C:/ProjectX/lib/objR4650gnutest/;C:/ProjectY/lib/objR4560gnuvx -> </tt><b>?shConfig LD_CALL_XTORS on </b><tt class="output">-> </tt><b>?shConfig LD_CALL_XTORS </b><tt class="output">LD_CALL_XTORS = on</tt><b></a></b></pre></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="99723">6.2.3 Invoking Built-In Shell Routines</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="99725"> </a>Some of the commands (or routines) that you can execute from the shell are built into the host shell, rather than running as function calls on the target. These facilities parallel interactive utilities that can be linked into VxWorks itself. By using the host commands, you minimize the impact on both target memory and performance. </p><dd><p class="Body"><a name="99260"> </a>The following sections give summaries of the Tornado WindSh commands. For more detailed reference information, see the <b class="command">windsh</b> reference entry (either online, or in <a href="x-toolman.html#83918"><i class="title">C. Tornado Tools Reference</i></a>).</p></dl></dl><dl class="margin"><dd><p class="table" callout><table border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td valign="top" width="40"><br><img border="0" alt="*" src="icons/warning.gif"></td><td><hr><div class="CalloutCell"><a name="99287"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">WARNING: </font></b></a>Most of the shell commands correspond to similar routines that can be linked into VxWorks for use with the target-resident version of the shell (<i class="title">VxWorks Programmer's Guide: Target Shell</i>). However, the target-resident routines differ in some details. For reference information on a shell command, be sure to consult the <b class="command">windsh</b> entry in <a href="x-toolman.html#83918"><i class="title">C. Tornado Tools Reference</i></a> or use the HTML help for the command.<i class="title">.</i> Although there is usually an entry with the same name in the <i class="title">VxWorks Reference Manual</i>, it describes a related target routine, not the shell command.</div></td></tr><tr valign="top"><td></td><td><hr></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p callout></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="90469">Task Management</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="90474"> </a><a href="c-shell2.html#91905">Table 6-2</a> summarizes the WindSh commands that manage VxWorks tasks. <p class="table"><h4 class="EntityTitle"><a name="91905"><font face="Helvetica, sans-serif" size="-1" class="sans">Table 6-2: WindSh Commands for Task Management</font></a></h4><table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="91909"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Call</font></b></div></th><td width="10"> </td><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="91911"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Description</font></b></div></th><td width="10"> </td></tr><tr><td colspan="20"><hr class="tablerule2"></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="91915"> </a><b class="routine"><i class="routine">sp</i></b>(<b>( )</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="91917"> </a>Spawn a task with default parameters.</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="91921"> </a><b class="routine"><i class="routine">sps</i></b><b>( )</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="91923"> </a>Spawn a task, but leave it suspended.</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="91927"> </a><b class="routine"><i class="routine">tr</i></b><b>( )</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="91929"> </a>Resume a suspended task.</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="91933"> </a><b class="routine"><i class="routine">ts</i></b><b>( )</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="91935"> </a>Suspend a task.</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="91939"> </a><b class="routine"><i class="routine">td</i></b><b>( )</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="91941"> </a>Delete a task.</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="91945"> </a><b class="routine"><i class="routine">period</i></b><b>( )</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="91947"> </a>Spawn a task to call a function periodically.</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="91951"> </a><b class="routine"><i class="routine">repeat</i></b><b>( )</b></div></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -