"Gdb"의 두 판 사이의 차이
ph
잔글 |
|||
| (사용자 3명의 중간 판 11개는 보이지 않습니다) | |||
| 1번째 줄: | 1번째 줄: | ||
* [http://www.unknownroad.com/rtfm/gdbtut/gdbtoc.html gdb tutorial with FAQ] | * [http://www.unknownroad.com/rtfm/gdbtut/gdbtoc.html gdb tutorial with FAQ] | ||
| − | * [http://www.cs.cmu.edu/~gilpin/tutorial/ | + | * [http://www.cs.cmu.edu/~gilpin/tutorial/ debugging under unix] (Richard M. Stallman and Roland H. Pesch) |
| − | * '''[http:// | + | * '''[http://developer.apple.com/library/mac/#documentation/DeveloperTools/gdb/gdb/gdb_toc.html debugging with gdb]''' 9th edition |
| + | * summary of commands (from [http://condor.depaul.edu/glancast/373class/docs/gdb.html here]) | ||
| + | {| class="wikitable" | ||
| + | |- | ||
| + | ! Gdb Command !! Description | ||
| + | |- | ||
| + | | set listsize <em>n</em> | ||
| + | | Set the number of lines listed by the list command to <em>n</em> <span class="code2">[set listsize]</span> | ||
| + | |- | ||
| + | | b <em>function</em> | ||
| + | | Set a breakpoint at the beginning of <em>function</em> <span class="code2">[break]</span> | ||
| + | |- | ||
| + | | b <em>line number</em> | ||
| + | | Set a breakpoint at <em>line number</em> of the current file. <span class="code2">[break]</span> | ||
| + | |- | ||
| + | | info b | ||
| + | | List all breakpoints <span class="code2">[info]</span> | ||
| + | |- | ||
| + | | delete <em>n</em> | ||
| + | | Delete breakpoint number <em>n</em> <span class="code2">[delete]</span> | ||
| + | |- | ||
| + | | r <em>args</em> | ||
| + | | Start the program being debugged, possibly with command line arguments <em>args</em>. <span class="code2">[run]</span> | ||
| + | |- | ||
| + | | s <em>count</em> | ||
| + | | Single step the next <em>count</em> statments (default is 1). Step <b><em>into</em></b> functions. <span class="code2">[step]</span> | ||
| + | |- | ||
| + | | n <em>count</em> | ||
| + | | Single step the next <em>count</em> statments (default is 1). Step <b><em>over</em></b> functions. <span class="code2">[next]</span> | ||
| + | |- | ||
| + | | finish | ||
| + | | Execute the rest of the current function. Step <b><em>out of</em></b> the current function. <span class="code2">[finish]</span> | ||
| + | |- | ||
| + | | c | ||
| + | | Continue execution up to the next breakpoint or until termination if no breakpoints are encountered. <span class="code2">[continue]</span> | ||
| + | |- | ||
| + | | p <em>expression</em> | ||
| + | | print the value of <em>expression</em> <span class="code2">[print]</span> | ||
| + | |- | ||
| + | | l <em>optional_line</em> | ||
| + | | List next <em>listsize</em> lines. If <em>optional_line</em> is given, list the lines centered around <em>optional_line</em>. <span class="code2">[list]</span> | ||
| + | |- | ||
| + | | where | ||
| + | | Display the current line and function and the stack of calls that got you there. <span class="code2">[where]</span> | ||
| + | |- | ||
| + | | h <em>optional_topic</em> | ||
| + | | help or help on <em>optional_topic</em> <span class="code2">[help]</span> | ||
| + | |- | ||
| + | | q | ||
| + | | quit gdb <span class="code2">[quit]</span> | ||
| + | |} | ||
| + | *'''[http://www.cinsk.org/wiki/Debugging_with_GDB:_User_Defined_Commands debugging with gdb]''' Good*3 | ||
2017년 6월 15일 (목) 15:54 기준 최신판
- gdb tutorial with FAQ
- debugging under unix (Richard M. Stallman and Roland H. Pesch)
- debugging with gdb 9th edition
- summary of commands (from here)
| Gdb Command | Description |
|---|---|
| set listsize n | Set the number of lines listed by the list command to n [set listsize] |
| b function | Set a breakpoint at the beginning of function [break] |
| b line number | Set a breakpoint at line number of the current file. [break] |
| info b | List all breakpoints [info] |
| delete n | Delete breakpoint number n [delete] |
| r args | Start the program being debugged, possibly with command line arguments args. [run] |
| s count | Single step the next count statments (default is 1). Step into functions. [step] |
| n count | Single step the next count statments (default is 1). Step over functions. [next] |
| finish | Execute the rest of the current function. Step out of the current function. [finish] |
| c | Continue execution up to the next breakpoint or until termination if no breakpoints are encountered. [continue] |
| p expression | print the value of expression [print] |
| l optional_line | List next listsize lines. If optional_line is given, list the lines centered around optional_line. [list] |
| where | Display the current line and function and the stack of calls that got you there. [where] |
| h optional_topic | help or help on optional_topic [help] |
| q | quit gdb [quit] |
- debugging with gdb Good*3