亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? nesc-debugging.html

?? tinyos中文手冊(cè),是根據(jù)tinyos系統(tǒng)自帶手冊(cè)翻譯過來的,雖然質(zhì)量不好,但是對(duì)英文不強(qiáng)的人還是有用的
?? HTML
字號(hào):
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">  <title>Debugging nesC code with gdb</title>  <meta name="author" content="David Gay"></head><body><h1>Debugging nesC code in GDB</h1>gdb does not (yet!) have a nesC-specific mode. Instead, in gdb you areeffectively debugging the C code generated by the nesC compiler.However, the nesC compiler includes #line directives in the code itgenerates, so single-stepping through nesC code will display the correctnesC source code, and breakpoints can be set based on the line numbersand file names of nesC components. The situation for variable,function, command and event names is however not as straightforward. Ifyou wish to refer to one of these, you must use its name in thegenerated C code, as explained below.<br><br>When debugging tossim code, life is further complicated by the factthat the generated C code emulates multiple motes. Thus all modulevariables (but not global variables in C files) become arrays, indexedby mote id (if the variable was itself an array, the mote id is thefirst dimension). At any point in time, the "current" mote is found in <span style="font-family: monospace;">tos_state.current_node</span>.<br><br>By default, nesC does a lot of inlining, which makes debugging tricky.In most cases, pass the -<span style="font-family: monospace;">g -O1-fnesc-no-inline</span> options to nesC to produce code that is easierto debug (the <span style="font-family: monospace;">debug</span> optionto the standard TinyOS Makefile does this). If you have a problem whichrequires debugging fully optimised code, just include <span style="font-family: monospace;">-g</span> and prepare for a slightlypainful experience... (the <span style="font-family: monospace;">debugopt</span>to the standard TinyOS Makefile does this).<br><h2>Mapping from nesC names to C names</h2>Types, variables and functions in C files (included via the <span style="font-family: monospace;">includes</span> statement) are leftunchanged in the generated C code, except if they correspond to a nesCkeyword. In this last case, the name is prefixed with <span style="font-family: monospace;">__nesc_keyword_</span>, so componentsbecomes <span style="font-family: monospace;">__nesc_keyword_components</span>.<br><br>A module variable (top-level data declarations in modules)&nbsp; <span style="font-style: italic;">X </span>in module <span style="font-style: italic;">M</span> is called <span style="font-style: italic;">M</span>$<span style="font-style: italic;">X</span>in the generated C code.<br><br>A function <span style="font-style: italic;">F</span> in module <span style="font-style: italic;">M</span> is called <span style="font-style: italic;">M</span>$<span style="font-style: italic;">F</span>in the generated C code.<br><br>Local variable names in modules are left unchanged in the generated Ccode.<br><br>A command or event <span style="font-style: italic;">C</span> in module <span style="font-style: italic;">M</span> is called <span style="font-style: italic;">M</span>$<span style="font-style: italic;">C</span>in the generated C code.<br><br>A command or event <span style="font-style: italic;">C</span> ofinterface instance <span style="font-style: italic;">I</span> in module <span style="font-style: italic;">M</span> is called <span style="font-style: italic;">M</span>$<span style="font-style: italic;">I</span>$<span style="font-style: italic;">C</span> in the generated C code.<br><br>To complicate matters a little, gdb does not directly accept $ infunction names in <span style="font-family: monospace;">break</span>(set a breakpoint) statements. Instead, you must precede the functionname with a *, e.g, <span style="font-family: monospace;">b*BlinkM$StdControl$init</span>. Note that this sets a breakpoint on thefirst instruction of the function (normally part of the functionpreamble setting up the function's stack frame) rather than on the firstexecutable statement of the function. As a result, gdb may notcorrectly display argument values, etc, until you single-step into thefunction body.<br><h2>Example</h2>This example debugs the CntToLeds application from TinyOS on a micamote, using on-chip debugging with a JTAG ICE pod (see <a href="debugging.html">this document</a> for instructions on setting theJTAG ICE up):<br><br>We compile the application with debugging and no inlining by passingthe TinyOS-specific <span style="font-family: monospace;">debug</span>option to make:<br><div style="margin-left: 40px;"><span style="font-family: monospace;">[dgay@barnowlCntToLeds]$ make mica debug</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; compilingCntToLeds to a mica binary</span><br style="font-family: monospace;"><span style="font-family: monospace;">ncc -o build/mica/main.exe -O1 -g-fnesc-no-inline -board=micasb -target=mica -I%T/lib/Counters -Wall-Wshadow -DDEF_TOS_AM_GROUP=0x42 -Wnesc-all -finline-limit=100000-fnesc-cfile=build/mica/app.c&nbsp; CntToLeds.nc -lm</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; compiledCntToLeds to build/mica/main.exe</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2588 bytes in ROM</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;46 bytes in RAM</span><br style="font-family: monospace;"><span style="font-family: monospace;">avr-objcopy --output-target=srecbuild/mica/main.exe build/mica/main.srec</span><br><span style="font-family: monospace;"></span></div><br>We start ice-gdb to download and debug CntToLeds:<br><div style="margin-left: 40px;"><span style="font-family: monospace;">[dgay@barnowlCntToLeds]$ ice-gdb build/mica/main.exe</span><br style="font-family: monospace;"><span style="font-family: monospace;">AVaRICE version 2.0.20030821cvs,Aug 21 2003 15:36:04</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;</span><br style="font-family: monospace;"><span style="font-family: monospace;">JTAG config starting.</span><br style="font-family: monospace;"><span style="font-family: monospace;">Hardware Version: 0xc0</span><br style="font-family: monospace;"><span style="font-family: monospace;">Software Version: 0x69</span><br style="font-family: monospace;"><span style="font-family: monospace;">Reported JTAG device ID: 0x9702</span><br style="font-family: monospace;"><span style="font-family: monospace;">Configured for device ID: 0x9702atmega128</span><br style="font-family: monospace;"><span style="font-family: monospace;">LockBits -&gt; 0xff</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;</span><br style="font-family: monospace;"><span style="font-family: monospace;">Reading Fuse Bytes:</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp; Extended Fuse byte -&gt;0xfd</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;High Fuse byte -&gt; 0x19</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Low Fuse byte -&gt; 0xfe</span><br style="font-family: monospace;"><span style="font-family: monospace;">JTAG config complete.</span><br style="font-family: monospace;"><span style="font-family: monospace;">Downloading FLASH image totarget......................</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;</span><br style="font-family: monospace;"><span style="font-family: monospace;">Download complete.</span><br style="font-family: monospace;"><span style="font-family: monospace;">Waiting for connection on port6423.</span><br style="font-family: monospace;"><span style="font-family: monospace;">GNU gdb cvs-pre6.0-tinyos</span><br style="font-family: monospace;"><span style="font-family: monospace;">Copyright 2003 Free SoftwareFoundation, Inc.</span><br style="font-family: monospace;"><span style="font-family: monospace;">GDB is free software, covered bythe GNU General Public License, and you are</span><br style="font-family: monospace;"><span style="font-family: monospace;">welcome to change it and/ordistribute copies of it under certain conditions.</span><br style="font-family: monospace;"><span style="font-family: monospace;">Type "show copying" to see theconditions.</span><br style="font-family: monospace;"><span style="font-family: monospace;">There is absolutely no warrantyfor GDB.&nbsp; Type "show warranty" for details.</span><br style="font-family: monospace;"><span style="font-family: monospace;">This GDB was configured as"--host=i686-pc-linux-gnu --target=avr"...</span><br style="font-family: monospace;"><span style="font-family: monospace;">Connection opened by host127.0.0.1, port 33805.</span><br style="font-family: monospace;"><span style="font-family: monospace;">0x00000000 in __vectors ()</span><br><span style="font-family: monospace;"></span></div><span style="font-family: monospace;"><br></span>The program is stopped. We set a breakpoint at the Timer.firedevent in the Counter module. Note the *:<span style="font-family: monospace;"><br style="font-family: monospace;"></span><div style="margin-left: 40px;"><span style="font-family: monospace;">(gdb)b *Counter$Timer$fired</span><br style="font-family: monospace;"><span style="font-family: monospace;">Hardware assisted breakpoint 1 at0x826: file /home/dgay/motes/tinyos-1.x/tos/lib/Counters/Counter.nc,line 67.</span><br><span style="font-family: monospace;"></span></div><span style="font-family: monospace;"><br></span>And let the program continue:<br><div style="margin-left: 40px;"><span style="font-family: monospace;"></span><span style="font-family: monospace;">(gdb) c</span><br style="font-family: monospace;"><span style="font-family: monospace;">Continuing.</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;</span><br style="font-family: monospace;"><span style="font-family: monospace;">Breakpoint 1, Counter$Timer$fired() at /home/dgay/motes/tinyos-1.x/tos/lib/Counters/Counter.nc:67</span><br style="font-family: monospace;"><span style="font-family: monospace;">67&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;state++;</span><br><span style="font-family: monospace;"></span></div><span style="font-family: monospace;"><br></span>The breakpont was reached. We continue again...<span style="font-family: monospace;"><br style="font-family: monospace;"></span><div style="margin-left: 40px;"><span style="font-family: monospace;">(gdb)c</span><br style="font-family: monospace;"><span style="font-family: monospace;">Continuing.</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;</span><br style="font-family: monospace;"><span style="font-family: monospace;">Breakpoint 1, Counter$Timer$fired() at /home/dgay/motes/tinyos-1.x/tos/lib/Counters/Counter.nc:67</span><br style="font-family: monospace;"><span style="font-family: monospace;">67&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;state++;</span><br><span style="font-family: monospace;"></span></div><span style="font-family: monospace;"><br></span>Let's examine the state variable of the Counter module:<span style="font-family: monospace;"><br style="font-family: monospace;"></span><div style="margin-left: 40px;"><span style="font-family: monospace;">(gdb)p Counter$state</span><br style="font-family: monospace;"><span style="font-family: monospace;">$1 = 1</span><br><span style="font-family: monospace;"></span></div><span style="font-family: monospace;"><br></span>And then follow where the IntOutput.output command takes us.<span style="font-family: monospace;"><br style="font-family: monospace;"></span><div style="margin-left: 40px;"><span style="font-family: monospace;">(gdb)n</span><br style="font-family: monospace;"><span style="font-family: monospace;">68&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return call IntOutput.output(state);</span><br style="font-family: monospace;"><span style="font-family: monospace;">(gdb) s</span><br style="font-family: monospace;"><span style="font-family: monospace;">Counter$IntOutput$output(arg_0x84fde28=2) at/home/dgay/motes/tinyos-1.x/tos/interfaces/IntOutput.nc:52</span><br style="font-family: monospace;"><span style="font-family: monospace;">52&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;command result_t output(uint16_t value);</span><br><span style="font-family: monospace;"></span></div><span style="font-family: monospace;"><br></span>The debugger shows us the command in the interface, we must stepagain to reach our destination:<span style="font-family: monospace;"><br style="font-family: monospace;"></span><div style="margin-left: 40px;"><span style="font-family: monospace;">(gdb)s</span><br style="font-family: monospace;"><span style="font-family: monospace;">IntToLedsM$IntOutput$output(value=2) at/home/dgay/motes/tinyos-1.x/tos/lib/Counters/IntToLedsM.nc:70</span><br style="font-family: monospace;"><span style="font-family: monospace;">70&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (value &amp; 1) call Leds.redOn();</span><br><span style="font-family: monospace;"></span></div><span style="font-family: monospace;"><br></span>The names of local variables (and function parameters) areunchanged:<span style="font-family: monospace;"><br style="font-family: monospace;"></span><div style="margin-left: 40px;"><span style="font-family: monospace;">(gdb)p value</span><br style="font-family: monospace;"><span style="font-family: monospace;">$2 = 2</span><br><span style="font-family: monospace;"></span></div><span style="font-family: monospace;"><br></span>That's all folks!<span style="font-family: monospace;"><br style="font-family: monospace;"></span><div style="margin-left: 40px;"><span style="font-family: monospace;">(gdb)quit</span><br style="font-family: monospace;"></div><br></body></html>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美大片在线观看一区| 夜色激情一区二区| 亚洲欧美国产高清| 麻豆精品国产91久久久久久| 成av人片一区二区| 日韩欧美国产小视频| 亚洲乱码日产精品bd| 国产91精品露脸国语对白| 欧美一级电影网站| 亚洲国产精品久久久男人的天堂 | 欧美日韩精品一区二区三区| 久久久五月婷婷| 日本va欧美va精品发布| 91久久香蕉国产日韩欧美9色| 精品盗摄一区二区三区| 奇米色777欧美一区二区| 欧美这里有精品| 亚洲欧美一区二区不卡| 成人国产精品免费网站| 久久青草欧美一区二区三区| 日本大胆欧美人术艺术动态| 欧美三区免费完整视频在线观看| 国产精品成人午夜| 不卡的av中国片| 中文字幕不卡的av| gogogo免费视频观看亚洲一| 国产性色一区二区| 国产成人午夜视频| 国产亚洲欧美中文| 国产不卡视频在线播放| 日本一区二区视频在线| 成人av动漫在线| 1区2区3区国产精品| 91视频免费看| 曰韩精品一区二区| 欧美日韩国产综合久久| 天天射综合影视| 日韩精品一区二区三区四区视频| 久久精品国产**网站演员| 欧美tickling挠脚心丨vk| 国产在线日韩欧美| 国产欧美一区二区三区网站 | 亚洲国产wwwccc36天堂| 欧美日韩另类一区| 免费在线观看一区| 精品国产一区二区亚洲人成毛片 | 99国内精品久久| 尤物av一区二区| 777午夜精品免费视频| 久久精品国产在热久久| 国产婷婷色一区二区三区在线| 国产成人精品免费在线| 亚洲蜜臀av乱码久久精品| 欧美日韩精品一区二区三区四区 | 69堂精品视频| 韩国精品一区二区| 国产精品欧美久久久久一区二区| 大胆欧美人体老妇| 亚洲国产aⅴ天堂久久| 日韩欧美国产电影| 91在线国内视频| 日日摸夜夜添夜夜添精品视频 | 在线观看免费一区| 麻豆国产欧美日韩综合精品二区| 国产欧美日韩在线| 欧美日韩视频在线一区二区 | 99国产精品久久久久久久久久 | 久久爱另类一区二区小说| 中文字幕+乱码+中文字幕一区| 色婷婷久久综合| 麻豆91在线播放| 亚洲免费观看高清完整版在线观看熊 | 久久亚洲欧美国产精品乐播| 91在线小视频| 国产中文字幕精品| 亚洲国产aⅴ成人精品无吗| 国产日韩av一区二区| 欧美午夜精品免费| 成人性色生活片| 蜜桃视频一区二区三区在线观看| 亚洲欧洲无码一区二区三区| 日韩三级视频在线观看| 色妹子一区二区| 国产电影精品久久禁18| 视频一区视频二区中文| 综合久久综合久久| 久久蜜桃一区二区| 欧美一区永久视频免费观看| 91在线视频免费91| 国产不卡一区视频| 国模套图日韩精品一区二区| 亚洲国产乱码最新视频| 日韩码欧中文字| 久久久精品一品道一区| 精品少妇一区二区| 欧美日韩免费观看一区三区| 99re成人在线| 豆国产96在线|亚洲| 国产在线精品一区二区三区不卡| 日韩av一二三| 青青草精品视频| 天天色 色综合| 午夜激情一区二区| 性做久久久久久免费观看欧美| 一区二区三区中文字幕在线观看| 中文字幕一区二区日韩精品绯色| 国产喷白浆一区二区三区| 日韩精品专区在线| 日韩精品一区二区三区在线| 91精品国产乱码久久蜜臀| 欧美日韩国产影片| 欧美日韩另类国产亚洲欧美一级| 欧洲视频一区二区| 欧美日韩中文字幕一区二区| 欧美性大战久久| 91精品国产aⅴ一区二区| 欧美妇女性影城| 91精品国产日韩91久久久久久| 欧美精品一卡二卡| 日韩一级精品视频在线观看| 日韩视频在线一区二区| 精品国产电影一区二区| 国产视频一区在线观看| 国产欧美一区二区精品久导航| 亚洲国产成人自拍| 亚洲欧美成aⅴ人在线观看| 亚洲线精品一区二区三区| 国产精品网站在线播放| 成人欧美一区二区三区1314| 18成人在线观看| 亚洲r级在线视频| 美洲天堂一区二卡三卡四卡视频| 久久精品国产一区二区三区免费看 | 欧美久久久久久蜜桃| 制服丝袜一区二区三区| 久久综合给合久久狠狠狠97色69| 国产午夜亚洲精品理论片色戒 | 成人不卡免费av| 一本色道久久综合亚洲精品按摩| 欧美视频中文一区二区三区在线观看 | 久久综合色8888| 国产精品毛片大码女人| 亚洲va国产天堂va久久en| 精品夜夜嗨av一区二区三区| 成人美女在线观看| 欧美性欧美巨大黑白大战| 欧美一卡2卡3卡4卡| 国产精品视频麻豆| 五月婷婷久久丁香| 国产成人一区在线| 欧美日韩一二区| 欧美激情在线观看视频免费| 亚洲人妖av一区二区| 美女网站色91| 色偷偷久久一区二区三区| 日韩免费性生活视频播放| 日韩极品在线观看| 国产福利一区在线| 欧美日韩成人高清| 亚洲国产成人在线| 久久成人精品无人区| 欧美综合一区二区| 国产日韩成人精品| 日本欧美一区二区三区乱码| 99久久精品国产观看| 精品盗摄一区二区三区| 一区二区在线观看视频在线观看| 国产一区二区福利视频| 欧美日韩精品欧美日韩精品| 国产精品国产三级国产普通话三级 | 欧美极品aⅴ影院| 日韩av电影免费观看高清完整版| 成人白浆超碰人人人人| 精品女同一区二区| 三级在线观看一区二区| 94色蜜桃网一区二区三区| 久久久久国产成人精品亚洲午夜| 日日夜夜精品视频天天综合网| 91网站在线播放| 日本一区二区三区高清不卡| 日日夜夜免费精品| 欧美日韩国产高清一区二区 | aaa国产一区| 26uuu精品一区二区三区四区在线| 亚洲成人av一区| 一本色道久久综合精品竹菊| 国产精品欧美一级免费| 国产一区二区三区在线观看精品| 91精品午夜视频| 免费看日韩精品| 7777精品伊人久久久大香线蕉超级流畅 | 91精品国产入口在线| 一区二区三区成人| 色先锋资源久久综合| 亚洲美女在线国产| 色综合中文字幕国产| 亚洲国产高清aⅴ视频| 成人av在线一区二区三区| 中文幕一区二区三区久久蜜桃| 国产传媒欧美日韩成人|