📄 symsynclib.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/symSyncLib.html - generated by refgen from symSyncLib.c --> <title> symSyncLib </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>symSyncLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>symSyncLib</strong> - host/target symbol table synchronization </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./symSyncLib.html#symSyncLibInit">symSyncLibInit</a>( )</b> - initialize host/target symbol table synchronization<br><b><a href="./symSyncLib.html#symSyncTimeoutSet">symSyncTimeoutSet</a>( )</b> - set WTX timeout <br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This module provides host/target symbol table synchronization.With synchronization, every module or symbol added to the run-timesystem from either the target or host side can be seen by facilitieson both the target and the host. Symbol table synchronization makes it possible to use host tools to debug application modules loaded with the target loader or from a target file system. To enable synchronization, two actions must be performed: <p><table></tr><tr valign=top><td>1<td>The module is initialized by <b><a href="./symSyncLib.html#symSyncLibInit">symSyncLibInit</a>( )</b>, which is called automatically when the configuration macro <b>INCLUDE_SYM_TBL_SYNC</b> is defined.</tr><tr valign=top><td>2<td>The target server is launched with the <b>-s</b> option.</table>If synchronization is enabled, <b><a href="./symSyncLib.html#top">symSyncLib</a></b> spawns a synchronization task on the target, <b>tSymSync</b>. This task behaves as a WTX tool and attaches itself to the target server. When the task starts, it synchronizes target and host symbol tables so that every module loaded on the target before the target server was started can be seen by the host tools. This feature is particularly useful if VxWorks is started with a target-based startup script before the target server has been launched.<p>The <b>tSymSync</b> task synchronizes new symbols that are addedby either the target or the host tools. The task waits for synchronization events on two channels: a WTX event from the host or a message queue additonfrom the target.<p>The <b>tSymSync</b> task, like all WTX tools, must be able to connect to the WTXregistry. To make the WTX registry accessible from the target, do one ofthe following:<p><table></tr><tr valign=top><td>1<td>Boot the target from a host on the same subnet as the registry.</tr><tr valign=top><td>2<td>Start the registry on the same host the target boots from.</tr><tr valign=top><td>3<td>Add the needed routes with <b><a href="./routeLib.html#routeAdd">routeAdd</a>( )</b> calls, possibly in a startup script.</table><p>Neither the host tools nor the target loader wait for synchronizationcompletion to return. To know when the synchronization is complete, youcan wait for the corresponding event sent by the target server, or,if your target server was started with the <b>-V</b> option, it prints amessage indicating synchronization has completed.<p>The event sent by the target server is of the following format:<p><pre> SYNC_DONE <i>syncType</i> <i>syncObj</i> <i>syncStatus</i></pre>The following are examples of messages displayed by the target serverindicating synchronization is complete:<pre> Added target_modules to target-server.....done Added ttTest.o.68k to target............done</pre>If synchronization fails, the following message is displayed:<pre> Added gopher.o to target............failed</pre>This error generally means that synchronization of the corresponding moduleor symbol is no longer possible because it no longer exists in the originalsymbol table. If so, it will be followed by:<pre> Removed gopher.o from target..........failed</pre>Failure can also occur if a timeout is reached. Call <b><a href="./symSyncLib.html#symSyncTimeoutSet">symSyncTimeoutSet</a>( )</b> to modify the WTX timeout between the targetsynchronization task and the target server.<p></blockquote><h4>LIMITATIONS</h4><blockquote><p>Hardware: Because the synchronization task uses the WTX protocol tocommunicate with the target server, the target must include networkfacilities. Depending on how much synchronization is to be done (numberof symbols to transfer), a reasonable throughput between the target serverand target agent is required (the wdbrpc backend is recommended when largemodules are to be loaded).<p>Performance: The synchronization task requires some minor overhead intarget routines <b><a href="./msgQLib.html#msgQSend">msgQSend</a>( )</b>, <b><a href="./loadLib.html#loadModule">loadModule</a>( )</b>, <b><a href="./symLib.html#symAdd">symAdd</a>( )</b>, and <b><a href="./symLib.html#symRemove">symRemove</a>( )</b>; however, if an application sends more than 15 synchronization events,it will fill the message queue and then need to wait for a synchronizationevent to be processed by <b>tSymSync</b>. Also, waiting for host synchronization events is done by polling; thus there may be some impact on performance if there are lower-priority tasks than <b>tSymSync</b>. If no more synchronization is needed, <b>tSymSync</b> can be suspended.<p>Known problem: Modules with undefined symbols that are loaded from the targetare not synchronized; however, they are synchronized if they are loadedfrom the host.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="../../tornado/tools/tgtsvr.html#top" >tgtsvr</a></b><hr><a name="symSyncLibInit"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>symSyncLibInit( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>symSyncLibInit( )</strong> - initialize host/target symbol table synchronization</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void symSyncLibInit ()</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes host/target symbol table synchronization. To enable synchronization, it must be called before a target serveris started. It is called automatically if the configuration macro<b>INCLUDE_SYM_TBL_SYNC</b> is defined.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./symSyncLib.html#top">symSyncLib</a></b><hr><a name="symSyncTimeoutSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>symSyncTimeoutSet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>symSyncTimeoutSet( )</strong> - set WTX timeout </p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>UINT32 symSyncTimeoutSet ( UINT32 timeout /* WTX timeout in milliseconds */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the WTX timeout between target server and synchronizationtask.<p></blockquote><h4>RETURNS</h4><blockquote><p>If <i>timeout</i> is 0, the current timeout, otherwise the new timeoutvalue in milliseconds.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./symSyncLib.html#top">symSyncLib</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -