Debugging
From awesome
Making awesome with special cflags give more complete backtrace: make CFLAGS+='-O0 -fno-inline -ggdb3'.
[edit] Debugging with gdb
If you get a crash inside awesome (segmentation fault, signal 11), please give a backtrace. You can achieve that using gdb.
- Launch awesome
- Attach gdb (using tty1 is better) with gdb -p `pidof awesome`
- Type continue at gdb prompt
- Wait for the crash
- Type bt to get the backtrace, bt full to have more information
- You can move between calls by using frame # where # is the frame number, and then you can print variable using print
If awesome crashes at startup then you cannot attach gdb. Use this alternative:
- Login on tty1
- Start with X :1
- Set your DISPLAY environment variable to this X server: export DISPLAY=:1
- Run awesome inside with gdb awesome
- Launch awesome by running run
- When it has crashed, type bt to get the backtrace, bt full to have more information
- You can move between calls by using frame # where # is the frame number, and then you can print variable using print
[edit] Debugging with a core dump
- Before running X, in the tty, type: ulimit -c unlimited
- startx, and reproduce the segfault of awesome. Ok. Segfaulted ? Good :)
- You'll have normally a file named 'core' in your home, or the directory where you have started X
- gdb awesome ./core and you get the "gdb prompt"
- Type bt to get the backtrace, bt full to have more information
- You can move between calls by using frame # where # is the frame number, and then you can print variable using print

