zoukankan      html  css  js  c++  java
  • 3-non-stop模式调试

    本质:

    GDB 默认采用的是 all-stop 模式,即只要有一个线程暂停执行,所有线程都随即暂停;

    non-stop 模式,该模式下调试多线程程序,当某一线程暂停运行时,其它线程仍可以继续执行

    PS :

    ①只有 7.0 版本以上的 GDB 调试器,才支持 non-stop 模式。

    ②在all-stop模式下,continue, next, step等命令作用于所有线程; non-stop模式下这些操作只作用于当前线程。

    ③设置non-stop 模式

    set non-stop on/off            // on 表示启用 non-stop 模式;off 表示禁用 non-stop 模式
    show non-stop                 // 查看non-stop状态

    ④在all-stop模式下,某一线程暂停执行,gdb会自动把当前线程切换至暂停的线程; non-stop模式下,线程暂停执行后,gdb不会切换线程。

    // gdb在启动时会展示版本信息,也可使用 show version 展示版本信息
    (gdb) show version
    GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.3) 7.7.1
    Copyright (C) 2014 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86\_64-linux-gnu".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
    For help, type "help".
    Type "apropos word" to search for commands related to "word".

    个人学习笔记,网络内容搬运工,喜欢的点个赞,如有侵权请联系删除。
  • 相关阅读:
    Linux下搭建PHP环境的参考文章小记
    jQuery遇到问题的小记
    小程序 login
    小程序编辑器vscode
    弹性布局详解——5个div让你学会弹性布局
    vue在页面嵌入别的页面或者是视频2
    VUE设置浏览器icon图标
    遮罩层出现后不能滚动 添加事件@touchmove.prevent
    vue 在script里写页面跳转
    axios post、get 请求参数和headers配置
  • 原文地址:https://www.cnblogs.com/qing2105/p/14287395.html
Copyright © 2011-2022 走看看