我想在我的以下自动化.gdbinit
:
break boost::uuids::detail::sha1::process_bytes
# When execution stops at the above breakpoint,
# I want to display the contents of `rcx` as a string:
x/s $rcx
c # do not stop here
我如何自动执行此操作?
更新:这是一个更好的.gdbinit
例子:
# Our custom-built libcurl, with debugging symbols enabled:
set environment LD_PRELOAD=./curl/curl-7.34.0/lib/.libs/libcurl.so
# File that connects to the evil server:
file ./evil
# Make sure we get notified when it connects!
break curl_easy_setopt
commands $bpnum
clear curl_easy_setopt # to avoid recursion
call curl_easy_setopt(curl, CURLOPT_VERBOSE)
continue
end
这与邪恶的二进制文件挂钩,当它初始化其卷曲句柄时,我们将其设置为详细信息,以便我们获得大量关于正在发生的事情的输出。
谢谢你的回答。