Differences
This shows you the differences between two versions of the page.
Both sides previous revision
Previous revision
Next revision
|
Previous revision
|
software:gdb [2009/10/09 15:57] cyril |
software:gdb [2013/09/19 16:40] (current) |
* **# ''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 |
* **''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 ==== |
| |
* **''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. |
| |