Outils pour utilisateurs

Outils du site


tech:notes_gdb_debug

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
tech:notes_gdb_debug [2026/11/03 16:47] – Jean-Baptistetech:notes_gdb_debug [2026/11/03 17:27] (Version actuelle) – Jean-Baptiste
Ligne 47: Ligne 47:
 quit quit
 ~~~ ~~~
 +
 +----
 +
 +Source : https://stackoverflow.com/questions/8305866/how-do-i-analyze-a-programs-core-dump-file-with-gdb-when-it-has-command-line-pa
 +
 +
 +~~~
 +$ ./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.1793720836.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki