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

📄 symlib.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html><head><!-- /vobs/wpwr/docs/tornado-api/tgtint/symlib.html - generated by refgen from symlib.c --> <title> symlib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>Tornado API Reference :  Target Server Internal Routines</i></a></p></blockquote><h1>symlib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>symlib</strong> - symbol table subroutine library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./symlib.html#symAdd">symAdd</a></i>(&nbsp;)</b>  -  create and add a symbol to a symbol table, including a group number<br><b><i><a href="./symlib.html#symRemove">symRemove</a></i>(&nbsp;)</b>  -  remove a symbol from a symbol table<br><b><i><a href="./symlib.html#symFindByName">symFindByName</a></i>(&nbsp;)</b>  -  look up a symbol by name<br><b><i><a href="./symlib.html#symFindByNameAndType">symFindByNameAndType</a></i>(&nbsp;)</b>  -  look up a symbol by name and type<br><b><i><a href="./symlib.html#symFindByValue">symFindByValue</a></i>(&nbsp;)</b>  -  look up a symbol by value<br><b><i><a href="./symlib.html#symByValueFind">symByValueFind</a></i>(&nbsp;)</b>  -  look up a symbol by value<br><b><i><a href="./symlib.html#symFindByValueAndType">symFindByValueAndType</a></i>(&nbsp;)</b>  -  look up a symbol by value and type<br><b><i><a href="./symlib.html#symByValueAndTypeFind">symByValueAndTypeFind</a></i>(&nbsp;)</b>  -  look up a symbol by value and type<br><b><i><a href="./symlib.html#symEach">symEach</a></i>(&nbsp;)</b>  -  call a routine to examine each entry in a symbol table<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library provides facilities for managing symbol tables.  A symboltable associates a name and type with a value.  A name is simply anarbitrary, null-terminated string.  A symbol type is a small integer(typedef <b>SYM_TYPE</b>), and its value is a character pointer.  Though commonlyused as the basis for object loaders, symbol tables may be used wheneverefficient association of a value with a name is needed.<p>The target server uses only one symbol table.  This table is accessedthrough the global variable <b>tgtSymTbl</b>, which is of the type <b>SYMTAB_ID</b>.<p>Each symbol in the symbol table has a name, a value, and a type.Symbols are added to a symbol table with <b><i><a href="./symlib.html#symAdd">symAdd</a></i>(&nbsp;)</b> and removed with<b><i><a href="./symlib.html#symRemove">symRemove</a></i>(&nbsp;)</b>.<p>Symbols can be accessed by either name or value.  The routine <b><i><a href="./symlib.html#symFindByName">symFindByName</a></i>(&nbsp;)</b>searches the symbol table for a symbol of a specified name.  The routine<b><i><a href="./symlib.html#symFindByValue">symFindByValue</a></i>(&nbsp;)</b> finds the symbol with the value closest to a specifiedvalue.  The routines <b><i><a href="./symlib.html#symFindByNameAndType">symFindByNameAndType</a></i>(&nbsp;)</b> and <b><i><a href="./symlib.html#symFindByValueAndType">symFindByValueAndType</a></i>(&nbsp;)</b>allow the symbol type to be used as an additional criterion in the searches.<p>Symbols in the symbol table are hashed by name into a hash table tooptimize looking up symbols by name with <b><i><a href="./symlib.html#symFindByName">symFindByName</a></i>(&nbsp;)</b>.  The size ofthe hash table is specified during the creation of a symbol table.Looking up symbols by value, with <b><i><a href="./symlib.html#symFindByValue">symFindByValue</a></i>(&nbsp;)</b> for example,requires a linear search of the table, which can be much slower.<p>The routine <b><i><a href="./symlib.html#symEach">symEach</a></i>(&nbsp;)</b> allows each symbol in the symbol table to be examinedby a user-specified function.<p>Name clashes occur when a symbol added to a table is identical in name andtype to a previously added symbol.  By default name clashes are allowed so adding multiple symbols with the same name and type is permitted.  <b><i><a href="./symlib.html#symFindByName">symFindByName</a></i>(&nbsp;)</b> returns the value most recently added, although all versions of the symbol can be found by <b><i><a href="./symlib.html#symEach">symEach</a></i>(&nbsp;)</b>.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>symLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./symlib.html#top">symlib</a></b>, loadlib,  <i>API Programmer's Guide: Object Module Loader </i><hr><a name="symAdd"></a><p align=right><a href="rtnIndex.html"><i>Target Server Internal Routines :  Routines</i></a></p></blockquote><h1><i>symAdd</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>symAdd</i>(&nbsp;)</strong> - create and add a symbol to a symbol table, including a group number</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS symAdd    (    SYMTAB_ID symTblId, /* symbol table to add symbol to */    char *    name,     /* pointer to symbol name string */    char *    value,    /* symbol address */    SYM_TYPE  type,     /* symbol type */    UINT16    group     /* symbol group */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine allocates a symbol <i>name</i> and adds it to a specified symboltable <i>symTblId</i> with the specified parameters <i>value</i>, <i>type</i>, and <i>group</i>.The <i>group</i> parameter specifies the group number assigned to a module whenit is loaded; see the reference entry for the VxWorks library moduleLib.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR if the symbol table is invalid or there is insufficientmemory for the symbol to be allocated.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./symlib.html#top">symlib</a></b>, <i>API Programmer's Guide: Object Module Loader </i><hr><a name="symRemove"></a><p align=right><a href="rtnIndex.html"><i>Target Server Internal Routines :  Routines</i></a></p></blockquote><h1><i>symRemove</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>symRemove</i>(&nbsp;)</strong> - remove a symbol from a symbol table</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS symRemove    (    SYMTAB_ID symTblId, /* symbol tbl to remove symbol from */    char *    name,     /* name of symbol to remove */    SYM_TYPE  type      /* type of symbol to remove */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine removes a symbol of matching name and type from aspecified symbol table.  The symbol is deallocated if found.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR if the symbol is not foundor could not be deallocated.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./symlib.html#top">symlib</a></b>, <i>API Programmer's Guide: Object Module Loader </i><hr><a name="symFindByName"></a><p align=right><a href="rtnIndex.html"><i>Target Server Internal Routines :  Routines</i></a></p></blockquote><h1><i>symFindByName</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>symFindByName</i>(&nbsp;)</strong> - look up a symbol by name</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS symFindByName    (    SYMTAB_ID  symTblId, /* ID of symbol table to look in */    char *     name,     /* symbol name to look for */    char * *   pValue,   /* where to put symbol value */    SYM_TYPE * pType     /* where to put symbol type */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine searches a symbol table for a symbol matching a specifiedname.  If the symbol is found, its value and type are copied to <i>pValue</i>and <i>pType</i>.  If multiple symbols have the same name but differ in type,the routine chooses the matching symbol most recently added to the symboltable.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR if the symbol table ID is invalidor the symbol cannot be found.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./symlib.html#top">symlib</a></b>, <i>API Programmer's Guide: Object Module Loader </i><hr><a name="symFindByNameAndType"></a><p align=right><a href="rtnIndex.html"><i>Target Server Internal Routines :  Routines</i></a></p></blockquote><h1><i>symFindByNameAndType</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>symFindByNameAndType</i>(&nbsp;)</strong> - look up a symbol by name and type</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS symFindByNameAndType    (    SYMTAB_ID  symTblId, /* ID of symbol table to look in */    char *     name,     /* symbol name to look for */    char * *   pValue,   /* where to put symbol value */    SYM_TYPE * pType,    /* where to put symbol type */    SYM_TYPE   sType,    /* symbol type to look for */    SYM_TYPE   mask      /* bits in <i>sType</i> to pay attention to */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine searches a symbol table for a symbol matching both name andtype (<i>name</i> and <i>sType</i>).  If the symbol is found, its value and type arecopied to <i>pValue</i> and <i>pType</i>.  The <i>mask</i> parameter can be used to matchsub-classes of type.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR if the symbol table ID is invalid or the symbol is notfound.<p></blockquote><h4>SEE ALSO</h4><blockquote><p>

⌨️ 快捷键说明

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