gdb如何管理线程特定的断点 [英] How does gdb manage thread-specific breakpoints

查看:225
本文介绍了gdb如何管理线程特定的断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当gdb在一个Target进程中放置一个断点时,它将用int3取代一条指令。我想知道它是如何工作的,当这个断点应该活跃于特定的线程...

解决方案

这个答案

对于线程特定的断点,调试器插入一个进程然后只要立即恢复任何碰到断点的线程,除非线程是你想要停止的特定线程。


When gdb puts a breakpoint in a Target process, it replaces one instruction by int3. I am wondering how it works when this breakpoint should ne active for a specific thread...

解决方案

Copying from this answer:

For a thread-specific breakpoint, the debugger inserts a process-wide breakpoint, then simply immediately resumes any thread which hits the breakpoint, unless the thread is the specific one that you wanted to stop.

这篇关于gdb如何管理线程特定的断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆