1 //===-- FreeBSDThread.cpp ---------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // Other libraries and framework includes
13 #include "lldb/Core/State.h"
16 #include "FreeBSDThread.h"
17 #include "ProcessFreeBSD.h"
18 #include "ProcessPOSIXLog.h"
21 using namespace lldb_private;
23 //------------------------------------------------------------------------------
24 // Constructors and destructors.
26 FreeBSDThread::FreeBSDThread(Process &process, lldb::tid_t tid)
27 : POSIXThread(process, tid)
31 FreeBSDThread::~FreeBSDThread()
35 //------------------------------------------------------------------------------
36 // ProcessInterface protocol.
39 FreeBSDThread::WillResume(lldb::StateType resume_state)
41 Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_THREAD));
43 log->Printf("tid %lu resume_state = %s", GetID(),
44 lldb_private::StateAsCString(resume_state));
45 ProcessSP process_sp(GetProcess());
46 ProcessFreeBSD *process = static_cast<ProcessFreeBSD *>(process_sp.get());
47 int signo = GetResumeSignal();
48 bool signo_valid = process->GetUnixSignals().SignalIsValid(signo);
54 process->m_suspend_tids.push_back(GetID());
57 process->m_run_tids.push_back(GetID());
59 process->m_resume_signo = signo;
62 process->m_step_tids.push_back(GetID());
64 process->m_resume_signo = signo;