[llvm-bugs] [Bug 24681] New: Allow LLDB to distinguish between user threads and system threads

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 2 13:27:19 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24681

            Bug ID: 24681
           Summary: Allow LLDB to distinguish between user threads and
                    system threads
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: zturner at google.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150902/79f2a2c0/attachment.html>


More information about the llvm-bugs mailing list