⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c-debugger5.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
</dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="85233">8.5.5  &nbsp;&nbsp;Using Graphically Enhanced Commands</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85234"> </a>The GDB <b class="command">frame</b> command has a Tornado graphical extension, even when used at the command line. </p></dl><dl class="margin"><dd><div class="Item"><a name="85250"> </a><b class="command">frame </b><i class="textVariable">n</i> </div><dl class="margin"><dd><div class="Indent"><a name="86097"> </a>Displays a summary of a stack frame, in the <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Debugger</font></b> window. But it also has a useful side effect: it re-displays the code in the editor window, centered around the line of code corresponding to that stack frame.</div><br><dd><div class="Indent"><a name="85251"> </a>Used without any arguments, this command provides a quick way of restoring the editor-window context for the current stack frame, after you scroll to inspect some other region of code. Used with an argument <i class="textVariable">n</i> (a stack-frame number, or a stack-frame address), this command provides a quick way of looking at the source-code context elsewhere in the calling stack. For more information about stack frames in GDB and about the GDB <b class="command">frame</b> command, see <i class="title">Debugging with GDB: Examining the Stack</i>.</div><br></dl></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="85253">8.5.6  &nbsp;&nbsp;Managing Targets</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85254"> </a>Instead of using the target server list in the <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Tornado Launch</font></b> toolbar, you can select a target from the <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Debugger</font></b> window with the <b class="command">target wtx</b> command. The two methods of selecting a target are interchangeable. However, it may sometimes be more convenient to use the GDB command language--for example, you might specify a target this way in your <b class="file">.gdbinit</b> initialization file or in other debugger scripts.</p></dl><dl class="margin"><dd><div class="Item"><a name="85255"> </a><b class="command">target wtx </b><i class="textVariable">servername</i>  </div><dl class="margin"><dd><div class="Indent"><a name="85257"> </a>Connects to a target managed by the target server registered as <i class="textVariable">servername</i> in the Tornado registry, using the WTX protocol. Use this command regardless of whether your target is attached through a serial line or through an Ethernet connection; the target server subsumes such communication details. To identify the target server, any unique abbreviation will do as <i class="textVariable">servername</i>; there is no need to specify the full name known to the Tornado registry.</div><br></dl></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="85274">8.5.7  &nbsp;&nbsp;Extended Debugger Commands</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85275"> </a>The debugger also provides two kinds of extended commands:</p><dl class="margin"><b class="BulletHead"><li><a name="85276"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Server Protocol Requests</font></li></b></dl><dl class="margin"><dd><div class="Indent"><a name="85278"> </a>The Tornado tools use a protocol called WTX to communicate with the target server. You can send WTX protocol requests directly from the GDB command area as well, by using a family of commands beginning with the prefix "wtx". See <i class="title">Tornado API Guide: WTX Protocol</i> for descriptions of WTX protocol requests. Convert protocol message names to lower case, and use hyphens in place of underbars. For example, issue the message <b class="symbol_UC">WTX_CONSOLE_CREATE</b> as the command <b class="command">wtx-console-create</b>.</div><br></dl><dl class="margin"><b class="BulletHead"><li><a name="85280"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Shell Commands</font></li></b></dl><dl class="margin"><dd><div class="Indent"><a name="85284"> </a>You can run any of the Tornado shell's primitive facilities described in <a href="c-shell2.html#99723"><i class="title">6.2.3&nbsp;Invoking Built-In Shell Routines</i></a> in the <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Debugger</font></b> window, by inserting the prefix "wind-" before the shell command name. For example, to run the shell <b class="routine"><i class="routine">td</i></b><b>(&nbsp;)</b> command from the debugger, enter <b class="command">wind-td</b> in the <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Debugger</font></b> window.<sup><a href="#foot"><b class="FootnoteMarker">3</b></a></sup> Because of GDB naming conventions, mixed-case command names cannot be used; if the shell command you need has upper-case characters, use lower case and insert a hyphen before the upper-case letter. For example, to run the <b class="routine"><i class="routine">semShow</i></b><b>(&nbsp;)</b> command, enter <b class="command">wind-sem-show</b>.</div><br></dl></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/caution.gif"></td><td><hr><div class="CalloutCell"><a name="92031"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">CAUTION:  </font></b></a>The debugger does not include the Tornado shell's C interpreter. Thus, the "wind" commands are interfaces only to the underlying Tcl implementations of the shell primitives. For shell primitives that take no arguments, this makes no difference; but for shell primitives that require an argument, you must use the shell Tcl command <b class="tclProc">shSymAddr</b> to translate C symbols to the Tcl form. For example, to call the shell built-in <b class="routine"><i class="routine">show</i></b><b>(&nbsp;)</b> on a semaphore ID <b class="symbol_lc">mySemID</b>, use the following:</div></td><pre class="CodeLeft"><b><a name="92060"></b><tt class="output">&nbsp;&nbsp;&nbsp;&nbsp;(gdb) </tt><b>wind-show [shSymAddr <i class="textVariable">mySemId</i>] </a></b></pre></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="H3"><i><a name="92048">8.5.8  &nbsp;&nbsp;Extended Debugger Variables</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85298"> </a>You can change many details of the debugger's behavior by using the <b class="command">set</b> command to establish alternative values for internal parameters. (The <b class="command">show</b> command displays these values; you can list the full set interactively with <b class="command">help set</b>.) </p><dd><p class="Body"><a name="85301"> </a>The following additional <b class="command">set</b>/<b class="command">show</b> parameters are available in the Tornado debugger (CrossWind) in addition to those described in <i class="title">Debugging with GDB</i>:</p></dl><dl class="margin"><dd><div class="Item"><a name="85304"> </a><b class="symbol_lc">inhibit-gdbinit</b> </div><dl class="margin"><dd><div class="Indent"><a name="86099"> </a>Specifies whether or not to read the GDB-language initialization files (discussed in <a href="c-debugger8.html#85604"><i class="title">8.8.1&nbsp;Tcl: Debugger Initialization Files</i></a>). Default: <b class="symbol_lc">no</b> (that is, read initialization files).</div><br></dl><dd><div class="Item"><a name="85309"> </a><b class="symbol_lc">wtx-ignore-exit-status</b> </div><dl class="margin"><dd><div class="Indent"><a name="85311"> </a>Specifies whether or not to report the explicit exit status of a routine under debugger control. When this parameter is <b class="symbol_lc">on</b>, the debugger always reports completion of a routine with the message "Program terminated normally." If your application's routines use the exit status to convey information, set this parameter to <b class="symbol_lc">off</b> to see the explicit exit status as part of the termination message. Default: <b class="symbol_lc">on</b>.</div><br></dl><dd><div class="Item"><a name="85314"> </a><b class="symbol_lc">wtx-load-flags</b> </div><dl class="margin"><dd><div class="Indent"><a name="86104"> </a>Specifies the option flags for the dynamic loader (<b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Download</font></b> in the <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Debug</font></b> menu, or <b class="command">load</b> in the <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Debugger</font></b> window). These flags are described in the discussion of <b class="routine"><i class="routine">ld</i></b><b>(&nbsp;)</b> in <i class="title">VxWorks Programmer's Guide: Configuration and Build</i>. Default: <b class="symbol_UC">LOAD_GLOBAL_SYMBOLS</b> (4).</div><br></dl><dd><div class="Item"><a name="85320"> </a><b class="symbol_lc">wtx-load-path-qualify</b> </div><dl class="margin"><dd><div class="Indent"><a name="85321"> </a>Specifies whether the debugger translates a relative path specified in the <b class="command">load</b> argument to an absolute path when instructing the target server to download a file. Setting this value to <b class="keyword">yes</b> instructs the debugger to perform this translation, so that the target server can locate the file even if the server and the debugger have different working directories. </div><br><dd><div class="Indent"><a name="85322"> </a>However, in some networks where the debugger and target server have different views of the file system, a relative path name can be interpreted correctly by both programs even though the absolute path name is different for the two. In this case, set <b class="symbol_lc">wtx-load-path-qualify</b> to <b class="keyword">no</b>.</div><br><dd><div class="Indent"><a name="85323"> </a>Default: <b class="keyword">yes</b>.</div><br></dl><dd><div class="Item"><a name="85325"> </a><b class="symbol_lc">wtx-load-timeout</b> </div><dl class="margin"><dd><div class="Indent"><a name="85327"> </a>Specifies how long to wait for the target to respond during a download. If a download does no complete in less time than is specified here (in seconds), the debugger reports an error. Default: 30 seconds.</div><br></dl><dd><div class="Item"><a name="85329"> </a><b class="symbol_lc">wtx-task-priority</b> </div><dl class="margin"><dd><div class="Indent"><a name="85331"> </a>Specifies the priority for transient VxWorks tasks spawned by the <b class="command">run</b> command. Default: 100.</div><br></dl><dd><div class="Item"><a name="85333"> </a><b class="symbol_lc">wtx-task-stack-size</b> </div><dl class="margin"><dd><div class="Indent"><a name="86120"> </a>Specifies the stack size for transient tasks spawned by the <b class="command">run</b> command. Default: 20,000.</div><br></dl><dd><div class="Item"><a name="86122"> </a><b class="symbol_lc">wtx-tool-name</b> </div><dl class="margin"><dd><div class="Indent"><a name="86126"> </a>Specifies the name supplied for the debugger session to the target server. This is the name reported in the launcher's list of tools attached to a target. If you often run multiple debugger sessions, you can use this parameter to give each session a distinct name. Default: <b class="symbol_lc">crosswind</b>. </div><br></dl></dl></dl><a name="foot"><hr></a><p class="FootnoteNumberMarker">1:&nbsp;<span class="Footnote"><a name="85168"> </a>The graphical interface to the debugger has a separate initialization file <b class="file">crosswind.tcl</b>, which runs after <b class="file">.gdbinit</b>. </span><p class="FootnoteNumberMarker">2:&nbsp;<span class="Footnote"><a name="85197"> </a>See also the description of <b class="symbol_lc">wtx-load-path-qualify</b> in <a href="c-debugger5.html#92048"><i class="title">8.5.8&nbsp;Extended Debugger Variables</i></a> for another way of managing how the debugger reports <b class="command">load</b> path names to the target server.</span><p class="FootnoteNumberMarker">3:&nbsp;<span class="Footnote"><a name="85289"> </a>You can exploit command completion to see a list of all the shell primitives as they appear in the debugger: type "<b class="file">wind-</b>" followed by two tabs.</span><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="GuideIX.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="c-debugger.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-debugger4.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-debugger6.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p></body></html><!---by WRS Documentation (), Wind River Systems, Inc.    conversion tool:  Quadralay WebWorks Publisher 4.0.11    template:         CSS Template, Jan 1998 - Jefro --->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -