Star81
27
代码介绍
代码
Issues9
Pull Requests9
流水线
Actions
讨论
Wiki
项目成员44
分析
项目设置
Star81
27
  1. msdebug
  2. /
  3. lldb
  4. /
  5. test
  6. /
  7. API
  8. /
  9. macosx
  10. /
  11. profile_vrs_detach
GGitHub[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/D750046 年前
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_detach4 年前