~ubuntu-branches/ubuntu/trusty/llvm-toolchain-snapshot/trusty-201310232150

« back to all changes in this revision

Viewing changes to lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-27 15:01:57 UTC
  • mfrom: (0.10.1) (0.9.1) (0.8.1) (0.7.1) (0.6.1) (0.5.2)
  • Revision ID: package-import@ubuntu.com-20130527150157-tdkrsjpuvht7v0qx
Tags: 1:3.4~svn182733-1~exp1
* New snapshot release (3.4 release)
* Add a symlink of libLLVM-3.4.so.1 to usr/lib/llvm-3.4/lib/libLLVM-3.4.so
    to fix make the llvm-config-3.4 --libdir work (Closes: #708677)
  * Various packages rename to allow co installations:
    * libclang1 => libclang1-3.4
    * libclang1-dbg => libclang1-3.4-dbg
    * libclang-dev => libclang-3.4-dev
    * libclang-common-dev => libclang-common-3.4-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
    return NULL;
67
67
}
68
68
 
69
 
bool
70
 
ThreadKDP::WillResume (StateType resume_state)
71
 
{
72
 
    // Call the Thread::WillResume first. If we stop at a signal, the stop info
73
 
    // class for signal will set the resume signal that we need below. The signal
74
 
    // stuff obeys the Process::UnixSignal defaults. 
75
 
    Thread::WillResume(resume_state);
76
 
 
77
 
    ClearStackFrames();
78
 
 
79
 
    Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STEP));
80
 
    if (log)
81
 
        log->Printf ("Resuming thread: %4.4" PRIx64 " with state: %s.", GetID(), StateAsCString(resume_state));
82
 
 
83
 
    return true;
84
 
}
85
 
 
86
69
void
87
70
ThreadKDP::RefreshStateAfterStop()
88
71
{
100
83
        reg_ctx_sp->InvalidateIfNeeded (force);
101
84
}
102
85
 
103
 
void
104
 
ThreadKDP::ClearStackFrames ()
105
 
{
106
 
    Unwind *unwinder = GetUnwinder ();
107
 
    if (unwinder)
108
 
        unwinder->Clear();
109
 
    Thread::ClearStackFrames();
110
 
}
111
 
 
112
 
 
113
86
bool
114
87
ThreadKDP::ThreadIDIsValid (lldb::tid_t thread)
115
88
{
175
148
    return reg_ctx_sp;
176
149
}
177
150
 
178
 
lldb::StopInfoSP
179
 
ThreadKDP::GetPrivateStopReason ()
 
151
bool
 
152
ThreadKDP::CalculateStopInfo ()
180
153
{
181
154
    ProcessSP process_sp (GetProcess());
182
155
    if (process_sp)
183
156
    {
184
 
        const uint32_t process_stop_id = process_sp->GetStopID();
185
 
        if (m_thread_stop_reason_stop_id != process_stop_id ||
186
 
            (m_actual_stop_info_sp && !m_actual_stop_info_sp->IsValid()))
187
 
        {
188
 
            if (IsStillAtLastBreakpointHit())
189
 
                return m_actual_stop_info_sp;
190
 
 
191
 
            if (m_cached_stop_info_sp)
192
 
                SetStopInfo (m_cached_stop_info_sp);
193
 
            else
194
 
                SetStopInfo(StopInfo::CreateStopReasonWithSignal (*this, SIGSTOP));
195
 
        }
 
157
        if (m_cached_stop_info_sp)
 
158
        {
 
159
            SetStopInfo (m_cached_stop_info_sp);
 
160
        }
 
161
        else
 
162
        {
 
163
            SetStopInfo(StopInfo::CreateStopReasonWithSignal (*this, SIGSTOP));
 
164
        }
 
165
        return true;
196
166
    }
197
 
    return m_actual_stop_info_sp;
 
167
    return false;
198
168
}
199
169
 
200
170
void