小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

【vxworks筆記】vxworks調(diào)試常用命令

 WUCANADA 2012-09-15
【vxworks筆記】vxworks調(diào)試常用命令
ahong007 發(fā)表于 - 2010-1-15 3:17:00
11

總結(jié)的vxworks常用調(diào)試命令,學習vxworks這些東西是必須的。

1.與任務(wù)相關(guān)的命令
sp ,[arg1],...,[arg9]
-啟動任務(wù),最多接受9個參數(shù),默認的優(yōu)先級100、堆棧20000字節(jié)

period n,,[arg1],...,[arg8]
-創(chuàng)建一個周期調(diào)用的任務(wù),周期為n秒,最多接受8個參數(shù)

repeat m,,[arg1],...,[arg8]
-創(chuàng)建一個反復調(diào)用的任務(wù),調(diào)用次數(shù)為m,m=0時永久調(diào)用,最多也是8個參數(shù)

ts tidX         -掛起任務(wù)
tr tidX         -恢復掛起的任務(wù)
td tidX         -刪除任務(wù)
i   tidX         -顯示任務(wù)基本信息,參數(shù)為0時顯示全部任務(wù)
ti tidX         -顯示任務(wù)詳細信息,包括寄存器、堆棧等
tt tidX         -顯示任務(wù)的函數(shù)調(diào)用關(guān)系
checkStack tidX -顯示任務(wù)堆棧使用的歷史統(tǒng)計,參數(shù)為0時顯示全部任務(wù)
[其中tidX可以為任務(wù)ID 也可以為任務(wù)名]

2、系統(tǒng)信息

lkup ["string"] -在系統(tǒng)符號表中查找并列出含有"string"字符的函數(shù)及全局變量,有兩個特殊參數(shù):
                   0,給出符號表統(tǒng)計;""(空字符串),列出全部符號

lkAddr addr      -顯示addr地址附近的符號表

l addr,[n]       -顯示addr地址開始的n條指令的反匯編,n省略時默認為10條指令

h [n]            -n為0時列出最近執(zhí)行的shell命令,默認20條;n非0時,設(shè)定shell記錄的歷史命令的數(shù)目

d [addr,[number],[width]]
                 -顯示addr地址開始的number個單元的內(nèi)容,width定制每個單元的寬度,可以是1、2、4、8

m addr,[width]   -按width寬度修改addr地址的內(nèi)容,width可以是1、2、4、8

memShow 1        -顯示系統(tǒng)分區(qū)上空閑和已分配空間的總數(shù)等

printErrno value -打印系統(tǒng)定義的錯誤碼的宏

3、與網(wǎng)絡(luò)相關(guān)的命令

ifShow       ["ifname"]            - show info about network interfaces
inetstatShow                       - show all Internet protocol sockets
tcpstatShow                        - show statistics for TCP
udpstatShow                        - show statistics for UDP
ipstatShow                         - show statistics for IP
icmpstatShow                       - show statistics for ICMP
arpShow                            - show a list of known ARP entries
mbufShow                           - show network stack data pool statistics
netStackSysPoolShow                - show network stack system pool statistics

routeShow                          - display all IP routes (summary information)
mRouteShow                         - display all IP routes (verbose information)
routestatShow                      - display routing statistics
routeAdd     "destaddr","gateaddr" - add route to route table
routeDelete "destaddr","gateaddr" - delete route from route table

說明:上述大多數(shù)命令都可以在help、netHelp中查到


The VxWorks shell

Useful control chars for all targets:

    ^S, ^Q are good for debugging

    ^H, ^U backspaces and delete line control

    ESC to put in vi edit mode. see section 11.5 of VxWORKS programmer's manual for vi edit command summary

Shell syntax:

    Can interpret "C-like" expressions. " ;" will separate command execution from the VxWORKS shell context. It is used to resolve ambiguity between commands.

  • Any symbol stored in the symbol table can be referenced. ex: printf, fopen, logMsg, or global variables. When calling functions, the shell ignores the "()" braces, so you may omit them.

  • Data Types -- strong type-casting recommended or else:
    • L.H. type = R.H. type
    • mixing floats and ints will result in a double
    • doubles always assumed unless explicit type-casting is performed
    • allocating char-strings done by:

      ->
      -> ss = "bla bla bla"
      ->

    • explicit address referencing: eg,

      ->
      -> *0x1100 = 10;
      ->

  • Unlike C, Array references require an explicit application of the "&" operator. Array declarations in the shell should be avoided if at all possible.

Shell Redirection:

  • copy < input_file > output_file

  • Be careful of using "<" or ">". For example:

    ->
    -> x > y
    ->

    will print the value of x out to a stream named "y", while

    ->
    -> x > y;
    ->

    will be interpreted as "x is greater than y" !

  • script files can be used to spawn tasks, set variables, etc.:

    ->
    -> < script-file
    ->

    will invoke the commands contained within file named, script-file.

  • You can quickly create script files by redirecting the history listing shell command to the output and then stripping the numbers off:

    ->
    -> h > host:/tmp/script
    ->

    Then from the UNIX host, you do the following to strip the numbers off:

    simbox%
    simbox% colrm 1 5 < /tmp/script > /tmp/newscript
    simbox%

    • 本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
      轉(zhuǎn)藏 分享 獻花(0

      0條評論

      發(fā)表

      請遵守用戶 評論公約

      類似文章 更多