mirror of
https://github.com/vale981/bspwm
synced 2025-03-06 02:01:42 -05:00
Update debugging instructions
This commit is contained in:
parent
a371276eba
commit
5f61cbb8f6
1 changed files with 13 additions and 11 deletions
|
@ -15,26 +15,28 @@ If you use `vim`:
|
|||
|
||||
## Debugging
|
||||
|
||||
To produce debug executables, issue:
|
||||
To install debug executables:
|
||||
```
|
||||
make debug
|
||||
make clean debug && make install
|
||||
```
|
||||
|
||||
If you use `systemd`, X might be started on the same virtual terminal as `bspwm` and you won't see its output, hence use something like `startx -- vt08` to start X (you can switch to the virtual terminal number *<n>* with *Ctrl-Alt-F<n>*).
|
||||
|
||||
The debug messages are generated by the `PRINTF` and `PUTS` macros: feel free to use them.
|
||||
|
||||
If you want to use [`gdb`][5], switch to a free virtual terminal and issue:
|
||||
|
||||
You can attach to a running *bspwm* process with:
|
||||
```
|
||||
gdb bspwm $(pgrep -x bspwm)
|
||||
continue
|
||||
c
|
||||
```
|
||||
|
||||
Then, go back to the virtual terminal holding X. If `bspwm` crashes, go back to the virtual terminal where you launched `gbd`: you might find clues there.
|
||||
Or if you just want to generate a backtrace (saved in `gdb.txt`):
|
||||
`
|
||||
ulimit -c unlimited
|
||||
startx
|
||||
sudo systemd-coredumpctl gdb bspwm
|
||||
set logging on
|
||||
bt full
|
||||
q
|
||||
`
|
||||
|
||||
[1]: http://cm.bell-labs.com/cm/cs/cbook/
|
||||
[2]: http://www.x.org/releases/X11R7.5/doc/libxcb/tutorial/
|
||||
[3]: http://git-scm.com/documentation
|
||||
[4]: http://www.kernel.org/doc/Documentation/CodingStyle
|
||||
[5]: http://sourceware.org/gdb/current/onlinedocs/gdb/
|
||||
|
|
Loading…
Add table
Reference in a new issue