• Welcome to forex.pm forex forum binary options trade. Please login or sign up.
 

Debugging bitcoind

Started by Bitcoin, Feb 03, 2022, 04:07 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bitcoin

Debugging bitcoind

How do you attach a gdb to a bitcoind daemon. I wish to step through the functions. Here is what i have tried.



gdb --args bitcoind -regtest -daemon


This however exists when the daemon starts. So i tried attaching via the pid after the fork.



gdb -p 841
(gdb) file /usr/local/bin/bitcoind
Reading symbols from /usr/local/bin/bitcoind...done.
(gdb) b sendtoaddress
Breakpoint 1 at 0x4b4d34: file wallet/rpcwallet.cpp, line 379.   
r
starting program...   


This however does not work , when i invoke a transaction using the bitcoin-cli client. Is there anything i am missing. I have used --enable debug on configure.



Thanks.


Source: Debugging bitcoind