GDB scheduler-locking 命令详解
GDB scheduler-locking 命令详解
GDB> show scheduler-locking //显示线程的scheduler-locking状态
GDB> set scheduler-locking on //调试加锁当前线程,停止所有其他线程
set scheduler-locking mode
Set the scheduler locking mode. It applies to normal execution, record mode, and replay mode. If it is off, then there is no locking and any thread may run at any time. If on, then only the current thread may run when the inferior is resumed. The step mode optimizes for single-stepping; it prevents other threads from preempting the current thread while you are stepping, so that the focus of debugging does not change unexpectedly. Other threads never get a chance to run when you step, and they are completely free to run when you use commands like ‘continue’, ‘until’, or ‘finish’. However, unless another thread hits a breakpoint during its timeslice, GDB does not change the current thread away from the thread that you are debugging. The replay mode behaves like off in record mode and like on in replay mode.
show scheduler-locking
Display the current scheduler locking mode.
By default, when you issue one of the execution commands such as continue, next or step, GDB allows only threads of the current inferior to run. For example, if GDB is attached to two inferiors, each with two threads, the continue command resumes only the two threads of the current inferior. This is useful, for example, when you debug a program that forks and you want to hold the parent stopped (so that, for instance, it doesn’t run to exit), while you debug the child. In other situations, you may not be interested in inspecting the current state of any of the processes GDB is attached to, and you may want to resume them all until some breakpoint is hit. In the latter case, you can instruct GDB to allow all threads of all the inferiors to run with the set schedule-multiple command.
set schedule-multiple
Set the mode for allowing threads of multiple processes to be resumed when an execution command is issued. When on, all threads of all processes are allowed to run. When off, only the threads of the current process are resumed. The default is off. The scheduler-locking mode takes precedence when set to on, or while you are stepping and set to step.
show schedule-multiple
Display the current mode for resuming the execution of threads of multiple processes.
GDB> set scheduler-locking off
GDB> show schedule
schedule-multiple scheduler-locking
GDB> show scheduler-locking
Mode for locking scheduler during execution is "off".
GDB> set scheduler-locking step
GDB> show scheduler-locking
Mode for locking scheduler during execution is "step".
GDB> set scheduler-locking on
GDB> show scheduler-locking
Mode for locking scheduler during execution is "on".
GDB scheduler-locking 命令详解的更多相关文章
- netstat命令详解
它主要的用法和详解! (netstat -na 命令),本文主要是说Linux下的netstat工具,然后详细说明一下各种网络连接状态. netstat -nat |awk ‘{print $}’|s ...
- Git初探--笔记整理和Git命令详解
几个重要的概念 首先先明确几个概念: WorkPlace : 工作区 Index: 暂存区 Repository: 本地仓库/版本库 Remote: 远程仓库 当在Remote(如Github)上面c ...
- linux yum命令详解
yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理,能够从指定的服务器自动下载RP ...
- Linux下ps命令详解 Linux下ps命令的详细使用方法
http://www.jb51.net/LINUXjishu/56578.html Linux下的ps命令比较常用 Linux下ps命令详解Linux上进程有5种状态:1. 运行(正在运行或在运行队列 ...
- Docker命令详解
Docker命令详解 最近学习Docker,将docker所有命令实验了一番,特整理如下: # docker --help Usage: docker [OPTIONS] COMMAND [arg ...
- linux awk命令详解
linux awk命令详解 简介 awk是一个强大的文本分析工具,相对于grep的查找,sed的编辑,awk在其对数据分析并生成报告时,显得尤为强大.简单来说awk就是把文件逐行的读入,以空格为默认分 ...
- android adb 命令详解
ADB (Android Debug Bridge) 是android SDK中的工具,需要先配置环境变量才能使用.起调试桥的作用,可以管理安卓设备.(也叫debug工具) ---------查看设 ...
- Git 常用命令详解
Git 是一个很强大的分布式版本管理工具,它不但适用于管理大型开源软件的源代码(如:linux kernel),管理私人的文档和源代码也有很多优势(如:wsi-lgame-pro) Git 的更多介绍 ...
- Top 命令详解
Top 命令详解 先感受一下top命令的执行结果吧!哈哈-- top - 17:32:34 up 3 days, 8:04, 5 users, load average: 0.09, 0.12, 0. ...
随机推荐
- javascript执行机制
文的目的就是要保证你彻底弄懂javascript的执行机制,如果读完本文还不懂,可以揍我. 不论你是javascript新手还是老鸟,不论是面试求职,还是日常开发工作,我们经常会遇到这样的情况:给定的 ...
- .Net Core 2.0 EntityFrameworkCore CodeFirst入门教程
最近难得有时间闲下来,研究了一下.net core 2.0,总的来说,目前除了一些第三方的库不支持外,基本上可以满足我们的项目需求了! 我们就以一个网站开发为例,搭建一个简单的三层架构,先熟悉一下.n ...
- Asp.net Core中SignalR Core预览版的一些新特性前瞻,附源码(消息订阅与发送二进制数据)
目录 SignalR系列目录(注意,是ASP.NET的目录.不是Core的) 前言 一晃一个月又过去了,上个月有个比较大的项目要验收上线.所以忙的脚不沾地.现在终于可以忙里偷闲,写一篇关于Signal ...
- webpack中实现按需加载
webpack中的require.ensure()可以实现按需加载资源包括js,css等,它会给里面require的文件单独打包,不和主文件打包在一起,webpack会自动配置名字,如0.js,1.j ...
- c专家编程摘录
C专家编程摘录 c操作符的优先级 有时一些c操作符有时并不会像你想象的那样工作. 下方表格将说明这个问题: 优先级问题 表达式 期望的情况 实际情况 . 优先级高于* *p.f (*p).f *(p. ...
- zzuli 1812: sort 排序
1812: sort Time Limit: 1 Sec Memory Limit: 128 MB Submit: 352 Solved: 216 SubmitStatusWeb Board De ...
- HDU-1242-Rescu
Rescue Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Sub ...
- [行业关键词] review code review
意思是 代码评审 或是 代码回顾 代码评审是指在软件开发过程中,通过对源代码进行系统性检查的过程.通常的目的是查找系统缺陷,保证软件总体质量和提高开发者自身水平. Code Review是轻量级 ...
- IIS网站本机可以访问但局域网其他机器无法访问 解决方法
在IIS部署网站的时候,发现只有本机可以访问,通过localhost和IP地址都可以,但是当局域网其他机器访问我的网站的时候,无响应. 我的是WIN10的系统 解决方法: 网站所对应的端口必须对外 ...
- Android崩溃提示 “EGL_BAD_CONFIG"
这两天将之前提到的一个室内定位程序的ArcGIS的SDK从10.2.8迁移到100.1.0. 期间反复出现奇怪的问题,最终定位到这个问题: java.lang.RuntimeException: cr ...