Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
software:gdb [2008/11/18 14:42]
cyril created
software:gdb [2013/09/19 16:40] (current)
Line 8: Line 8:
   * **# ''gdb <prog-file> <core-file>''** : inspect the core dump   * **# ''gdb <prog-file> <core-file>''** : inspect the core dump
   * **# ''gdb <prog-file> <pid>''** : attach to the running process   * **# ''gdb <prog-file> <pid>''** : attach to the running process
 +  * **# ''gdb --pid=<pid> --batch -ex gcore''** : dump the core of an alive process
 ==== Running ==== ==== Running ====
   * **''run <prog-args...>''** (short "r") : start the program   * **''run <prog-args...>''** (short "r") : start the program
Line 23: Line 23:
   * **''backtrace''** (short "bt") : show the stack   * **''backtrace''** (short "bt") : show the stack
   * **''frame <frame-number>''** (short "f") : move to the stack drame number   * **''frame <frame-number>''** (short "f") : move to the stack drame number
-  * **''list [source-file]:<line|function>''** (short "l") : show source code+  * **''list''**, **''list -''**, **''list [source-file]:<line|function>''** (short "l") : show source code
  
 ==== Threads ==== ==== Threads ====
Line 47: Line 47:
   * **''x <addr>''** : print the content of memory, can format with /<format> too   * **''x <addr>''** : print the content of memory, can format with /<format> too
   * **''set variable <var-name> = <value>''** : change variable value   * **''set variable <var-name> = <value>''** : change variable value
 +  * **''set $variable = <exp>''** : create an external variable
  
 ==== Automation ==== ==== Automation ====
  
   * **''source <file-name>''** : load a set of commands from a file   * **''source <file-name>''** : load a set of commands from a file
-  * You can define macros in ~/.gdbinit+  * You can define macros in ~/.gdbinit, eg to automatically set some breakpoints.
  
software/gdb.1227019343.txt.gz ยท Last modified: 2013/09/19 16:43 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0