zoukankan      html  css  js  c++  java
  • [TODO 不好用] gdb使用调用栈作为断点条件的方法

    (gdb) bt
    #0  ngx_ssl_engine_qat_heuristic_poll (log=0x55a4ee0d3670) at modules/nginx_qat_module/ngx_ssl_engine_qat_module.c:694
    #1  0x000055a4eba43791 in ngx_ssl_async_process_fds (c=0x7f2e19705db8) at src/event/ngx_event_openssl.c:1675
    #2  0x000055a4eba47817 in ngx_ssl_shutdown (c=0x7f2e19705db8) at src/event/ngx_event_openssl.c:3169
    #3  0x000055a4eba6b267 in ngx_http_close_connection (c=0x7f2e19705db8) at src/http/ngx_http_request.c:4096
    #4  0x000055a4eba6a131 in ngx_http_keepalive_handler (rev=0x7f2e13053098) at src/http/ngx_http_request.c:3578
    #5  0x000055a4eba28d05 in ngx_event_expire_timers () at src/event/ngx_event_timer.c:94
    #6  0x000055a4eba260c5 in ngx_process_events_and_timers (cycle=0x55a4ed9fc610) at src/event/ngx_event.c:266
    #7  0x000055a4eba395f0 in ngx_worker_process_cycle (cycle=0x55a4ed9fc610, data=0x0) at src/os/unix/ngx_process_cycle.c:769
    #8  0x000055a4eba353bb in ngx_spawn_process (cycle=0x55a4ed9fc610, proc=0x55a4eba394aa <ngx_worker_process_cycle>, data=0x0, name=0x55a4ebb84103 "worker process", respawn=1) at src/os/unix/ngx_process.c:199
    #9  0x000055a4eba38fa5 in ngx_reap_children (cycle=0x55a4ed9fc610) at src/os/unix/ngx_process_cycle.c:633
    #10 0x000055a4eba37873 in ngx_master_process_cycle (cycle=0x55a4ed9fc610) at src/os/unix/ngx_process_cycle.c:177
    #11 0x000055a4eb9ec700 in main (argc=3, argv=0x7ffd31c76538) at src/core/nginx.c:389

    这样断:

    (gdb) 
    719             else
    720                 threshold = qat_engine_heuristic_poll_sym_threshold;
    721
    722             if (*num_asym_requests_in_flight + *num_kdf_requests_in_flight
    723                 + *num_cipher_requests_in_flight + *num_asym_mb_items_in_queue
    724                 + *num_kdf_mb_items_in_queue + *num_sym_mb_items_in_queue
    725                 >= threshold) {
    726                 qat_engine_poll(log);
    727                 num_heuristic_poll ++;
    728             }
    (gdb) b 722 if $_caller_is("ngx_ssl_async_process_fds")
    Breakpoint 2 at 0x7f2e3976477b: file modules/nginx_qat_module/ngx_ssl_engine_qat_module.c, line 722.
    (gdb) 

    参考: https://stackoverflow.com/questions/5336403/is-there-any-way-to-set-a-breakpoint-in-gdb-that-is-conditional-on-the-call-stac

  • 相关阅读:
    C++ 遍历文件
    C++ struct
    C++动态数组
    C++ 常量指针和矩阵
    imfilter与fspecial
    空间域图像增强:卷积和空间域滤波
    数字图像处理-图像的几何变换(一)
    多线程中的生产者消费者问题
    使用Netty进行Android与Server端通信实现文字发送接收与图片上传
    C# FileSystemWatcher 监视磁盘文件变更
  • 原文地址:https://www.cnblogs.com/hugetong/p/14913599.html
Copyright © 2011-2022 走看看