• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            隨筆-4  評(píng)論-40  文章-117  trackbacks-0

             

            文章出處:DIY部落(http://www.diybl.com/course/3_program/c++/cppsl/2008825/137412.html#)

             

            gdb用法比較多,功能很強(qiáng)大,平時(shí)用到的命令大概二十條,因?yàn)橐恍┰颍镁脹](méi)用了,都生疏了。

            昨天花了半天總結(jié)一下,詳細(xì)信息還是在gdb中用help看。有點(diǎn)亂,網(wǎng)上好像沒(méi)有思維導(dǎo)圖,等有時(shí)間

            freemind做個(gè),如有錯(cuò)誤,還請(qǐng)指正!

            ========================================================

            基于命令行的GDB前端:gdb

            基于圖形的GDB前端:DDD xxgdb

            基于文本的GDB前端 gdbtui|gdb -tui

             

            .gdb命令行參數(shù):

             

            gdb (gdb arguments)--args myprog (myprog arguments)

            gdb myprog -tty /dev/pts/1 [注:此處是-tty,并非有些參考書上寫的-t)

            gdb -q(-s)   :do not display the gdb and GPL information

            gdb -batch -x command_file myprog :usefel!

             

            .進(jìn)入gdb后的命令:

               1. file : load the execute file if not load in the command line

               2. shell shell_command Execute the rest of the line as a shell command.With no arguments, run an inferior shell.

               3. 怎樣不退出gdb編輯,編譯源文件并重新加載編譯后的? kill

               4.

             

               5.

             

             

               6. l(ist) [from,to] repeat to display the whole source code

               7.

             

               8. b(reak)   (num or function) if condition

               9. condition bp_number [expression]    if u have set bp in the desired position, add or change the the bk condition

             10.                                     To delete a break condition,do not use expression

             11. watch

             12. watch expression     stop the program when the value of expression changes.

             13. rwatch expression    stop the program whenever the program reads the value of any object involved in the evaluation of ex                     pression.

             14. awatch expression    stop the program whenever the program reads or modifies the value of any object involved in the eval                     uation of expression.

             15. delete

             16. enable

             17. disable

             18. ignore N n        ignore bp N n times

             19.

             

             20. r(un)

             21. s(tep) [lines] finish

             22. n(ext) [lines]

             23. c(ontinue) [passes]        pass the bp passes times before stop the program

             24.

             

             25. display

             26. p(rint)[/format] [expression]

             27. /format=/d u x o t c|a f

             28. x[/nfu] [address]

             29. /nfu

             30. n: how many units,default is one

             31. u the size of one unit the value is b h w g

             32. f = the print format in additional to s and i

             33. f = d u x o t f c s a i

             34. ptyp(=whatis)

             35.

             

             36.

             

             

             37. bt(backtrace)(=where)

             38. frame display and change the current frame

             39. info (frame.....) :display the information of the program

             40. show               :display the information of gdb

             41.

             

             42. set args    set env VAR1=test set variable

             43. show args   show env

             44.

             

             45. call

             46. disassemble

             47. until

             48. attach

            posted on 2010-03-03 18:32 李陽(yáng) 閱讀(434) 評(píng)論(0)  編輯 收藏 引用

            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問(wèn)   Chat2DB   管理


            日本一区精品久久久久影院| 久久婷婷五月综合97色直播| 亚洲va久久久噜噜噜久久| 免费精品久久天干天干| 99久久国产综合精品麻豆| 理论片午午伦夜理片久久| 亚洲午夜无码久久久久| 国产女人aaa级久久久级| 久久99久国产麻精品66| 欧美性大战久久久久久| 99久久无色码中文字幕| 色欲综合久久中文字幕网| 久久久精品无码专区不卡| 久久国产精品77777| 久久99热这里只有精品66| 久久99热国产这有精品| 久久亚洲私人国产精品| 香蕉久久久久久狠狠色| 久久艹国产| 国产欧美一区二区久久| 伊人久久大香线蕉av一区| 久久九色综合九色99伊人| 国产欧美久久久精品影院| 国产AV影片久久久久久| 99久久久国产精品免费无卡顿| 久久亚洲中文字幕精品一区| 久久综合久久综合久久综合| 欧美丰满熟妇BBB久久久| 久久久久亚洲AV无码专区网站| 91精品国产91久久综合| 久久久久久久综合日本| 91亚洲国产成人久久精品| 99麻豆久久久国产精品免费| 久久午夜无码鲁丝片秋霞 | 久久国产精品99久久久久久老狼| 久久精品成人国产午夜| 国产一级做a爰片久久毛片| 久久精品男人影院| 色综合久久精品中文字幕首页| 亚洲伊人久久精品影院| 亚洲熟妇无码另类久久久|