diff --git a/cmake/Hunter/config.cmake b/cmake/Hunter/config.cmake index 4aa9e79329..c3d401cc1f 100644 --- a/cmake/Hunter/config.cmake +++ b/cmake/Hunter/config.cmake @@ -111,7 +111,8 @@ hunter_config( hunter_config( libp2p - VERSION 0.1.36 + URL https://github.com/libp2p/cpp-libp2p/archive/6112c4b1f867bc0c4723f4c20b2b1bac04417fb3.zip + SHA1 b2a4d9eaa7382afc195dd340530e85bdd84c7aa4 KEEP_PACKAGE_SOURCES ) diff --git a/cmake/Hunter/hunter-gate-url.cmake b/cmake/Hunter/hunter-gate-url.cmake index cce703ef86..c249f42692 100644 --- a/cmake/Hunter/hunter-gate-url.cmake +++ b/cmake/Hunter/hunter-gate-url.cmake @@ -1,5 +1,5 @@ HunterGate( - URL https://github.com/qdrvm/hunter/archive/refs/tags/v0.25.3-qdrvm37.tar.gz - SHA1 c02ff270e65c4f1b347c85b376eb344158a51ffa + URL https://github.com/qdrvm/hunter/archive/refs/tags/v0.25.3-qdrvm38.tar.gz + SHA1 f0dd00aa6491d367c5251562100e532c839110e9 LOCAL ) diff --git a/scripts/cmds.gdb b/scripts/cmds.gdb new file mode 100644 index 0000000000..82927fda7e --- /dev/null +++ b/scripts/cmds.gdb @@ -0,0 +1,67 @@ +set print finish off +set logging enabled on + +define myfinish + finish +end + +define hookpost-myfinish + printf "posthook start\n" + bt + if this != 0 + printf "PTR = %V\n", _M_ptr + if _M_ptr != 0 + printf "REFCOUNT = %V\n", _M_refcount._M_pi->_M_use_count + end + else + printf "ZERO THIS\n" + end + printf "\n" + continue +end + +define setup_break + rbreak std::__shared_ptr<$arg1, .*>::$arg0 + commands + silent + myfinish + continue + end +end + +define setup_destructor_break + rbreak std::__shared_ptr<$arg1, .*>::$arg0 + commands + silent + printf "destructor start\n" + bt + printf "\n" + continue + end +end + +define setup_break_for_connections + set $i = 1 + while $i < $argc + p $i + eval "setup_break $arg0 $arg%d", $i + set $i = $i + 1 + end +end + +define setup_break_for_connection_destructors + set $i = 1 + while $i < $argc + p $i + eval "setup_destructor_break $arg0 $arg%d", $i + set $i = $i + 1 + end +end + +setup_break_for_connections __shared_ptr libp2p::connection::YamuxedConnection libp2p::connection::CapableConnection libp2p::connection::SecureConnection libp2p::connection::RawConnection libp2p::connection::LayerConnection libp2p::basic::ReadWriteCloser libp2p::basic::ReadWriter + +setup_break_for_connection_destructors ~__shared_ptr libp2p::connection::YamuxedConnection libp2p::connection::CapableConnection libp2p::connection::SecureConnection libp2p::connection::RawConnection libp2p::connection::LayerConnection libp2p::basic::ReadWriteCloser libp2p::basic::ReadWriter + +setup_break_for_connections operator= libp2p::connection::YamuxedConnection libp2p::connection::CapableConnection libp2p::connection::SecureConnection libp2p::connection::RawConnection libp2p::connection::LayerConnection libp2p::basic::ReadWriteCloser libp2p::basic::ReadWriter + +info breakpoints