|
|
1번째 줄: |
1번째 줄: |
− | * [http://www.unknownroad.com/rtfm/gdbtut/gdbtoc.html gdb tutorial with FAQ]
| + | y4A4wc http://www.YPADZx4viosd5w2eNz85rtSpDsHQauOn.com |
− | * [http://www.cs.cmu.edu/~gilpin/tutorial/ debugging under unix] (Richard M. Stallman and Roland H. Pesch)
| |
− | * '''[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
| |