tech:notes_gdb_debug
Table des matières
Notes gdb debug
Voir :
Voir aussi
Exemple d'analyse d'un Segmentation fault
Voir aussi :
- SIGSEGV
$ python3 -c "import pymssql ; conn = pymssql.connect(server='127.0.0.1', port='1433', user=r'ACME\user1', password=r'P@ssw0rd!', database='dbname')" Segmentation fault (core dumped)
$ gdb --args python3 -c "import pymssql ; conn = pymssql.connect(server='127.0.0.1', port='1433', user=r'ACME\user1', password=r'P@ssw0rd!', database='dbname')" (gdb) r (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
$ ./crash -p param1 -o param2 Segmentation fault (core dumped)
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.txt · Dernière modification : de Jean-Baptiste
