Skip to content

Commit

Permalink
Merge pull request #164 from pi-hole/fix/README2
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
AzureMarker authored Nov 26, 2017
2 parents f82eac0 + 797acd5 commit c63cd5e
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,16 @@ Once you are used to it, you can skip most of the steps and debugging is actuall
* `sudo chown pi:pi /var/log/pihole-FTL.log /run/pihole-FTL.pid /run/pihole-FTL.port`
* `sudo chmod 0644 /var/log/pihole-FTL.log /run/pihole-FTL.pid /run/pihole-FTL.port`
6. Start `pihole-FTL` in the debugger: `gdb pihole-FTL`
7. Type `run debug` to start `FTL` (you should see some lines of text and `FTL` should start successfully).
8. You can now close the terminal (Ctrl+A and then D to detach) and come back later using (`screen -r`) when it has crashed
9. If it has crashed, copy&paste the terminal output, and
10. type also `backtrace` and post the output in a (new) issue
11. We might ask for additional information in order to isolate your particular issue
7. Type `handle SIGHUP nostop SIGPIPE nostop` to instruct the debugger to don't stop on expected signals
8. Type `run debug` to start `FTL` (you should see some lines of text and `FTL` should start successfully)
9. You can now close the terminal (Ctrl+A and then D to detach) and come back later using (`screen -r`) when it has crashed
10. If it has crashed, copy&paste the terminal output, and
11. type also `backtrace` and post the output in a (new) issue
12. We might ask for additional information in order to isolate your particular issue

#### Simplified debugging instructions (when `FTL` is running)

`FTL` has been designed such that a debugger can be attached to an already running process to ease debugging. Use `sudo gdb -p $(pidof pihole-FTL)` to attach to an already running `pihole-FTL` process. You can leave off `sudo` if you are running `pihole-FTL` with the current user. Once loading of the symbols has finished (the `(gdb)` input prompt is shown), run `continue` to continue operation of `pihole-FTL` inside the debugger. All debugger features are now available.
`FTL` has been designed such that a debugger can be attached to an already running process to ease debugging. Use `sudo gdb -p $(pidof pihole-FTL)` to attach to an already running `pihole-FTL` process. You can leave off `sudo` if you are running `pihole-FTL` with the current user. Once loading of the symbols has finished (the `(gdb)` input prompt is shown), run `handle SIGHUP nostop SIGPIPE nostop` followed by `continue` to continue operation of `pihole-FTL` inside the debugger. All debugger features are now available.

If `pihole-FTL` has crashed, copy&paste the terminal output into a (new) issue. Also type `backtrace` and include its output. We might ask for additional information in order to isolate your particular issue.

Expand All @@ -80,6 +81,10 @@ When you want to detach the debugger from `FTL` without terminating the process,
- `debug` - Don't go into daemon mode (stay in foreground) + more verbose logging
- `test` - Start `FTL` and process everything, but shut down immediately afterwards
- `version` - Don't start `FTL`, show only version
- `tag` - Don't start `FTL`, show only git tag
- `branch` - Don't start `FTL`, show only git branch `FTL` was compiled from
- `no-daemon` or `-f` - Don't go into background (daemon mode)
- `help` or `-h` - Don't start `FTL`, show help

Command line arguments can be arbitrarily combined, e.g. `pihole-FTL debug test`

Expand Down

0 comments on commit c63cd5e

Please sign in to comment.