tech:notes_gdb_debug
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| tech:notes_gdb_debug [2026/06/07 19:12] – créée - modification externe 127.0.0.1 | tech:notes_gdb_debug [2026/11/03 17:27] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| < | < | ||
| - | {{tag> | + | {{tag> |
| # Notes gdb debug | # Notes gdb debug | ||
| Ligne 11: | Ligne 11: | ||
| * [[Process audit quand strace n'est pas là]] | * [[Process audit quand strace n'est pas là]] | ||
| * [How to cache data using GDB's Python API](https:// | * [How to cache data using GDB's Python API](https:// | ||
| + | |||
| + | |||
| + | ## Exemple d' | ||
| + | |||
| + | Voir aussi : | ||
| + | * SIGSEGV | ||
| ~~~ | ~~~ | ||
| Ligne 22: | Ligne 28: | ||
| (gdb) bt | (gdb) bt | ||
| ~~~ | ~~~ | ||
| + | |||
| + | ~~~ | ||
| + | gdb --args scsynth | ||
| + | at gdb prompt: | ||
| + | run | ||
| + | |||
| + | gdb -p <process id> | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## Génération d'un coredump | ||
| + | |||
| + | ~~~ | ||
| + | # gdb -p <pid> | ||
| + | ... | ||
| + | generate-core-dump /dev/null | ||
| + | ... | ||
| + | quit | ||
| + | ~~~ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | Source : https:// | ||
| + | |||
| + | |||
| + | ~~~ | ||
| + | $ ./crash -p param1 -o param2 | ||
| + | Segmentation fault (core dumped) | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | gdb --args ./crash -p param1 -o param2 | ||
| + | ~~~ | ||
| + | |||
| + | Man pages will be helpful to see other GDB options. | ||
| + | |||
| + | Most useful commands are: | ||
| + | * **bt (backtrace)** | ||
| + | * **info locals** (show values of local variables) | ||
| + | * **info registers** (show values of CPU registers) | ||
| + | * **frame X** (change to stack frame X) | ||
| + | * **up** and **down** (navigate in the stack frame (call chain)) | ||
| + | |||
tech/notes_gdb_debug.1780852327.txt.gz · Dernière modification : de 127.0.0.1
