Star
81
Fork
27
代码
介绍
代码
Issues
9
Pull Requests
9
流水线
Actions
讨论
Wiki
项目成员
44
分析
项目设置
Star
81
Fork
27
master
msdebug
/
lldb
/
test
/
API
/
macosx
/
profile_vrs_detach
下载当前目录
G
GitHub
[lldb][test] Modernize asserts (
#82503
)
9c246882
创建于
2024年2月22日
历史提交
文件
最后提交记录
最后更新时间
Makefile
Fix a race between lldb's packet timeout and the profile thread's usleep. The debugserver profile thread used to suspend itself between samples with a usleep. When you detach or kill, MachProcess::Clear would delay replying to the incoming packet until pthread_join of the profile thread returned. If you are unlucky or the suspend delay is long, it could take longer than the packet timeout for pthread_join to return. Then you would get an error about detach not succeeding from lldb - even though in fact the detach was successful... I replaced the usleep with PThreadEvents entity. Then we just call a timed WaitForEventBits, and when debugserver wants to stop the profile thread, it can set the event bit, and the sleep will exit immediately. Differential Revision:
https://reviews.llvm.org/D75004
6 年前
TestDetachVrsProfile.py
[lldb][test] Modernize asserts (
#82503
) This uses [teyit](
https://pypi.org/project/teyit/)
to modernize asserts, as recommended by the [unittest release notes](
https://docs.python.org/3.12/whatsnew/3.12.html#id3).
For example,
assertTrue(a == b)
is replaced with
assertEqual(a, b)
. This produces better error messages, e.g.
error: unexpectedly found 1 and 2 to be different
instead of
error: False
.
2 年前
main.c
[lldb] Include unistd.h for sleep in profile_vrs_detach
4 年前