Thread.h revision 15dcb7ca49b8d8f46910cf085b4c249aac5317fa
1//===-- Thread.h ------------------------------------------------*- C++ -*-===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef liblldb_Thread_h_
11#define liblldb_Thread_h_
12
13#include "lldb/lldb-private.h"
14#include "lldb/Host/Mutex.h"
15#include "lldb/Core/UserID.h"
16#include "lldb/Core/UserSettingsController.h"
17#include "lldb/Target/ExecutionContextScope.h"
18#include "lldb/Target/StackFrameList.h"
19
20#define LLDB_THREAD_MAX_STOP_EXC_DATA 8
21
22namespace lldb_private {
23
24class ThreadInstanceSettings : public InstanceSettings
25{
26public:
27
28    ThreadInstanceSettings (UserSettingsController &owner, bool live_instance = true, const char *name = NULL);
29
30    ThreadInstanceSettings (const ThreadInstanceSettings &rhs);
31
32    virtual
33    ~ThreadInstanceSettings ();
34
35    ThreadInstanceSettings&
36    operator= (const ThreadInstanceSettings &rhs);
37
38
39    void
40    UpdateInstanceSettingsVariable (const ConstString &var_name,
41                                    const char *index_value,
42                                    const char *value,
43                                    const ConstString &instance_name,
44                                    const SettingEntry &entry,
45                                    lldb::VarSetOperationType op,
46                                    Error &err,
47                                    bool pending);
48
49    bool
50    GetInstanceSettingsValue (const SettingEntry &entry,
51                              const ConstString &var_name,
52                              StringList &value,
53                              Error *err);
54
55    RegularExpression *
56    GetSymbolsToAvoidRegexp()
57    {
58        return m_avoid_regexp_ap.get();
59    }
60
61    static const ConstString &
62    StepAvoidRegexpVarName ();
63
64    bool
65    GetTraceEnabledState()
66    {
67        return m_trace_enabled;
68    }
69    static const ConstString &
70    GetTraceThreadVarName ();
71
72protected:
73
74    void
75    CopyInstanceSettings (const lldb::InstanceSettingsSP &new_settings,
76                          bool pending);
77
78    const ConstString
79    CreateInstanceName ();
80
81private:
82
83    std::auto_ptr<RegularExpression> m_avoid_regexp_ap;
84    bool m_trace_enabled;
85};
86
87class Thread :
88    public UserID,
89    public ExecutionContextScope,
90    public ThreadInstanceSettings
91{
92public:
93
94    class SettingsController : public UserSettingsController
95    {
96    public:
97
98        SettingsController ();
99
100        virtual
101        ~SettingsController ();
102
103        static SettingEntry global_settings_table[];
104        static SettingEntry instance_settings_table[];
105
106    protected:
107
108        lldb::InstanceSettingsSP
109        CreateInstanceSettings (const char *instance_name);
110
111    private:
112
113        // Class-wide settings.
114
115        DISALLOW_COPY_AND_ASSIGN (SettingsController);
116    };
117
118    // TODO: You shouldn't just checkpoint the register state alone, so this should get
119    // moved to protected.  To do that ThreadStateCheckpoint needs to be returned as a token...
120    class RegisterCheckpoint
121    {
122    public:
123
124        RegisterCheckpoint() :
125            m_stack_id (),
126            m_data_sp ()
127        {
128        }
129
130        RegisterCheckpoint (const StackID &stack_id) :
131            m_stack_id (stack_id),
132            m_data_sp ()
133        {
134        }
135
136        ~RegisterCheckpoint()
137        {
138        }
139
140        const RegisterCheckpoint&
141        operator= (const RegisterCheckpoint &rhs)
142        {
143            if (this != &rhs)
144            {
145                this->m_stack_id = rhs.m_stack_id;
146                this->m_data_sp  = rhs.m_data_sp;
147            }
148            return *this;
149        }
150
151        RegisterCheckpoint (const RegisterCheckpoint &rhs) :
152            m_stack_id (rhs.m_stack_id),
153            m_data_sp (rhs.m_data_sp)
154        {
155        }
156
157        const StackID &
158        GetStackID()
159        {
160            return m_stack_id;
161        }
162
163        void
164        SetStackID (const StackID &stack_id)
165        {
166            m_stack_id = stack_id;
167        }
168
169        lldb::DataBufferSP &
170        GetData()
171        {
172            return m_data_sp;
173        }
174
175        const lldb::DataBufferSP &
176        GetData() const
177        {
178            return m_data_sp;
179        }
180
181    protected:
182        StackID m_stack_id;
183        lldb::DataBufferSP m_data_sp;
184    };
185
186    struct ThreadStateCheckpoint
187    {
188        uint32_t           orig_stop_id;  // Dunno if I need this yet but it is an interesting bit of data.
189        lldb::StopInfoSP   stop_info_sp;  // You have to restore the stop info or you might continue with the wrong signals.
190        RegisterCheckpoint register_backup;  // You need to restore the registers, of course...
191    };
192
193    void
194    UpdateInstanceName ();
195
196    static void
197    Initialize ();
198
199    static void
200    Terminate ();
201
202    static lldb::UserSettingsControllerSP &
203    GetSettingsController ();
204
205    Thread (Process &process, lldb::tid_t tid);
206    virtual ~Thread();
207
208    Process &
209    GetProcess() { return m_process; }
210
211    const Process &
212    GetProcess() const { return m_process; }
213
214    int
215    GetResumeSignal () const
216    {
217        return m_resume_signal;
218    }
219
220    void
221    SetResumeSignal (int signal)
222    {
223        m_resume_signal = signal;
224    }
225
226    lldb::StateType
227    GetState() const;
228
229    lldb::ThreadSP
230    GetSP ();
231
232    void
233    SetState (lldb::StateType state);
234
235    lldb::StateType
236    GetResumeState () const
237    {
238        return m_resume_state;
239    }
240
241    void
242    SetResumeState (lldb::StateType state)
243    {
244        m_resume_state = state;
245    }
246
247    // This function is called on all the threads before "WillResume" in case
248    // a thread needs to change its state before the ThreadList polls all the
249    // threads to figure out which ones actually will get to run and how.
250    void
251    SetupForResume ();
252
253    // Override this to do platform specific tasks before resume, but always
254    // call the Thread::WillResume at the end of your work.
255
256    virtual bool
257    WillResume (lldb::StateType resume_state);
258
259    // This clears generic thread state after a resume.  If you subclass this,
260    // be sure to call it.
261    virtual void
262    DidResume ();
263
264    virtual void
265    RefreshStateAfterStop() = 0;
266
267    void
268    WillStop ();
269
270    bool
271    ShouldStop (Event *event_ptr);
272
273    lldb::Vote
274    ShouldReportStop (Event *event_ptr);
275
276    lldb::Vote
277    ShouldReportRun (Event *event_ptr);
278
279    // Return whether this thread matches the specification in ThreadSpec.  This is a virtual
280    // method because at some point we may extend the thread spec with a platform specific
281    // dictionary of attributes, which then only the platform specific Thread implementation
282    // would know how to match.  For now, this just calls through to the ThreadSpec's
283    // ThreadPassesBasicTests method.
284    virtual bool
285    MatchesSpec (const ThreadSpec *spec);
286
287    lldb::StopInfoSP
288    GetStopInfo ();
289
290    // This sets the stop reason to a "blank" stop reason, so you can call functions on the thread
291    // without having the called function run with whatever stop reason you stopped with.
292    void
293    SetStopInfoToNothing();
294
295    bool
296    ThreadStoppedForAReason ();
297
298    static const char *
299    RunModeAsCString (lldb::RunMode mode);
300
301    static const char *
302    StopReasonAsCString (lldb::StopReason reason);
303
304    virtual const char *
305    GetInfo () = 0;
306
307    virtual const char *
308    GetName ()
309    {
310        return NULL;
311    }
312
313    virtual const char *
314    GetQueueName ()
315    {
316        return NULL;
317    }
318
319    virtual uint32_t
320    GetStackFrameCount();
321
322    virtual lldb::StackFrameSP
323    GetStackFrameAtIndex (uint32_t idx);
324
325    virtual lldb::StackFrameSP
326    GetFrameWithConcreteFrameIndex (uint32_t unwind_idx);
327
328    uint32_t
329    GetSelectedFrameIndex ();
330
331    lldb::StackFrameSP
332    GetSelectedFrame ();
333
334    uint32_t
335    SetSelectedFrame (lldb_private::StackFrame *frame);
336
337    void
338    SetSelectedFrameByIndex (uint32_t frame_idx);
339
340    virtual lldb::RegisterContextSP
341    GetRegisterContext () = 0;
342
343    virtual lldb::RegisterContextSP
344    CreateRegisterContextForFrame (StackFrame *frame) = 0;
345
346    virtual void
347    ClearStackFrames ();
348
349    void
350    DumpUsingSettingsFormat (Stream &strm, uint32_t frame_idx);
351
352    //------------------------------------------------------------------
353    // Thread Plan Providers:
354    // This section provides the basic thread plans that the Process control
355    // machinery uses to run the target.  ThreadPlan.h provides more details on
356    // how this mechanism works.
357    // The thread provides accessors to a set of plans that perform basic operations.
358    // The idea is that particular Platform plugins can override these methods to
359    // provide the implementation of these basic operations appropriate to their
360    // environment.
361    //------------------------------------------------------------------
362
363    //------------------------------------------------------------------
364    /// Queues the base plan for a thread.
365    /// The version returned by Process does some things that are useful,
366    /// like handle breakpoints and signals, so if you return a plugin specific
367    /// one you probably want to call through to the Process one for anything
368    /// your plugin doesn't explicitly handle.
369    ///
370    /// @param[in] abort_other_plans
371    ///    \b true if we discard the currently queued plans and replace them with this one.
372    ///    Otherwise this plan will go on the end of the plan stack.
373    ///
374    /// @return
375    ///     A pointer to the newly queued thread plan, or NULL if the plan could not be queued.
376    //------------------------------------------------------------------
377    virtual ThreadPlan *
378    QueueFundamentalPlan (bool abort_other_plans);
379
380    //------------------------------------------------------------------
381    /// Queues the plan used to step over a breakpoint at the current PC of \a thread.
382    /// The default version returned by Process handles trap based breakpoints, and
383    /// will disable the breakpoint, single step over it, then re-enable it.
384    ///
385    /// @param[in] abort_other_plans
386    ///    \b true if we discard the currently queued plans and replace them with this one.
387    ///    Otherwise this plan will go on the end of the plan stack.
388    ///
389    /// @return
390    ///     A pointer to the newly queued thread plan, or NULL if the plan could not be queued.
391    //------------------------------------------------------------------
392    virtual ThreadPlan *
393    QueueThreadPlanForStepOverBreakpointPlan (bool abort_other_plans);
394
395    //------------------------------------------------------------------
396    /// Queues the plan used to step one instruction from the current PC of \a thread.
397    ///
398    /// @param[in] step_over
399    ///    \b true if we step over calls to functions, false if we step in.
400    ///
401    /// @param[in] abort_other_plans
402    ///    \b true if we discard the currently queued plans and replace them with this one.
403    ///    Otherwise this plan will go on the end of the plan stack.
404    ///
405    /// @param[in] stop_other_threads
406    ///    \b true if we will stop other threads while we single step this one.
407    ///
408    /// @return
409    ///     A pointer to the newly queued thread plan, or NULL if the plan could not be queued.
410    //------------------------------------------------------------------
411    virtual ThreadPlan *
412    QueueThreadPlanForStepSingleInstruction (bool step_over,
413                                             bool abort_other_plans,
414                                             bool stop_other_threads);
415
416    //------------------------------------------------------------------
417    /// Queues the plan used to step through an address range, stepping into or over
418    /// function calls depending on the value of StepType.
419    ///
420    /// @param[in] abort_other_plans
421    ///    \b true if we discard the currently queued plans and replace them with this one.
422    ///    Otherwise this plan will go on the end of the plan stack.
423    ///
424    /// @param[in] type
425    ///    Type of step to do, only eStepTypeInto and eStepTypeOver are supported by this plan.
426    ///
427    /// @param[in] range
428    ///    The address range to step through.
429    ///
430    /// @param[in] addr_context
431    ///    When dealing with stepping through inlined functions the current PC is not enough information to know
432    ///    what "step" means.  For instance a series of nested inline functions might start at the same address.
433    //     The \a addr_context provides the current symbol context the step
434    ///    is supposed to be out of.
435    //   FIXME: Currently unused.
436    ///
437    /// @param[in] stop_other_threads
438    ///    \b true if we will stop other threads while we single step this one.
439    ///
440    /// @return
441    ///     A pointer to the newly queued thread plan, or NULL if the plan could not be queued.
442    //------------------------------------------------------------------
443    virtual ThreadPlan *
444    QueueThreadPlanForStepRange (bool abort_other_plans,
445                                 lldb::StepType type,
446                                 const AddressRange &range,
447                                 const SymbolContext &addr_context,
448                                 lldb::RunMode stop_other_threads,
449                                 bool avoid_code_without_debug_info);
450
451    //------------------------------------------------------------------
452    /// Queue the plan used to step out of the function at the current PC of
453    /// \a thread.
454    ///
455    /// @param[in] abort_other_plans
456    ///    \b true if we discard the currently queued plans and replace them with this one.
457    ///    Otherwise this plan will go on the end of the plan stack.
458    ///
459    /// @param[in] addr_context
460    ///    When dealing with stepping through inlined functions the current PC is not enough information to know
461    ///    what "step" means.  For instance a series of nested inline functions might start at the same address.
462    //     The \a addr_context provides the current symbol context the step
463    ///    is supposed to be out of.
464    //   FIXME: Currently unused.
465    ///
466    /// @param[in] first_insn
467    ///     \b true if this is the first instruction of a function.
468    ///
469    /// @param[in] stop_other_threads
470    ///    \b true if we will stop other threads while we single step this one.
471    ///
472    /// @param[in] stop_vote
473    /// @param[in] run_vote
474    ///    See standard meanings for the stop & run votes in ThreadPlan.h.
475    ///
476    /// @return
477    ///     A pointer to the newly queued thread plan, or NULL if the plan could not be queued.
478    //------------------------------------------------------------------
479    virtual ThreadPlan *
480    QueueThreadPlanForStepOut (bool abort_other_plans,
481                               SymbolContext *addr_context,
482                               bool first_insn,
483                               bool stop_other_threads,
484                               lldb::Vote stop_vote = lldb::eVoteYes,
485                               lldb::Vote run_vote = lldb::eVoteNoOpinion);
486
487    //------------------------------------------------------------------
488    /// Gets the plan used to step through the code that steps from a function
489    /// call site at the current PC into the actual function call.
490    ///
491    /// @param[in] abort_other_plans
492    ///    \b true if we discard the currently queued plans and replace them with this one.
493    ///    Otherwise this plan will go on the end of the plan stack.
494    ///
495    /// @param[in] stop_other_threads
496    ///    \b true if we will stop other threads while we single step this one.
497    ///
498    /// @return
499    ///     A pointer to the newly queued thread plan, or NULL if the plan could not be queued.
500    //------------------------------------------------------------------
501    virtual ThreadPlan *
502    QueueThreadPlanForStepThrough (bool abort_other_plans,
503                                   bool stop_other_threads);
504
505    //------------------------------------------------------------------
506    /// Gets the plan used to continue from the current PC.
507    /// This is a simple plan, mostly useful as a backstop when you are continuing
508    /// for some particular purpose.
509    ///
510    /// @param[in] abort_other_plans
511    ///    \b true if we discard the currently queued plans and replace them with this one.
512    ///    Otherwise this plan will go on the end of the plan stack.
513    ///
514    /// @param[in] target_addr
515    ///    The address to which we're running.
516    ///
517    /// @param[in] stop_other_threads
518    ///    \b true if we will stop other threads while we single step this one.
519    ///
520    /// @return
521    ///     A pointer to the newly queued thread plan, or NULL if the plan could not be queued.
522    //------------------------------------------------------------------
523    virtual ThreadPlan *
524    QueueThreadPlanForRunToAddress (bool abort_other_plans,
525                                    Address &target_addr,
526                                    bool stop_other_threads);
527
528    virtual ThreadPlan *
529    QueueThreadPlanForStepUntil (bool abort_other_plans,
530                               lldb::addr_t *address_list,
531                               size_t num_addresses,
532                               bool stop_others);
533
534    virtual ThreadPlan *
535    QueueThreadPlanForCallFunction (bool abort_other_plans,
536                                    Address& function,
537                                    lldb::addr_t arg,
538                                    bool stop_other_threads,
539                                    bool discard_on_error = false);
540
541    //------------------------------------------------------------------
542    // Thread Plan accessors:
543    //------------------------------------------------------------------
544
545    //------------------------------------------------------------------
546    /// Gets the plan which will execute next on the plan stack.
547    ///
548    /// @return
549    ///     A pointer to the next executed plan.
550    //------------------------------------------------------------------
551    ThreadPlan *
552    GetCurrentPlan ();
553
554    //------------------------------------------------------------------
555    /// Gets the inner-most plan that was popped off the plan stack in the
556    /// most recent stop.  Useful for printing the stop reason accurately.
557    ///
558    /// @return
559    ///     A pointer to the last completed plan.
560    //------------------------------------------------------------------
561    lldb::ThreadPlanSP
562    GetCompletedPlan ();
563
564    //------------------------------------------------------------------
565    ///  Checks whether the given plan is in the completed plans for this
566    ///  stop.
567    ///
568    /// @param[in] plan
569    ///     Pointer to the plan you're checking.
570    ///
571    /// @return
572    ///     Returns true if the input plan is in the completed plan stack,
573    ///     false otherwise.
574    //------------------------------------------------------------------
575    bool
576    IsThreadPlanDone (ThreadPlan *plan);
577
578    //------------------------------------------------------------------
579    ///  Checks whether the given plan is in the discarded plans for this
580    ///  stop.
581    ///
582    /// @param[in] plan
583    ///     Pointer to the plan you're checking.
584    ///
585    /// @return
586    ///     Returns true if the input plan is in the discarded plan stack,
587    ///     false otherwise.
588    //------------------------------------------------------------------
589    bool
590    WasThreadPlanDiscarded (ThreadPlan *plan);
591
592    //------------------------------------------------------------------
593    /// Queues a generic thread plan.
594    ///
595    /// @param[in] plan_sp
596    ///    The plan to queue.
597    ///
598    /// @param[in] abort_other_plans
599    ///    \b true if we discard the currently queued plans and replace them with this one.
600    ///    Otherwise this plan will go on the end of the plan stack.
601    ///
602    /// @return
603    ///     A pointer to the last completed plan.
604    //------------------------------------------------------------------
605    void
606    QueueThreadPlan (lldb::ThreadPlanSP &plan_sp, bool abort_other_plans);
607
608
609    //------------------------------------------------------------------
610    /// Discards the plans queued on the plan stack of the current thread.  This is
611    /// arbitrated by the "Master" ThreadPlans, using the "OkayToDiscard" call.
612    //  But if \a force is true, all thread plans are discarded.
613    //------------------------------------------------------------------
614    void
615    DiscardThreadPlans (bool force);
616
617    //------------------------------------------------------------------
618    /// Discards the plans queued on the plan stack of the current thread up to and
619    /// including up_to_plan_sp.
620    //
621    // @param[in] up_to_plan_sp
622    //   Discard all plans up to and including this one.
623    //------------------------------------------------------------------
624    void
625    DiscardThreadPlansUpToPlan (lldb::ThreadPlanSP &up_to_plan_sp);
626
627    //------------------------------------------------------------------
628    /// Prints the current plan stack.
629    ///
630    /// @param[in] s
631    ///    The stream to which to dump the plan stack info.
632    ///
633    //------------------------------------------------------------------
634    void
635    DumpThreadPlans (Stream *s) const;
636
637    virtual bool
638    CheckpointThreadState (ThreadStateCheckpoint &saved_state);
639
640    virtual bool
641    RestoreThreadStateFromCheckpoint (ThreadStateCheckpoint &saved_state);
642
643    void
644    EnableTracer (bool value, bool single_step);
645
646    void
647    SetTracer (lldb::ThreadPlanTracerSP &tracer_sp);
648
649    //------------------------------------------------------------------
650    /// The regular expression returned determines symbols that this
651    /// thread won't stop in during "step-in" operations.
652    ///
653    /// @return
654    ///    A pointer to a regular expression to compare against symbols,
655    ///    or NULL if all symbols are allowed.
656    ///
657    //------------------------------------------------------------------
658    RegularExpression *
659    GetSymbolsToAvoidRegexp()
660    {
661        return ThreadInstanceSettings::GetSymbolsToAvoidRegexp();
662    }
663
664    // Get the thread index ID. The index ID that is guaranteed to not be
665    // re-used by a process. They start at 1 and increase with each new thread.
666    // This allows easy command line access by a unique ID that is easier to
667    // type than the actual system thread ID.
668    uint32_t
669    GetIndexID () const;
670
671    //------------------------------------------------------------------
672    // lldb::ExecutionContextScope pure virtual functions
673    //------------------------------------------------------------------
674    virtual Target *
675    CalculateTarget ();
676
677    virtual Process *
678    CalculateProcess ();
679
680    virtual Thread *
681    CalculateThread ();
682
683    virtual StackFrame *
684    CalculateStackFrame ();
685
686    virtual void
687    CalculateExecutionContext (ExecutionContext &exe_ctx);
688
689    lldb::StackFrameSP
690    GetStackFrameSPForStackFramePtr (StackFrame *stack_frame_ptr);
691
692protected:
693
694    friend class ThreadPlan;
695    friend class StackFrameList;
696
697    // This is necessary to make sure thread assets get destroyed while the thread is still in good shape
698    // to call virtual thread methods.  This must be called by classes that derive from Thread in their destructor.
699    virtual void DestroyThread ();
700
701    void
702    PushPlan (lldb::ThreadPlanSP &plan_sp);
703
704    void
705    PopPlan ();
706
707    void
708    DiscardPlan ();
709
710    ThreadPlan *GetPreviousPlan (ThreadPlan *plan);
711
712    // When you implement this method, make sure you don't overwrite the m_actual_stop_info if it claims to be
713    // valid.  The stop info may be a "checkpointed and restored" stop info, so if it is still around it is right
714    // even if you have not calculated this yourself, or if it disagrees with what you might have calculated.
715    virtual lldb::StopInfoSP
716    GetPrivateStopReason () = 0;
717
718    typedef std::vector<lldb::ThreadPlanSP> plan_stack;
719
720    void
721    SetStopInfo (const lldb::StopInfoSP &stop_info_sp);
722
723    virtual bool
724    SaveFrameZeroState (RegisterCheckpoint &checkpoint) = 0;
725
726    virtual bool
727    RestoreSaveFrameZero (const RegisterCheckpoint &checkpoint) = 0;
728
729    virtual lldb_private::Unwind *
730    GetUnwinder () = 0;
731
732    StackFrameList &
733    GetStackFrameList ();
734
735    struct ThreadState
736    {
737        uint32_t           orig_stop_id;
738        lldb::StopInfoSP   stop_info_sp;
739        RegisterCheckpoint register_backup;
740    };
741
742    //------------------------------------------------------------------
743    // Classes that inherit from Process can see and modify these
744    //------------------------------------------------------------------
745    Process &           m_process;          ///< The process that owns this thread.
746    lldb::StopInfoSP    m_actual_stop_info_sp;     ///< The private stop reason for this thread
747    const uint32_t      m_index_id;         ///< A unique 1 based index assigned to each thread for easy UI/command line access.
748    lldb::RegisterContextSP   m_reg_context_sp;   ///< The register context for this thread's current register state.
749    lldb::StateType     m_state;            ///< The state of our process.
750    mutable Mutex       m_state_mutex;      ///< Multithreaded protection for m_state.
751    plan_stack          m_plan_stack;       ///< The stack of plans this thread is executing.
752    plan_stack          m_completed_plan_stack;  ///< Plans that have been completed by this stop.  They get deleted when the thread resumes.
753    plan_stack          m_discarded_plan_stack;  ///< Plans that have been discarded by this stop.  They get deleted when the thread resumes.
754    std::auto_ptr<StackFrameList> m_curr_frames_ap; ///< The stack frames that get lazily populated after a thread stops.
755    lldb::StackFrameListSP m_prev_frames_sp; ///< The previous stack frames from the last time this thread stopped.
756    int                 m_resume_signal;    ///< The signal that should be used when continuing this thread.
757    lldb::StateType     m_resume_state;     ///< The state that indicates what this thread should do when the process is resumed.
758    std::auto_ptr<lldb_private::Unwind> m_unwinder_ap;
759    bool                m_destroy_called;    // This is used internally to make sure derived Thread classes call DestroyThread.
760    uint32_t m_thread_stop_reason_stop_id;   // This is the stop id for which the StopInfo is valid.  Can use this so you know that
761                                             // the thread's m_actual_stop_info_sp is current and you don't have to fetch it again
762
763private:
764    //------------------------------------------------------------------
765    // For Thread only
766    //------------------------------------------------------------------
767
768    DISALLOW_COPY_AND_ASSIGN (Thread);
769
770};
771
772} // namespace lldb_private
773
774#endif  // liblldb_Thread_h_
775