From 3e3dbfdd1b4aa1c5de89b5199f66108c5fc7ab3a Mon Sep 17 00:00:00 2001 From: William Casarin Date: Sat, 13 Jan 2018 22:00:26 -0800 Subject: [PATCH] hacking: document subdaemon debugging Signed-off-by: William Casarin --- doc/HACKING.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/HACKING.md b/doc/HACKING.md index e2f37e886..89e62ff9d 100644 --- a/doc/HACKING.md +++ b/doc/HACKING.md @@ -86,6 +86,18 @@ Here's a list of parts, with notes: * onchaind/ - daemon to hand a single channel which has had its funding transaction spent. +Debugging +--------- + +You can debug crashing subdaemons with the argument +`--dev-debugger=lightning_channeld`, where `channeld` is the subdaemon name. It +will print out a command such as: + + gdb -ex 'attach 22398' lightning_channeld -ex return + +Run this command to start debugging. You may need to type `return` one more time +to exit the infinite while loop, otherwise you can type `continue` to begin. + Testing -------