forex.pm forex forum binary options trade

 Сryptocurrency exchanges => Binance - Сryptocurrency exchanges => Topic started by: Bitcoin on Feb 03, 2022, 04:07 am

Title: Debugging bitcoind
Post by: Bitcoin on Feb 03, 2022, 04:07 am
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 (https://bitcoin.stackexchange.com/questions/51472/debugging-bitcoind)