Skip to content

Instantly share code, notes, and snippets.

@ngn999
Created October 25, 2012 16:33
Show Gist options
  • Save ngn999/3953876 to your computer and use it in GitHub Desktop.
Save ngn999/3953876 to your computer and use it in GitHub Desktop.
一个gdb脚本
set breakpoint pending on
dir /tmp/ksearch_trunk/src/searcher/
file /home/admin/ksearch/bin/sap_server
# core-file /home/admin/ksearch/core.4155
set args  -c /home/admin/ksearch/conf/sap_server_app.cfg -l /home/admin/ksearch/conf/sap_server_log.cfg -k start
# b result_format.cpp:341
b ResultFormat::formatPB(SearchResult const&, K3Shop&) if search_result.query_info->uid == 67740708
b ResultFormat::docFormatPB(QueryInfo*, Document const*, std::vector<FieldInfo*, std::allocator<FieldInfo*> > const&, K3Document*) if query_info->uid == 67740708
ignore 2 15

commands 2
  b TextQuery::highLight(char const*, int, char*, int)
end

r

还有这种用法:

set env LD_LIBRARY_PATH=/home/tangyi/program/cc/ups2/contribute/depend/usr/local/lib64

设置LD_LIBRARY_PATH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment