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

📄 dbglib.html

📁 Vxworks API操作系统和驱动程序设计API。压缩的HTML文件
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/dbgLib.html - generated by refgen from dbgLib.c --> <title> dbgLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.htm"><i>VxWorks API Reference :  OS Libraries</i></a></p></blockquote><h1>dbgLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>dbgLib</strong> - debugging facilities </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./dbgLib.html#dbgHelp">dbgHelp</a>(&nbsp;)</b>  -  display debugging help menu<br><b><a href="./dbgLib.html#dbgInit">dbgInit</a>(&nbsp;)</b>  -  initialize the local debugging package<br><b><a href="./dbgLib.html#b">b</a>(&nbsp;)</b>  -  set or display breakpoints<br><b><a href="./dbgLib.html#e">e</a>(&nbsp;)</b>  -  set or display eventpoints (WindView)<br><b><a href="./dbgLib.html#bh">bh</a>(&nbsp;)</b>  -  set a hardware breakpoint<br><b><a href="./dbgLib.html#bd">bd</a>(&nbsp;)</b>  -  delete a breakpoint<br><b><a href="./dbgLib.html#bdall">bdall</a>(&nbsp;)</b>  -  delete all breakpoints<br><b><a href="./dbgLib.html#c">c</a>(&nbsp;)</b>  -  continue from a breakpoint<br><b><a href="./dbgLib.html#cret">cret</a>(&nbsp;)</b>  -  continue until the current subroutine returns<br><b><a href="./dbgLib.html#s">s</a>(&nbsp;)</b>  -  single-step a task<br><b><a href="./dbgLib.html#so">so</a>(&nbsp;)</b>  -  single-step, but step over a subroutine<br><b><a href="./dbgLib.html#l">l</a>(&nbsp;)</b>  -  disassemble and display a specified number of instructions<br><b><a href="./dbgLib.html#tt">tt</a>(&nbsp;)</b>  -  display a stack trace of a task<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library contains VxWorks's primary interactive debugging routines, which provide the following facilities:<p>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;task&nbsp;breakpoints<br>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;task&nbsp;single-stepping<br>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;symbolic&nbsp;disassembly<br>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;symbolic&nbsp;task&nbsp;stack&nbsp;tracing<p>In addition, <b><a href="./dbgLib.html#top">dbgLib</a></b> provides the facilities necessary for enhanced useof other VxWorks functions, including:<p>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;enhanced&nbsp;shell&nbsp;abort&nbsp;and&nbsp;exception&nbsp;handling&nbsp;(via&nbsp;<b><a href="./tyLib.html#top">tyLib</a></b>&nbsp;and&nbsp;<b><a href="./excLib.html#top">excLib</a></b>)<p>The facilities of <b><a href="./excLib.html#top">excLib</a></b> are used by <b><a href="./dbgLib.html#top">dbgLib</a></b> to support breakpoints,single-stepping, and additional exception handling functions.<p></blockquote><h4>INITIALIZATION</h4><blockquote><p>The debugging facilities provided by this module are optional.  In thestandard VxWorks development configuration as distributed, the debuggingpackage is included.  The configuration macro is <b>INCLUDE_DEBUG</b>.When defined, it enables the call to <b><a href="./dbgLib.html#dbgInit">dbgInit</a>(&nbsp;)</b> in the task <b><a href="./usrConfig.html#usrRoot">usrRoot</a>(&nbsp;)</b>in <b>usrConfig.c</b>.  The <b><a href="./dbgLib.html#dbgInit">dbgInit</a>(&nbsp;)</b> routine initializes <b><a href="./dbgLib.html#top">dbgLib</a></b> and must be madebefore any other routines in the module are called.<p></blockquote><h4>BREAKPOINTS</h4><blockquote><p>Use the routine <b><a href="./dbgLib.html#b">b</a>(&nbsp;)</b> or <b><a href="./dbgLib.html#bh">bh</a>(&nbsp;)</b> to set breakpoints.  Breakpoints can be set to be hit by a specific task or all tasks.  Multiple breakpoints for different tasks can be set at the same address.  Clear breakpoints with <b><a href="./dbgLib.html#bd">bd</a>(&nbsp;)</b> and <b><a href="./dbgLib.html#bdall">bdall</a>(&nbsp;)</b>.<p>When a task hits a breakpoint, the task is suspended and a message isdisplayed on the console.  At this point, the task can be examined,traced, deleted, its variables changed, etc.  If you examine the task atthis point (using the <b><a href="./usrLib.html#i">i</a>(&nbsp;)</b> routine), you will see that it is in a suspendedstate.  The instruction at the breakpoint address has not yet been executed.<p>To continue executing the task, use the <b><a href="./dbgLib.html#c">c</a>(&nbsp;)</b> routine.  The breakpointremains until it is explicitly removed.<p></blockquote><h4>EVENTPOINTS (WINDVIEW)</h4><blockquote><p>When WindView is installed, <b><a href="./dbgLib.html#top">dbgLib</a></b> supports eventpoints.  Use the routine<b><a href="./dbgLib.html#e">e</a>(&nbsp;)</b> to set eventpoints.  Eventpoints can be set to be hit by a specifictask or all tasks.  Multiple eventpoints for different tasks can be set atthe same address.<p>When a task hits an eventpoint, an event is logged and is displayed byVxWorks kernel instrumentation.<p>You can manage eventpoints with the same facilities that managebreakpoints:  for example, unbreakable tasks (discussed below) ignoreeventpoints, and the <b><a href="./dbgLib.html#b">b</a>(&nbsp;)</b> command (without arguments) displayseventpoints as well as breakpoints.  As with breakpoints, you can cleareventpoints with <b><a href="./dbgLib.html#bd">bd</a>(&nbsp;)</b> and <b><a href="./dbgLib.html#bdall">bdall</a>(&nbsp;)</b>.<p></blockquote><h4>UNBREAKABLE TASKS</h4><blockquote><p>An <i>unbreakable</i> task ignores all breakpoints.  Tasks can be spawnedunbreakable by specifying the task option <b>VX_UNBREAKABLE</b>.  Tasks cansubsequently be set unbreakable or breakable by resetting <b>VX_UNBREAKABLE</b>with <b><a href="./taskInfo.html#taskOptionsSet">taskOptionsSet</a>(&nbsp;)</b>.  Several VxWorks tasks are spawned unbreakable,such as the shell, the exception support task <b><a href="./excLib.html#excTask">excTask</a>(&nbsp;)</b>, and severalnetwork-related tasks.<p></blockquote><h4>DISASSEMBLER AND STACK TRACER</h4><blockquote><p>The <b><a href="./dbgLib.html#l">l</a>(&nbsp;)</b> routine provides a symbolic disassembler.  The <b><a href="./dbgLib.html#tt">tt</a>(&nbsp;)</b> routineprovides a symbolic stack tracer.<p></blockquote><h4>SHELL ABORT AND EXCEPTION HANDLING</h4><blockquote><p>This package includes enhanced support for the shell in a debuggingenvironment.  The terminal abort function, which restarts the shell, isinvoked with the abort key if the <b>OPT_ABORT</b> option has been set.  Bydefault, the abort key is CTRL-C.  For more information, see the manualentries for <b><a href="./tyLib.html#tyAbortSet">tyAbortSet</a>(&nbsp;)</b> and <b><a href="./tyLib.html#tyAbortFuncSet">tyAbortFuncSet</a>(&nbsp;)</b>.<p></blockquote><h4>THE DEFAULT TASK AND TASK REFERENCING</h4><blockquote><p>Many routines in this module take an optional task name or ID as anargument.  If this argument is omitted or zero, the "current" task isused.  The current task (or "default" task) is the last task referenced.The <b><a href="./dbgLib.html#top">dbgLib</a></b> library uses <b><a href="./taskInfo.html#taskIdDefault">taskIdDefault</a>(&nbsp;)</b> to set and get the last-referencedtask ID, as do many other VxWorks routines.<p>All VxWorks shell expressions can reference a task by either ID or name.The shell attempts to resolve a task argument to a task ID; if no match isfound in the system symbol table, it searches for the argument in the listof active tasks.  When it finds a match, it substitutes the task name withits matching task ID.  In symbol lookup, symbol names take precedence overtask names.<p></blockquote><h4>CAVEAT</h4><blockquote><p>When a task is continued, <b><a href="./dbgLib.html#c">c</a>(&nbsp;)</b> and <b><a href="./dbgLib.html#s">s</a>(&nbsp;)</b> routines do not yet distinguishbetween a suspended task or a task suspended by the debugger.  Therefore, use of these routines should be restricted to only those tasks beingdebugged.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>dbgLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./excLib.html#top">excLib</a></b>, <b><a href="./tyLib.html#top">tyLib</a></b>, <b><a href="./taskInfo.html#taskIdDefault">taskIdDefault</a>(&nbsp;)</b>, <b><a href="./taskInfo.html#taskOptionsSet">taskOptionsSet</a>(&nbsp;)</b>, <b><a href="./tyLib.html#tyAbortSet">tyAbortSet</a>(&nbsp;)</b>,<b><a href="./tyLib.html#tyAbortFuncSet">tyAbortFuncSet</a>(&nbsp;)</b>,<i>VxWorks Programmer's Guide: Target Shell, </i>windsh,<i>Tornado User's Guide: Shell </i><hr><a name="dbgHelp"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>dbgHelp(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>dbgHelp(&nbsp;)</strong> - display debugging help menu</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void dbgHelp (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine displays a summary of <b><a href="./dbgLib.html#top">dbgLib</a></b> utilities with ashort description of each, similar to the following:<p><pre>    dbgHelp                         Print this list    dbgInit                         Install debug facilities    b                               Display breakpoints    b         addr[,task[,count]]   Set breakpoint    e         addr[,eventNo[,task[,func[,arg]]]]] Set eventpoint (WindView)    bd        addr[,task]           Delete breakpoint    bdall     [task]                Delete all breakpoints    c         [task[,addr[,addr1]]] Continue from breakpoint    cret      [task]                Continue to subroutine return    s         [task[,addr[,addr1]]] Single step    so        [task]                Single step/step over subroutine    l         [adr[,nInst]]         List disassembled memory    tt        [task]                Do stack trace on task    bh        addr[,access[,task[,count[,quiet]]]] set hardware breakpoint                                    (if supported by the architecture)</pre></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dbgLib.html#top">dbgLib</a></b>, <i>VxWorks Programmer's Guide: Target Shell</i><hr><a name="dbgInit"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>dbgInit(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>dbgInit(&nbsp;)</strong> - initialize the local debugging package</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS dbgInit (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes the local debugging package and enables the basicbreakpoint and single-step functions.<p>This routine also enables the shell abort function, CTRL-C.<p></blockquote><h4>NOTE</h4><blockquote><p>The debugging package should be initialized before any debugging routinesare used.  If the configuration macro <b>INCLUDE_DEBUG</b> is defined, <b><a href="./dbgLib.html#dbgInit">dbgInit</a>(&nbsp;)</b>is called by the root task, <b><a href="./usrConfig.html#usrRoot">usrRoot</a>(&nbsp;)</b>, in <b>usrConfig.c</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, always.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dbgLib.html#top">dbgLib</a></b>, <i>VxWorks Programmer's Guide: Target Shell</i><hr><a name="b"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>b(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>b(&nbsp;)</strong> - set or display breakpoints</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS b    (    INSTR * addr,             /* where to set breakpoint, or 0 = display */                              /* all breakpoints */     int     task,             /* task for which to set breakboint, 0 = */                              /* set all tasks */     int     count,            /* number of passes before hit */    BOOL    quiet             /* TRUE = don't print debugging info, FALSE */                              /* = print debugging info */     )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets or displays breakpoints.  To display the list ofcurrently active breakpoints, call <b><a href="./dbgLib.html#b">b</a>(&nbsp;)</b> without arguments:<pre>    -&gt; b</pre>The list shows the address, task, and pass count of each breakpoint.Temporary breakpoints inserted by <b><a href="./dbgLib.html#so">so</a>(&nbsp;)</b> and <b><a href="./dbgLib.html#cret">cret</a>(&nbsp;)</b> are also indicated.<p>To set a breakpoint with <b><a href="./dbgLib.html#b">b</a>(&nbsp;)</b>, include the address, which can bespecified numerically or symbolically with an optional offset.

⌨️ 快捷键说明

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