]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Target/Thread.h
Update LLDB snapshot to upstream r225923 (git 2b588ecd)
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Target / Thread.h
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/Broadcaster.h"
16 #include "lldb/Core/Event.h"
17 #include "lldb/Core/StructuredData.h"
18 #include "lldb/Core/UserID.h"
19 #include "lldb/Core/UserSettingsController.h"
20 #include "lldb/Target/ExecutionContextScope.h"
21 #include "lldb/Target/RegisterCheckpoint.h"
22 #include "lldb/Target/StackFrameList.h"
23
24 #define LLDB_THREAD_MAX_STOP_EXC_DATA 8
25
26 namespace lldb_private {
27
28 class ThreadProperties : public Properties
29 {
30 public:
31     ThreadProperties(bool is_global);
32     
33     virtual
34     ~ThreadProperties();
35     
36     //------------------------------------------------------------------
37     /// The regular expression returned determines symbols that this
38     /// thread won't stop in during "step-in" operations.
39     ///
40     /// @return
41     ///    A pointer to a regular expression to compare against symbols,
42     ///    or NULL if all symbols are allowed.
43     ///
44     //------------------------------------------------------------------
45     const RegularExpression *
46     GetSymbolsToAvoidRegexp();
47     
48     FileSpecList &
49     GetLibrariesToAvoid() const;
50     
51     bool
52     GetTraceEnabledState() const;
53     
54     bool
55     GetStepInAvoidsNoDebug () const;
56     
57     bool
58     GetStepOutAvoidsNoDebug () const;
59 };
60
61 typedef std::shared_ptr<ThreadProperties> ThreadPropertiesSP;
62
63 class Thread :
64     public std::enable_shared_from_this<Thread>,
65     public ThreadProperties,
66     public UserID,
67     public ExecutionContextScope,
68     public Broadcaster
69 {
70 public:
71     //------------------------------------------------------------------
72     /// Broadcaster event bits definitions.
73     //------------------------------------------------------------------
74     enum
75     {
76         eBroadcastBitStackChanged           = (1 << 0),
77         eBroadcastBitThreadSuspended        = (1 << 1),
78         eBroadcastBitThreadResumed          = (1 << 2),
79         eBroadcastBitSelectedFrameChanged   = (1 << 3),
80         eBroadcastBitThreadSelected         = (1 << 4)
81     };
82
83     static ConstString &GetStaticBroadcasterClass ();
84     
85     virtual ConstString &GetBroadcasterClass() const
86     {
87         return GetStaticBroadcasterClass();
88     }
89     
90     class ThreadEventData :
91         public EventData
92     {
93     public:
94         ThreadEventData (const lldb::ThreadSP thread_sp);
95         
96         ThreadEventData (const lldb::ThreadSP thread_sp, const StackID &stack_id);
97         
98         ThreadEventData();
99         
100         virtual ~ThreadEventData();
101         
102         static const ConstString &
103         GetFlavorString ();
104
105         virtual const ConstString &
106         GetFlavor () const
107         {
108             return ThreadEventData::GetFlavorString ();
109         }
110         
111         virtual void
112         Dump (Stream *s) const;
113     
114         static const ThreadEventData *
115         GetEventDataFromEvent (const Event *event_ptr);
116         
117         static lldb::ThreadSP
118         GetThreadFromEvent (const Event *event_ptr);
119         
120         static StackID
121         GetStackIDFromEvent (const Event *event_ptr);
122         
123         static lldb::StackFrameSP
124         GetStackFrameFromEvent (const Event *event_ptr);
125         
126         lldb::ThreadSP
127         GetThread () const
128         {
129             return m_thread_sp;
130         }
131         
132         StackID
133         GetStackID () const
134         {
135             return m_stack_id;
136         }
137     
138     private:
139         lldb::ThreadSP m_thread_sp;
140         StackID        m_stack_id;
141     DISALLOW_COPY_AND_ASSIGN (ThreadEventData);
142     };
143     
144
145     struct ThreadStateCheckpoint
146     {
147         uint32_t           orig_stop_id;  // Dunno if I need this yet but it is an interesting bit of data.
148         lldb::StopInfoSP   stop_info_sp;  // You have to restore the stop info or you might continue with the wrong signals.
149         lldb::RegisterCheckpointSP register_backup_sp;  // You need to restore the registers, of course...
150         uint32_t           current_inlined_depth;
151         lldb::addr_t       current_inlined_pc;
152     };
153
154     static void
155     SettingsInitialize ();
156
157     static void
158     SettingsTerminate ();
159
160     static const ThreadPropertiesSP &
161     GetGlobalProperties();
162
163     //------------------------------------------------------------------
164     /// Constructor
165     ///
166     /// @param [in] process
167     ///
168     /// @param [in] tid
169     ///
170     /// @param [in] use_invalid_index_id
171     ///     Optional parameter, defaults to false.  The only subclass that
172     ///     is likely to set use_invalid_index_id == true is the HistoryThread
173     ///     class.  In that case, the Thread we are constructing represents
174     ///     a thread from earlier in the program execution.  We may have the 
175     ///     tid of the original thread that they represent but we don't want 
176     ///     to reuse the IndexID of that thread, or create a new one.  If a
177     ///     client wants to know the original thread's IndexID, they should use
178     ///     Thread::GetExtendedBacktraceOriginatingIndexID().
179     //------------------------------------------------------------------
180     Thread (Process &process, lldb::tid_t tid, bool use_invalid_index_id = false);
181
182     virtual ~Thread();
183
184     lldb::ProcessSP
185     GetProcess() const
186     {
187         return m_process_wp.lock(); 
188     }
189
190     int
191     GetResumeSignal () const
192     {
193         return m_resume_signal;
194     }
195
196     void
197     SetResumeSignal (int signal)
198     {
199         m_resume_signal = signal;
200     }
201
202     lldb::StateType
203     GetState() const;
204
205     void
206     SetState (lldb::StateType state);
207
208     lldb::StateType
209     GetResumeState () const
210     {
211         return m_resume_state;
212     }
213     
214     // This sets the "external resume state" of the thread.  If the thread is suspended here, it should never
215     // get scheduled.  Note that just because a thread is marked as "running" does not mean we will let it run in
216     // a given bit of process control.  For instance "step" tries to stay on the selected thread it was issued on,
217     // which may involve suspending other threads temporarily.  This temporary suspension is NOT reflected in the
218     // state set here and reported in GetResumeState.
219     //
220     // If you are just preparing all threads to run, you should not override the threads that are
221     // marked as suspended by the debugger.  In that case, pass override_suspend = false.  If you want
222     // to force the thread to run (e.g. the "thread continue" command, or are resetting the state
223     // (e.g. in SBThread::Resume()), then pass true to override_suspend.
224     void
225     SetResumeState (lldb::StateType state, bool override_suspend = false)
226     {
227         if (m_resume_state == lldb::eStateSuspended && !override_suspend)
228             return;
229         m_resume_state = state;
230     }
231
232     // This function is called on all the threads before "ShouldResume" and
233     // "WillResume" in case a thread needs to change its state before the
234     // ThreadList polls all the threads to figure out which ones actually
235     // will get to run and how.
236     void
237     SetupForResume ();
238     
239     // Do not override this function, it is for thread plan logic only
240     bool
241     ShouldResume (lldb::StateType resume_state);
242
243     // Override this to do platform specific tasks before resume.
244     virtual void
245     WillResume (lldb::StateType resume_state)
246     {
247     }
248
249     // This clears generic thread state after a resume.  If you subclass this,
250     // be sure to call it.
251     virtual void
252     DidResume ();
253
254     // This notifies the thread when a private stop occurs.
255     virtual void
256     DidStop ();
257
258     virtual void
259     RefreshStateAfterStop() = 0;
260
261     void
262     WillStop ();
263
264     bool
265     ShouldStop (Event *event_ptr);
266
267     Vote
268     ShouldReportStop (Event *event_ptr);
269     
270     Vote
271     ShouldReportRun (Event *event_ptr);
272     
273     void
274     Flush ();
275
276     // Return whether this thread matches the specification in ThreadSpec.  This is a virtual
277     // method because at some point we may extend the thread spec with a platform specific
278     // dictionary of attributes, which then only the platform specific Thread implementation
279     // would know how to match.  For now, this just calls through to the ThreadSpec's 
280     // ThreadPassesBasicTests method.
281     virtual bool
282     MatchesSpec (const ThreadSpec *spec);
283
284     lldb::StopInfoSP
285     GetStopInfo ();
286
287     lldb::StopReason
288     GetStopReason();
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 ()
306     {
307         return NULL;
308     }
309
310     //------------------------------------------------------------------
311     /// Retrieve a dictionary of information about this thread 
312     ///
313     /// On Mac OS X systems there may be voucher information.
314     /// The top level dictionary returned will have an "activity" key and the
315     /// value of the activity is a dictionary.  Keys in that dictionary will 
316     /// be "name" and "id", among others.
317     /// There may also be "trace_messages" (an array) with each entry in that array
318     /// being a dictionary (keys include "message" with the text of the trace
319     /// message).
320     //------------------------------------------------------------------
321     StructuredData::ObjectSP
322     GetExtendedInfo ()
323     {
324         if (m_extended_info_fetched == false)
325         {
326             m_extended_info = FetchThreadExtendedInfo ();
327             m_extended_info_fetched = true;
328         }
329         return m_extended_info;
330     }
331
332     virtual const char *
333     GetName ()
334     {
335         return NULL;
336     }
337
338     virtual void
339     SetName (const char *name)
340     {
341     }
342
343     //------------------------------------------------------------------
344     /// Retrieve the Queue ID for the queue currently using this Thread
345     ///
346     /// If this Thread is doing work on behalf of a libdispatch/GCD queue,
347     /// retrieve the QueueID.
348     ///
349     /// This is a unique identifier for the libdispatch/GCD queue in a 
350     /// process.  Often starting at 1 for the initial system-created 
351     /// queues and incrementing, a QueueID will not be reused for a
352     /// different queue during the lifetime of a proces.
353     ///
354     /// @return
355     ///     A QueueID if the Thread subclass implements this, else
356     ///     LLDB_INVALID_QUEUE_ID.
357     //------------------------------------------------------------------
358     virtual lldb::queue_id_t
359     GetQueueID ()
360     {
361         return LLDB_INVALID_QUEUE_ID;
362     }
363
364     virtual void
365     SetQueueID (lldb::queue_id_t new_val)
366     {
367     }
368
369     //------------------------------------------------------------------
370     /// Retrieve the Queue name for the queue currently using this Thread
371     ///
372     /// If this Thread is doing work on behalf of a libdispatch/GCD queue,
373     /// retrieve the Queue name.
374     ///
375     /// @return
376     ///     The Queue name, if the Thread subclass implements this, else
377     ///     NULL.
378     //------------------------------------------------------------------
379     virtual const char *
380     GetQueueName ()
381     {
382         return NULL;
383     }
384
385     virtual void
386     SetQueueName (const char *name)
387     {
388     }
389
390     //------------------------------------------------------------------
391     /// Retrieve the Queue for this thread, if any.
392     ///
393     /// @return
394     ///     A QueueSP for the queue that is currently associated with this 
395     ///     thread.
396     ///     An empty shared pointer indicates that this thread is not
397     ///     associated with a queue, or libdispatch queues are not 
398     ///     supported on this target.
399     //------------------------------------------------------------------
400     virtual lldb::QueueSP
401     GetQueue ()
402     {
403         return lldb::QueueSP();
404     }
405
406     //------------------------------------------------------------------
407     /// Retrieve the address of the libdispatch_queue_t struct for queue
408     /// currently using this Thread
409     ///
410     /// If this Thread is doing work on behalf of a libdispatch/GCD queue,
411     /// retrieve the address of the libdispatch_queue_t structure describing
412     /// the queue.
413     ///
414     /// This address may be reused for different queues later in the Process
415     /// lifetime and should not be used to identify a queue uniquely.  Use
416     /// the GetQueueID() call for that.
417     ///
418     /// @return
419     ///     The Queue's libdispatch_queue_t address if the Thread subclass
420     ///     implements this, else LLDB_INVALID_ADDRESS.
421     //------------------------------------------------------------------
422     virtual lldb::addr_t
423     GetQueueLibdispatchQueueAddress ()
424     {
425         return LLDB_INVALID_ADDRESS;
426     }
427
428     virtual uint32_t
429     GetStackFrameCount()
430     {
431         return GetStackFrameList()->GetNumFrames();
432     }
433
434     virtual lldb::StackFrameSP
435     GetStackFrameAtIndex (uint32_t idx)
436     {
437         return GetStackFrameList()->GetFrameAtIndex(idx);
438     }
439     
440     virtual lldb::StackFrameSP
441     GetFrameWithConcreteFrameIndex (uint32_t unwind_idx);
442     
443     bool
444     DecrementCurrentInlinedDepth()
445     {
446         return GetStackFrameList()->DecrementCurrentInlinedDepth();
447     }
448     
449     uint32_t
450     GetCurrentInlinedDepth()
451     {
452         return GetStackFrameList()->GetCurrentInlinedDepth();
453     }
454     
455     Error
456     ReturnFromFrameWithIndex (uint32_t frame_idx, lldb::ValueObjectSP return_value_sp, bool broadcast = false);
457     
458     Error
459     ReturnFromFrame (lldb::StackFrameSP frame_sp, lldb::ValueObjectSP return_value_sp, bool broadcast = false);
460
461     Error
462     JumpToLine (const FileSpec &file, uint32_t line, bool can_leave_function, std::string *warnings = NULL);
463
464     virtual lldb::StackFrameSP
465     GetFrameWithStackID (const StackID &stack_id)
466     {
467         if (stack_id.IsValid())
468             return GetStackFrameList()->GetFrameWithStackID (stack_id);
469         return lldb::StackFrameSP();
470     }
471
472     uint32_t
473     GetSelectedFrameIndex ()
474     {
475         return GetStackFrameList()->GetSelectedFrameIndex();
476     }
477
478     lldb::StackFrameSP
479     GetSelectedFrame ()
480     {
481         lldb::StackFrameListSP stack_frame_list_sp(GetStackFrameList());
482         return stack_frame_list_sp->GetFrameAtIndex (stack_frame_list_sp->GetSelectedFrameIndex());
483     }
484
485     uint32_t
486     SetSelectedFrame (lldb_private::StackFrame *frame, bool broadcast = false);
487
488
489     bool
490     SetSelectedFrameByIndex (uint32_t frame_idx, bool broadcast = false);
491
492     bool
493     SetSelectedFrameByIndexNoisily (uint32_t frame_idx, Stream &output_stream);
494
495     void
496     SetDefaultFileAndLineToSelectedFrame()
497     {
498         GetStackFrameList()->SetDefaultFileAndLineToSelectedFrame();
499     }
500
501     virtual lldb::RegisterContextSP
502     GetRegisterContext () = 0;
503
504     virtual lldb::RegisterContextSP
505     CreateRegisterContextForFrame (StackFrame *frame) = 0;
506     
507     virtual void
508     ClearStackFrames ();
509
510     virtual bool
511     SetBackingThread (const lldb::ThreadSP &thread_sp)
512     {
513         return false;
514     }
515     
516     virtual lldb::ThreadSP
517     GetBackingThread () const
518     {
519         return lldb::ThreadSP();
520     }
521
522     virtual void
523     ClearBackingThread ()
524     {
525         // Subclasses can use this function if a thread is actually backed by
526         // another thread. This is currently used for the OperatingSystem plug-ins
527         // where they might have a thread that is in memory, yet its registers
528         // are available through the lldb_private::Thread subclass for the current
529         // lldb_private::Process class. Since each time the process stops the backing
530         // threads for memory threads can change, we need a way to clear the backing
531         // thread for all memory threads each time we stop.
532     }
533
534     void
535     DumpUsingSettingsFormat (Stream &strm, uint32_t frame_idx);
536
537     bool
538     GetDescription (Stream &s, lldb::DescriptionLevel level, bool print_json_thread, bool print_json_stopinfo);
539
540     //------------------------------------------------------------------
541     /// Default implementation for stepping into.
542     ///
543     /// This function is designed to be used by commands where the
544     /// process is publicly stopped.
545     ///
546     /// @param[in] source_step
547     ///     If true and the frame has debug info, then do a source level
548     ///     step in, else do a single instruction step in.
549     ///
550     /// @param[in] step_in_avoids_code_without_debug_info
551     ///     If \a true, then avoid stepping into code that doesn't have
552     ///     debug info, else step into any code regardless of whether it
553     ///     has debug info.
554     ///
555     /// @param[in] step_out_avoids_code_without_debug_info
556     ///     If \a true, then if you step out to code with no debug info, keep
557     ///     stepping out till you get to code with debug info.
558     ///
559     /// @return
560     ///     An error that describes anything that went wrong
561     //------------------------------------------------------------------
562     virtual Error
563     StepIn (bool source_step,
564             LazyBool step_in_avoids_code_without_debug_info = eLazyBoolCalculate,
565             LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
566
567     //------------------------------------------------------------------
568     /// Default implementation for stepping over.
569     ///
570     /// This function is designed to be used by commands where the
571     /// process is publicly stopped.
572     ///
573     /// @param[in] source_step
574     ///     If true and the frame has debug info, then do a source level
575     ///     step over, else do a single instruction step over.
576     ///
577     /// @return
578     ///     An error that describes anything that went wrong
579     //------------------------------------------------------------------
580     virtual Error
581     StepOver (bool source_step,
582               LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
583
584     //------------------------------------------------------------------
585     /// Default implementation for stepping out.
586     ///
587     /// This function is designed to be used by commands where the
588     /// process is publicly stopped.
589     ///
590     /// @return
591     ///     An error that describes anything that went wrong
592     //------------------------------------------------------------------
593     virtual Error
594     StepOut ();
595     //------------------------------------------------------------------
596     /// Retrieves the per-thread data area.
597     /// Most OSs maintain a per-thread pointer (e.g. the FS register on
598     /// x64), which we return the value of here.
599     ///
600     /// @return
601     ///     LLDB_INVALID_ADDRESS if not supported, otherwise the thread
602     ///     pointer value.
603     //------------------------------------------------------------------
604     virtual lldb::addr_t
605     GetThreadPointer ();
606
607     //------------------------------------------------------------------
608     /// Retrieves the per-module TLS block for a thread.
609     ///
610     /// @param[in] module
611     ///     The module to query TLS data for.
612     ///
613     /// @return
614     ///     If the thread has TLS data allocated for the
615     ///     module, the address of the TLS block. Otherwise
616     ///     LLDB_INVALID_ADDRESS is returned.
617     //------------------------------------------------------------------
618     virtual lldb::addr_t
619     GetThreadLocalData (const lldb::ModuleSP module);
620
621     //------------------------------------------------------------------
622     /// Check whether this thread is safe to run functions
623     ///
624     /// The SystemRuntime may know of certain thread states (functions in 
625     /// process of execution, for instance) which can make it unsafe for 
626     /// functions to be called.
627     ///
628     /// @return
629     ///     True if it is safe to call functions on this thread.
630     ///     False if function calls should be avoided on this thread.
631     //------------------------------------------------------------------
632     virtual bool
633     SafeToCallFunctions ();
634
635     //------------------------------------------------------------------
636     // Thread Plan Providers:
637     // This section provides the basic thread plans that the Process control
638     // machinery uses to run the target.  ThreadPlan.h provides more details on
639     // how this mechanism works.
640     // The thread provides accessors to a set of plans that perform basic operations.
641     // The idea is that particular Platform plugins can override these methods to
642     // provide the implementation of these basic operations appropriate to their
643     // environment.
644     //
645     // NB: All the QueueThreadPlanXXX providers return Shared Pointers to
646     // Thread plans.  This is useful so that you can modify the plans after
647     // creation in ways specific to that plan type.  Also, it is often necessary for
648     // ThreadPlans that utilize other ThreadPlans to implement their task to keep a shared
649     // pointer to the sub-plan.
650     // But besides that, the shared pointers should only be held onto by entities who live no longer
651     // than the thread containing the ThreadPlan.
652     // FIXME: If this becomes a problem, we can make a version that just returns a pointer,
653     // which it is clearly unsafe to hold onto, and a shared pointer version, and only allow
654     // ThreadPlan and Co. to use the latter.  That is made more annoying to do because there's
655     // no elegant way to friend a method to all sub-classes of a given class.
656     //
657     //------------------------------------------------------------------
658
659     //------------------------------------------------------------------
660     /// Queues the base plan for a thread.
661     /// The version returned by Process does some things that are useful,
662     /// like handle breakpoints and signals, so if you return a plugin specific
663     /// one you probably want to call through to the Process one for anything
664     /// your plugin doesn't explicitly handle.
665     ///
666     /// @param[in] abort_other_plans
667     ///    \b true if we discard the currently queued plans and replace them with this one.
668     ///    Otherwise this plan will go on the end of the plan stack.
669     ///
670     /// @return
671     ///     A shared pointer to the newly queued thread plan, or NULL if the plan could not be queued.
672     //------------------------------------------------------------------
673     virtual lldb::ThreadPlanSP
674     QueueFundamentalPlan (bool abort_other_plans);
675
676     //------------------------------------------------------------------
677     /// Queues the plan used to step one instruction from the current PC of \a thread.
678     ///
679     /// @param[in] step_over
680     ///    \b true if we step over calls to functions, false if we step in.
681     ///
682     /// @param[in] abort_other_plans
683     ///    \b true if we discard the currently queued plans and replace them with this one.
684     ///    Otherwise this plan will go on the end of the plan stack.
685     ///
686     /// @param[in] stop_other_threads
687     ///    \b true if we will stop other threads while we single step this one.
688     ///
689     /// @return
690     ///     A shared pointer to the newly queued thread plan, or NULL if the plan could not be queued.
691     //------------------------------------------------------------------
692     virtual lldb::ThreadPlanSP
693     QueueThreadPlanForStepSingleInstruction (bool step_over,
694                                              bool abort_other_plans,
695                                              bool stop_other_threads);
696
697     //------------------------------------------------------------------
698     /// Queues the plan used to step through an address range, stepping  over
699     /// function calls.
700     ///
701     /// @param[in] abort_other_plans
702     ///    \b true if we discard the currently queued plans and replace them with this one.
703     ///    Otherwise this plan will go on the end of the plan stack.
704     ///
705     /// @param[in] type
706     ///    Type of step to do, only eStepTypeInto and eStepTypeOver are supported by this plan.
707     ///
708     /// @param[in] range
709     ///    The address range to step through.
710     ///
711     /// @param[in] addr_context
712     ///    When dealing with stepping through inlined functions the current PC is not enough information to know
713     ///    what "step" means.  For instance a series of nested inline functions might start at the same address.
714     //     The \a addr_context provides the current symbol context the step
715     ///    is supposed to be out of.
716     //   FIXME: Currently unused.
717     ///
718     /// @param[in] stop_other_threads
719     ///    \b true if we will stop other threads while we single step this one.
720     ///
721     /// @param[in] step_out_avoids_code_without_debug_info
722     ///    If eLazyBoolYes, if the step over steps out it will continue to step out till it comes to a frame with debug info.
723     ///    If eLazyBoolCalculate, we will consult the default set in the thread.
724     ///
725     /// @return
726     ///     A shared pointer to the newly queued thread plan, or NULL if the plan could not be queued.
727     //------------------------------------------------------------------
728     virtual lldb::ThreadPlanSP
729     QueueThreadPlanForStepOverRange (bool abort_other_plans,
730                                      const AddressRange &range,
731                                      const SymbolContext &addr_context,
732                                      lldb::RunMode stop_other_threads,
733                                      LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
734
735     //------------------------------------------------------------------
736     /// Queues the plan used to step through an address range, stepping into functions.
737     ///
738     /// @param[in] abort_other_plans
739     ///    \b true if we discard the currently queued plans and replace them with this one.
740     ///    Otherwise this plan will go on the end of the plan stack.
741     ///
742     /// @param[in] type
743     ///    Type of step to do, only eStepTypeInto and eStepTypeOver are supported by this plan.
744     ///
745     /// @param[in] range
746     ///    The address range to step through.
747     ///
748     /// @param[in] addr_context
749     ///    When dealing with stepping through inlined functions the current PC is not enough information to know
750     ///    what "step" means.  For instance a series of nested inline functions might start at the same address.
751     //     The \a addr_context provides the current symbol context the step
752     ///    is supposed to be out of.
753     //   FIXME: Currently unused.
754     ///
755     /// @param[in] step_in_target
756     ///    Name if function we are trying to step into.  We will step out if we don't land in that function.
757     ///
758     /// @param[in] stop_other_threads
759     ///    \b true if we will stop other threads while we single step this one.
760     ///
761     /// @param[in] step_in_avoids_code_without_debug_info
762     ///    If eLazyBoolYes we will step out if we step into code with no debug info.
763     ///    If eLazyBoolCalculate we will consult the default set in the thread.
764     ///
765     /// @param[in] step_out_avoids_code_without_debug_info
766     ///    If eLazyBoolYes, if the step over steps out it will continue to step out till it comes to a frame with debug info.
767     ///    If eLazyBoolCalculate, it will consult the default set in the thread.
768     ///
769     /// @return
770     ///     A shared pointer to the newly queued thread plan, or NULL if the plan could not be queued.
771     //------------------------------------------------------------------
772     virtual lldb::ThreadPlanSP
773     QueueThreadPlanForStepInRange (bool abort_other_plans,
774                                    const AddressRange &range,
775                                    const SymbolContext &addr_context,
776                                    const char *step_in_target,
777                                    lldb::RunMode stop_other_threads,
778                                    LazyBool step_in_avoids_code_without_debug_info = eLazyBoolCalculate,
779                                    LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
780
781     //------------------------------------------------------------------
782     /// Queue the plan used to step out of the function at the current PC of
783     /// \a thread.
784     ///
785     /// @param[in] abort_other_plans
786     ///    \b true if we discard the currently queued plans and replace them with this one.
787     ///    Otherwise this plan will go on the end of the plan stack.
788     ///
789     /// @param[in] addr_context
790     ///    When dealing with stepping through inlined functions the current PC is not enough information to know
791     ///    what "step" means.  For instance a series of nested inline functions might start at the same address.
792     //     The \a addr_context provides the current symbol context the step
793     ///    is supposed to be out of.
794     //   FIXME: Currently unused.
795     ///
796     /// @param[in] first_insn
797     ///     \b true if this is the first instruction of a function.
798     ///
799     /// @param[in] stop_other_threads
800     ///    \b true if we will stop other threads while we single step this one.
801     ///
802     /// @param[in] stop_vote
803     /// @param[in] run_vote
804     ///    See standard meanings for the stop & run votes in ThreadPlan.h.
805     ///
806     /// @param[in] step_out_avoids_code_without_debug_info
807     ///    If eLazyBoolYes, if the step over steps out it will continue to step out till it comes to a frame with debug info.
808     ///    If eLazyBoolCalculate, it will consult the default set in the thread.
809     ///
810     /// @return
811     ///     A shared pointer to the newly queued thread plan, or NULL if the plan could not be queued.
812     //------------------------------------------------------------------
813     virtual lldb::ThreadPlanSP
814     QueueThreadPlanForStepOut (bool abort_other_plans,
815                                SymbolContext *addr_context,
816                                bool first_insn,
817                                bool stop_other_threads,
818                                Vote stop_vote, // = eVoteYes,
819                                Vote run_vote, // = eVoteNoOpinion);
820                                uint32_t frame_idx,
821                                LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
822
823     //------------------------------------------------------------------
824     /// Queue the plan used to step out of the function at the current PC of
825     /// a thread.  This version does not consult the should stop here callback, and should only
826     /// be used by other thread plans when they need to retain control of the step out.
827     ///
828     /// @param[in] abort_other_plans
829     ///    \b true if we discard the currently queued plans and replace them with this one.
830     ///    Otherwise this plan will go on the end of the plan stack.
831     ///
832     /// @param[in] addr_context
833     ///    When dealing with stepping through inlined functions the current PC is not enough information to know
834     ///    what "step" means.  For instance a series of nested inline functions might start at the same address.
835     //     The \a addr_context provides the current symbol context the step
836     ///    is supposed to be out of.
837     //   FIXME: Currently unused.
838     ///
839     /// @param[in] first_insn
840     ///     \b true if this is the first instruction of a function.
841     ///
842     /// @param[in] stop_other_threads
843     ///    \b true if we will stop other threads while we single step this one.
844     ///
845     /// @param[in] stop_vote
846     /// @param[in] run_vote
847     ///    See standard meanings for the stop & run votes in ThreadPlan.h.
848     ///
849     /// @return
850     ///     A shared pointer to the newly queued thread plan, or NULL if the plan could not be queued.
851     //------------------------------------------------------------------
852     virtual lldb::ThreadPlanSP
853     QueueThreadPlanForStepOutNoShouldStop (bool abort_other_plans,
854                                            SymbolContext *addr_context,
855                                            bool first_insn,
856                                            bool stop_other_threads,
857                                            Vote stop_vote, // = eVoteYes,
858                                            Vote run_vote, // = eVoteNoOpinion);
859                                            uint32_t frame_idx);
860
861     //------------------------------------------------------------------
862     /// Gets the plan used to step through the code that steps from a function
863     /// call site at the current PC into the actual function call.
864     ///
865     ///
866     /// @param[in] return_stack_id
867     ///    The stack id that we will return to (by setting backstop breakpoints on the return
868     ///    address to that frame) if we fail to step through.
869     ///
870     /// @param[in] abort_other_plans
871     ///    \b true if we discard the currently queued plans and replace them with this one.
872     ///    Otherwise this plan will go on the end of the plan stack.
873     ///
874     /// @param[in] stop_other_threads
875     ///    \b true if we will stop other threads while we single step this one.
876     ///
877     /// @return
878     ///     A shared pointer to the newly queued thread plan, or NULL if the plan could not be queued.
879     //------------------------------------------------------------------
880     virtual lldb::ThreadPlanSP
881     QueueThreadPlanForStepThrough (StackID &return_stack_id,
882                                    bool abort_other_plans,
883                                    bool stop_other_threads);
884
885     //------------------------------------------------------------------
886     /// Gets the plan used to continue from the current PC.
887     /// This is a simple plan, mostly useful as a backstop when you are continuing
888     /// for some particular purpose.
889     ///
890     /// @param[in] abort_other_plans
891     ///    \b true if we discard the currently queued plans and replace them with this one.
892     ///    Otherwise this plan will go on the end of the plan stack.
893     ///
894     /// @param[in] target_addr
895     ///    The address to which we're running.
896     ///
897     /// @param[in] stop_other_threads
898     ///    \b true if we will stop other threads while we single step this one.
899     ///
900     /// @return
901     ///     A shared pointer to the newly queued thread plan, or NULL if the plan could not be queued.
902     //------------------------------------------------------------------
903     virtual lldb::ThreadPlanSP
904     QueueThreadPlanForRunToAddress (bool abort_other_plans,
905                                     Address &target_addr,
906                                     bool stop_other_threads);
907
908     virtual lldb::ThreadPlanSP
909     QueueThreadPlanForStepUntil (bool abort_other_plans,
910                                  lldb::addr_t *address_list,
911                                  size_t num_addresses,
912                                  bool stop_others,
913                                  uint32_t frame_idx);
914
915     virtual lldb::ThreadPlanSP
916     QueueThreadPlanForStepScripted (bool abort_other_plans,
917                                     const char *class_name,
918                                     bool stop_other_threads);
919
920     //------------------------------------------------------------------
921     // Thread Plan accessors:
922     //------------------------------------------------------------------
923
924     //------------------------------------------------------------------
925     /// Gets the plan which will execute next on the plan stack.
926     ///
927     /// @return
928     ///     A pointer to the next executed plan.
929     //------------------------------------------------------------------
930     ThreadPlan *
931     GetCurrentPlan ();
932     
933     //------------------------------------------------------------------
934     /// Unwinds the thread stack for the innermost expression plan currently
935     /// on the thread plan stack.
936     ///
937     /// @return
938     ///     An error if the thread plan could not be unwound.
939     //------------------------------------------------------------------
940
941     Error
942     UnwindInnermostExpression();
943
944 private:
945     bool
946     PlanIsBasePlan (ThreadPlan *plan_ptr);
947     
948     void
949     BroadcastSelectedFrameChange(StackID &new_frame_id);
950     
951 public:
952
953     //------------------------------------------------------------------
954     /// Gets the outer-most plan that was popped off the plan stack in the
955     /// most recent stop.  Useful for printing the stop reason accurately.
956     ///
957     /// @return
958     ///     A pointer to the last completed plan.
959     //------------------------------------------------------------------
960     lldb::ThreadPlanSP
961     GetCompletedPlan ();
962
963     //------------------------------------------------------------------
964     /// Gets the outer-most return value from the completed plans
965     ///
966     /// @return
967     ///     A ValueObjectSP, either empty if there is no return value,
968     ///     or containing the return value.
969     //------------------------------------------------------------------
970     lldb::ValueObjectSP
971     GetReturnValueObject ();
972
973     //------------------------------------------------------------------
974     /// Gets the outer-most expression variable from the completed plans
975     ///
976     /// @return
977     ///     A ClangExpressionVariableSP, either empty if there is no
978     ///     plan completed an expression during the current stop
979     ///     or the expression variable that was made for the completed expression.
980     //------------------------------------------------------------------
981     lldb::ClangExpressionVariableSP
982     GetExpressionVariable ();
983
984     //------------------------------------------------------------------
985     ///  Checks whether the given plan is in the completed plans for this
986     ///  stop.
987     ///
988     /// @param[in] plan
989     ///     Pointer to the plan you're checking.
990     ///
991     /// @return
992     ///     Returns true if the input plan is in the completed plan stack,
993     ///     false otherwise.
994     //------------------------------------------------------------------
995     bool
996     IsThreadPlanDone (ThreadPlan *plan);
997
998     //------------------------------------------------------------------
999     ///  Checks whether the given plan is in the discarded plans for this
1000     ///  stop.
1001     ///
1002     /// @param[in] plan
1003     ///     Pointer to the plan you're checking.
1004     ///
1005     /// @return
1006     ///     Returns true if the input plan is in the discarded plan stack,
1007     ///     false otherwise.
1008     //------------------------------------------------------------------
1009     bool
1010     WasThreadPlanDiscarded (ThreadPlan *plan);
1011
1012     //------------------------------------------------------------------
1013     /// Queues a generic thread plan.
1014     ///
1015     /// @param[in] plan_sp
1016     ///    The plan to queue.
1017     ///
1018     /// @param[in] abort_other_plans
1019     ///    \b true if we discard the currently queued plans and replace them with this one.
1020     ///    Otherwise this plan will go on the end of the plan stack.
1021     ///
1022     /// @return
1023     ///     A pointer to the last completed plan.
1024     //------------------------------------------------------------------
1025     void
1026     QueueThreadPlan (lldb::ThreadPlanSP &plan_sp, bool abort_other_plans);
1027
1028
1029     //------------------------------------------------------------------
1030     /// Discards the plans queued on the plan stack of the current thread.  This is
1031     /// arbitrated by the "Master" ThreadPlans, using the "OkayToDiscard" call.
1032     //  But if \a force is true, all thread plans are discarded.
1033     //------------------------------------------------------------------
1034     void
1035     DiscardThreadPlans (bool force);
1036
1037     //------------------------------------------------------------------
1038     /// Discards the plans queued on the plan stack of the current thread up to and
1039     /// including up_to_plan_sp.
1040     //
1041     // @param[in] up_to_plan_sp
1042     //   Discard all plans up to and including this one.
1043     //------------------------------------------------------------------
1044     void
1045     DiscardThreadPlansUpToPlan (lldb::ThreadPlanSP &up_to_plan_sp);
1046
1047     void
1048     DiscardThreadPlansUpToPlan (ThreadPlan *up_to_plan_ptr);
1049
1050     //------------------------------------------------------------------
1051     /// Discards the plans queued on the plan stack of the current thread up to and
1052     /// including the plan in that matches \a thread_index counting only
1053     /// the non-Private plans.
1054     ///
1055     /// @param[in] up_to_plan_sp
1056     ///   Discard all plans up to and including this user plan given by this index.
1057     ///
1058     /// @return
1059     ///    \b true if there was a thread plan with that user index, \b false otherwise.
1060     //------------------------------------------------------------------
1061     bool
1062     DiscardUserThreadPlansUpToIndex (uint32_t thread_index);
1063     
1064     //------------------------------------------------------------------
1065     /// Prints the current plan stack.
1066     ///
1067     /// @param[in] s
1068     ///    The stream to which to dump the plan stack info.
1069     ///
1070     //------------------------------------------------------------------
1071     void
1072     DumpThreadPlans (Stream *s,
1073                      lldb::DescriptionLevel desc_level = lldb::eDescriptionLevelVerbose,
1074                      bool include_internal = true,
1075                      bool ignore_boring = false) const;
1076     
1077     virtual bool
1078     CheckpointThreadState (ThreadStateCheckpoint &saved_state);
1079     
1080     virtual bool
1081     RestoreRegisterStateFromCheckpoint (ThreadStateCheckpoint &saved_state);
1082     
1083     virtual bool
1084     RestoreThreadStateFromCheckpoint (ThreadStateCheckpoint &saved_state);
1085     
1086     void
1087     EnableTracer (bool value, bool single_step);
1088     
1089     void
1090     SetTracer (lldb::ThreadPlanTracerSP &tracer_sp);
1091
1092     //------------------------------------------------------------------
1093     // Get the thread index ID. The index ID that is guaranteed to not
1094     // be re-used by a process. They start at 1 and increase with each
1095     // new thread. This allows easy command line access by a unique ID
1096     // that is easier to type than the actual system thread ID.
1097     //------------------------------------------------------------------
1098     uint32_t
1099     GetIndexID () const;
1100
1101     //------------------------------------------------------------------
1102     // Get the originating thread's index ID. 
1103     // In the case of an "extended" thread -- a thread which represents
1104     // the stack that enqueued/spawned work that is currently executing --
1105     // we need to provide the IndexID of the thread that actually did
1106     // this work.  We don't want to just masquerade as that thread's IndexID
1107     // by using it in our own IndexID because that way leads to madness -
1108     // but the driver program which is iterating over extended threads 
1109     // may ask for the OriginatingThreadID to display that information
1110     // to the user. 
1111     // Normal threads will return the same thing as GetIndexID();
1112     //------------------------------------------------------------------
1113     virtual uint32_t
1114     GetExtendedBacktraceOriginatingIndexID ()
1115     {
1116         return GetIndexID ();
1117     }
1118
1119     //------------------------------------------------------------------
1120     // The API ID is often the same as the Thread::GetID(), but not in
1121     // all cases. Thread::GetID() is the user visible thread ID that
1122     // clients would want to see. The API thread ID is the thread ID
1123     // that is used when sending data to/from the debugging protocol.
1124     //------------------------------------------------------------------
1125     virtual lldb::user_id_t
1126     GetProtocolID () const
1127     {
1128         return GetID();
1129     }
1130
1131     //------------------------------------------------------------------
1132     // lldb::ExecutionContextScope pure virtual functions
1133     //------------------------------------------------------------------
1134     virtual lldb::TargetSP
1135     CalculateTarget ();
1136     
1137     virtual lldb::ProcessSP
1138     CalculateProcess ();
1139     
1140     virtual lldb::ThreadSP
1141     CalculateThread ();
1142     
1143     virtual lldb::StackFrameSP
1144     CalculateStackFrame ();
1145
1146     virtual void
1147     CalculateExecutionContext (ExecutionContext &exe_ctx);
1148     
1149     lldb::StackFrameSP
1150     GetStackFrameSPForStackFramePtr (StackFrame *stack_frame_ptr);
1151     
1152     size_t
1153     GetStatus (Stream &strm, 
1154                uint32_t start_frame, 
1155                uint32_t num_frames,
1156                uint32_t num_frames_with_source);
1157
1158     size_t
1159     GetStackFrameStatus (Stream& strm,
1160                          uint32_t first_frame,
1161                          uint32_t num_frames,
1162                          bool show_frame_info,
1163                          uint32_t num_frames_with_source);
1164
1165     // We need a way to verify that even though we have a thread in a shared
1166     // pointer that the object itself is still valid. Currently this won't be
1167     // the case if DestroyThread() was called. DestroyThread is called when
1168     // a thread has been removed from the Process' thread list.
1169     bool
1170     IsValid () const
1171     {
1172         return !m_destroy_called;
1173     }
1174
1175     // Sets and returns a valid stop info based on the process stop ID and the
1176     // current thread plan. If the thread stop ID does not match the process'
1177     // stop ID, the private stop reason is not set and an invalid StopInfoSP may
1178     // be returned.
1179     //
1180     // NOTE: This function must be called before the current thread plan is
1181     // moved to the completed plan stack (in Thread::ShouldStop()).
1182     //
1183     // NOTE: If subclasses override this function, ensure they do not overwrite
1184     // the m_actual_stop_info if it is valid.  The stop info may be a
1185     // "checkpointed and restored" stop info, so if it is still around it is
1186     // right even if you have not calculated this yourself, or if it disagrees
1187     // with what you might have calculated.
1188     virtual lldb::StopInfoSP
1189     GetPrivateStopInfo ();
1190
1191     //----------------------------------------------------------------------
1192     // Ask the thread subclass to set its stop info.
1193     //
1194     // Thread subclasses should call Thread::SetStopInfo(...) with the
1195     // reason the thread stopped.
1196     //
1197     // @return
1198     //      True if Thread::SetStopInfo(...) was called, false otherwise.
1199     //----------------------------------------------------------------------
1200     virtual bool
1201     CalculateStopInfo () = 0;
1202
1203     //----------------------------------------------------------------------
1204     // Gets the temporary resume state for a thread.
1205     //
1206     // This value gets set in each thread by complex debugger logic in
1207     // Thread::ShouldResume() and an appropriate thread resume state will get
1208     // set in each thread every time the process is resumed prior to calling
1209     // Process::DoResume(). The lldb_private::Process subclass should adhere
1210     // to the thread resume state request which will be one of:
1211     //
1212     //  eStateRunning   - thread will resume when process is resumed
1213     //  eStateStepping  - thread should step 1 instruction and stop when process
1214     //                    is resumed
1215     //  eStateSuspended - thread should not execute any instructions when
1216     //                    process is resumed
1217     //----------------------------------------------------------------------
1218     lldb::StateType
1219     GetTemporaryResumeState() const
1220     {
1221         return m_temporary_resume_state;
1222     }
1223
1224     void
1225     SetStopInfo (const lldb::StopInfoSP &stop_info_sp);
1226
1227     void
1228     SetShouldReportStop (Vote vote);
1229
1230     //----------------------------------------------------------------------
1231     /// Sets the extended backtrace token for this thread
1232     ///
1233     /// Some Thread subclasses may maintain a token to help with providing
1234     /// an extended backtrace.  The SystemRuntime plugin will set/request this.
1235     ///
1236     /// @param [in] token
1237     //----------------------------------------------------------------------
1238     virtual void
1239     SetExtendedBacktraceToken (uint64_t token) { }
1240
1241     //----------------------------------------------------------------------
1242     /// Gets the extended backtrace token for this thread
1243     ///
1244     /// Some Thread subclasses may maintain a token to help with providing
1245     /// an extended backtrace.  The SystemRuntime plugin will set/request this.
1246     ///
1247     /// @return
1248     ///     The token needed by the SystemRuntime to create an extended backtrace.
1249     ///     LLDB_INVALID_ADDRESS is returned if no token is available.
1250     //----------------------------------------------------------------------
1251     virtual uint64_t
1252     GetExtendedBacktraceToken ()
1253     {
1254         return LLDB_INVALID_ADDRESS;
1255     }
1256
1257 protected:
1258
1259     friend class ThreadPlan;
1260     friend class ThreadList;
1261     friend class ThreadEventData;
1262     friend class StackFrameList;
1263     friend class StackFrame;
1264     friend class OperatingSystem;
1265     
1266     // This is necessary to make sure thread assets get destroyed while the thread is still in good shape
1267     // to call virtual thread methods.  This must be called by classes that derive from Thread in their destructor.
1268     virtual void DestroyThread ();
1269
1270     void
1271     PushPlan (lldb::ThreadPlanSP &plan_sp);
1272
1273     void
1274     PopPlan ();
1275
1276     void
1277     DiscardPlan ();
1278
1279     ThreadPlan *GetPreviousPlan (ThreadPlan *plan);
1280
1281     typedef std::vector<lldb::ThreadPlanSP> plan_stack;
1282
1283     virtual lldb_private::Unwind *
1284     GetUnwinder ();
1285
1286     // Check to see whether the thread is still at the last breakpoint hit that stopped it.
1287     virtual bool
1288     IsStillAtLastBreakpointHit();
1289
1290     // Some threads are threads that are made up by OperatingSystem plugins that
1291     // are threads that exist and are context switched out into memory. The
1292     // OperatingSystem plug-in need a ways to know if a thread is "real" or made
1293     // up.
1294     virtual bool
1295     IsOperatingSystemPluginThread () const
1296     {
1297         return false;
1298     }
1299     
1300     // Subclasses that have a way to get an extended info dictionary for this thread should
1301     // fill 
1302     virtual lldb_private::StructuredData::ObjectSP
1303     FetchThreadExtendedInfo ()
1304     {
1305         return StructuredData::ObjectSP();
1306     }
1307
1308     lldb::StackFrameListSP
1309     GetStackFrameList ();
1310     
1311
1312     //------------------------------------------------------------------
1313     // Classes that inherit from Process can see and modify these
1314     //------------------------------------------------------------------
1315     lldb::ProcessWP     m_process_wp;           ///< The process that owns this thread.
1316     lldb::StopInfoSP    m_stop_info_sp;         ///< The private stop reason for this thread
1317     uint32_t            m_stop_info_stop_id;    // This is the stop id for which the StopInfo is valid.  Can use this so you know that
1318     uint32_t            m_stop_info_override_stop_id;    // The stop ID containing the last time the stop info was checked against the stop info override
1319     // the thread's m_stop_info_sp is current and you don't have to fetch it again
1320     const uint32_t      m_index_id;             ///< A unique 1 based index assigned to each thread for easy UI/command line access.
1321     lldb::RegisterContextSP m_reg_context_sp;   ///< The register context for this thread's current register state.
1322     lldb::StateType     m_state;                ///< The state of our process.
1323     mutable Mutex       m_state_mutex;          ///< Multithreaded protection for m_state.
1324     plan_stack          m_plan_stack;           ///< The stack of plans this thread is executing.
1325     plan_stack          m_completed_plan_stack; ///< Plans that have been completed by this stop.  They get deleted when the thread resumes.
1326     plan_stack          m_discarded_plan_stack; ///< Plans that have been discarded by this stop.  They get deleted when the thread resumes.
1327     mutable Mutex       m_frame_mutex;          ///< Multithreaded protection for m_state.
1328     lldb::StackFrameListSP m_curr_frames_sp;    ///< The stack frames that get lazily populated after a thread stops.
1329     lldb::StackFrameListSP m_prev_frames_sp;    ///< The previous stack frames from the last time this thread stopped.
1330     int                 m_resume_signal;        ///< The signal that should be used when continuing this thread.
1331     lldb::StateType     m_resume_state;         ///< This state is used to force a thread to be suspended from outside the ThreadPlan logic.
1332     lldb::StateType     m_temporary_resume_state; ///< This state records what the thread was told to do by the thread plan logic for the current resume.
1333                                                   /// It gets set in Thread::ShouldResume.
1334     std::unique_ptr<lldb_private::Unwind> m_unwinder_ap;
1335     bool                m_destroy_called;       // This is used internally to make sure derived Thread classes call DestroyThread.
1336     LazyBool            m_override_should_notify;
1337 private:
1338     bool                m_extended_info_fetched;  // Have we tried to retrieve the m_extended_info for this thread?
1339     StructuredData::ObjectSP m_extended_info;     // The extended info for this thread
1340     //------------------------------------------------------------------
1341     // For Thread only
1342     //------------------------------------------------------------------
1343
1344     DISALLOW_COPY_AND_ASSIGN (Thread);
1345
1346 };
1347
1348 } // namespace lldb_private
1349
1350 #endif  // liblldb_Thread_h_