<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Allow LLDB to distinguish between user threads and system threads"
href="https://llvm.org/bugs/show_bug.cgi?id=24681">24681</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Allow LLDB to distinguish between user threads and system threads
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>lldb-dev@lists.llvm.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>zturner@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Various tests are written to test multithreaded functionality of LLDB by
creating a number of threads, and then verifying that the expected and actual
numbers of threads match.
This doesn't work in the presence of threads which are created by the operating
system, and on Windows this can happen even in a trivial single-threaded hello
world application.
To fix this, we should add to LLDB the notion of a user-created thread versus a
system thread, and expose this through the SB API in a way that the tests can
query only the user threads. On Windows this can be done by checking for the
presence of ntdll!TppWorkerThread in the call stack, and on Mac this can be
done by checking for start_wqthread or _dispatch_mgr_thread as the last frame
of the callstack. Similar methods probably can be found for other platforms.
For now, the following tests are XFAIL'ed on Windows until this is resolved:
TestExitDuringStep.ExitDuringStepTestCase.test_step_in_with_dwarf
TestExitDuringStep.ExitDuringStepTestCase.test_step_over_with_dwarf
TestExitDuringStep.ExitDuringStepTestCase.test_thread_state_is_stopped_with_dwarf
TestExitDuringStep.ExitDuringStepTestCase.test_with_dwarf
TestThreadExit.ThreadExitTestCase.test_with_dwarf
TestThreadStepOut.ThreadStepOutTestCase.test_python_with_dwarf</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>