installation_guide:debug:start

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
installation_guide:debug:start [2024/02/19 16:09] – [Monitor the file descriptors] borjainstallation_guide:debug:start [2025/04/10 21:17] (current) – [Attach the GDB (debugger) to the Asterisk] borja
Line 346: Line 346:
 </code> </code>
  
-==== Coredump generators ====+==== Generate a CallStacks or Coredumps ====
  
 Generate the threads stacks or a coredump file for the process (voximald) : Generate the threads stacks or a coredump file for the process (voximald) :
Line 353: Line 353:
 gdb -ex "thread apply all bt" --batch /usr/sbin/voximald $(pidof voximald) > /var/log/voximal/backtrace-voximald$(date +%s).txt gdb -ex "thread apply all bt" --batch /usr/sbin/voximald $(pidof voximald) > /var/log/voximal/backtrace-voximald$(date +%s).txt
 gdb /usr/sbin/voximald $(pidof voximald) -ex "gcore /tmp/toto.core" --batch gdb /usr/sbin/voximald $(pidof voximald) -ex "gcore /tmp/toto.core" --batch
 +</code>
 +
 +==== Execute the Asterisk with GDB (debugger) ====
 +
 +Launch the Asterisk process with the debugger (gdb) :
 +
 +<code>
 +gdb -ex=r --args asterisk -cvvvvvv -U asterisk -G asterisk
 +</code>
 +
 +==== Attach the GDB (debugger) to the Asterisk ====
 +
 +Launch the debugger process and attach to the running Asterisk :
 +
 +<code>
 +gdb /usr/sbin/asterisk $(pidof asterisk) -iex "set pagination off" -ex cont
 </code> </code>
  
  • installation_guide/debug/start.1708358999.txt.gz
  • Last modified: 2024/02/19 16:09
  • by borja