From 7e1154e1ecc4c5da8ab5c58c0ee673e5c245618d Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 12 Sep 2017 14:26:59 +0930 Subject: [PATCH] hsmd: use debug for backtraces. Signed-off-by: Rusty Russell --- hsmd/Makefile | 1 + hsmd/hsm.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hsmd/Makefile b/hsmd/Makefile index d74b0574b..4f3fd7d22 100644 --- a/hsmd/Makefile +++ b/hsmd/Makefile @@ -27,6 +27,7 @@ LIGHTNINGD_HSM_OBJS := $(LIGHTNINGD_HSM_SRC:.c=.o) HSMD_COMMON_OBJS := \ common/bip32.o \ common/daemon_conn.o \ + common/debug.o \ common/funding_tx.o \ common/key_derive.o \ common/msg_queue.o \ diff --git a/hsmd/hsm.c b/hsmd/hsm.c index 63c8eea84..f0503c2be 100644 --- a/hsmd/hsm.c +++ b/hsmd/hsm.c @@ -3,7 +3,6 @@ #include #include #include -#include #include #include #include @@ -15,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -640,6 +640,12 @@ static struct io_plan *control_received_req(struct io_conn *conn, } #ifndef TESTING +/* FIXME: This is used by debug.c, but doesn't apply to us. */ +extern void dev_disconnect_init(int fd); +void dev_disconnect_init(int fd) +{ +} + static void master_gone(struct io_conn *unused, struct daemon_conn *dc) { /* Can't tell master, it's gone. */ @@ -655,7 +661,8 @@ int main(int argc, char *argv[]) exit(0); } - breakpoint(); + subdaemon_debug(argc, argv); + secp256k1_ctx = secp256k1_context_create(SECP256K1_CONTEXT_VERIFY | SECP256K1_CONTEXT_SIGN);