<div dir="ltr">This broke the CMake build and all the bots using it. Are you working on a fix? I will revert if not.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 1, 2014 at 1:43 PM, Enrico Granata <span dir="ltr"><<a href="mailto:egranata@apple.com" target="_blank">egranata@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: enrico<br>
Date: Wed Oct 1 15:43:45 2014<br>
New Revision: 218808<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=218808&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=218808&view=rev</a><br>
Log:<br>
Add a new SBExecutionContext class that wraps an ExecutionContextRef. This class is a convenient way at the API level to package a target,process,thread and frame all together - or just a subset of those<br>
<br>
Added:<br>
lldb/trunk/include/lldb/API/SBExecutionContext.h<br>
lldb/trunk/scripts/Python/interface/SBExecutionContext.i<br>
lldb/trunk/source/API/SBExecutionContext.cpp<br>
Modified:<br>
lldb/trunk/include/lldb/API/LLDB.h<br>
lldb/trunk/include/lldb/API/SBDefines.h<br>
lldb/trunk/include/lldb/API/SBFrame.h<br>
lldb/trunk/include/lldb/API/SBProcess.h<br>
lldb/trunk/include/lldb/API/SBTarget.h<br>
lldb/trunk/include/lldb/API/SBThread.h<br>
lldb/trunk/lldb.xcodeproj/project.pbxproj<br>
lldb/trunk/scripts/Python/build-swig-Python.sh<br>
lldb/trunk/scripts/lldb.swig<br>
<br>
Modified: lldb/trunk/include/lldb/API/LLDB.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/LLDB.h?rev=218808&r1=218807&r2=218808&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/LLDB.h?rev=218808&r1=218807&r2=218808&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/include/lldb/API/LLDB.h (original)<br>
+++ lldb/trunk/include/lldb/API/LLDB.h Wed Oct 1 15:43:45 2014<br>
@@ -29,6 +29,7 @@<br>
#include "lldb/API/SBDeclaration.h"<br>
#include "lldb/API/SBError.h"<br>
#include "lldb/API/SBEvent.h"<br>
+#include "lldb/API/SBExecutionContext.h"<br>
#include "lldb/API/SBFileSpec.h"<br>
#include "lldb/API/SBFrame.h"<br>
#include "lldb/API/SBFunction.h"<br>
<br>
Modified: lldb/trunk/include/lldb/API/SBDefines.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBDefines.h?rev=218808&r1=218807&r2=218808&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBDefines.h?rev=218808&r1=218807&r2=218808&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/include/lldb/API/SBDefines.h (original)<br>
+++ lldb/trunk/include/lldb/API/SBDefines.h Wed Oct 1 15:43:45 2014<br>
@@ -45,6 +45,7 @@ class LLDB_API SBDeclaration;<br>
class LLDB_API SBError;<br>
class LLDB_API SBEvent;<br>
class LLDB_API SBEventList;<br>
+class LLDB_API SBExecutionContext;<br>
class LLDB_API SBExpressionOptions;<br>
class LLDB_API SBFileSpec;<br>
class LLDB_API SBFileSpecList;<br>
<br>
Added: lldb/trunk/include/lldb/API/SBExecutionContext.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBExecutionContext.h?rev=218808&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBExecutionContext.h?rev=218808&view=auto</a><br>
==============================================================================<br>
--- lldb/trunk/include/lldb/API/SBExecutionContext.h (added)<br>
+++ lldb/trunk/include/lldb/API/SBExecutionContext.h Wed Oct 1 15:43:45 2014<br>
@@ -0,0 +1,70 @@<br>
+//===-- SBExecutionContext.h -----------------------------------------*- C++ -*-===//<br>
+//<br>
+// The LLVM Compiler Infrastructure<br>
+//<br>
+// This file is distributed under the University of Illinois Open Source<br>
+// License. See LICENSE.TXT for details.<br>
+//<br>
+//===----------------------------------------------------------------------===//<br>
+<br>
+#ifndef LLDB_SBExecutionContext_h_<br>
+#define LLDB_SBExecutionContext_h_<br>
+<br>
+#include "lldb/API/SBDefines.h"<br>
+<br>
+#include <stdio.h><br>
+#include <vector><br>
+<br>
+<br>
+namespace lldb {<br>
+<br>
+class SBExecutionContext<br>
+{<br>
+public:<br>
+ SBExecutionContext();<br>
+<br>
+ SBExecutionContext (const lldb::SBExecutionContext &rhs);<br>
+<br>
+ SBExecutionContext (const lldb::SBTarget &target);<br>
+<br>
+ SBExecutionContext (const lldb::SBProcess &process);<br>
+<br>
+ SBExecutionContext (lldb::SBThread thread); // can't be a const& because SBThread::get() isn't itself a const function<br>
+<br>
+ SBExecutionContext (const lldb::SBFrame &frame);<br>
+<br>
+ ~SBExecutionContext();<br>
+<br>
+ const SBExecutionContext &<br>
+ operator = (const lldb::SBExecutionContext &rhs);<br>
+<br>
+ SBTarget<br>
+ GetTarget () const;<br>
+<br>
+ SBProcess<br>
+ GetProcess () const;<br>
+<br>
+ SBThread<br>
+ GetThread () const;<br>
+<br>
+ SBFrame<br>
+ GetFrame () const;<br>
+<br>
+protected:<br>
+ ExecutionContextRefSP &<br>
+ GetSP () const;<br>
+<br>
+ void<br>
+ reset (lldb::ExecutionContextRefSP &event_sp);<br>
+<br>
+ lldb_private::ExecutionContextRef *<br>
+ get () const;<br>
+<br>
+private:<br>
+<br>
+ mutable lldb::ExecutionContextRefSP m_exe_ctx_sp;<br>
+};<br>
+<br>
+} // namespace lldb<br>
+<br>
+#endif // LLDB_SBExecutionContext_h_<br>
<br>
Modified: lldb/trunk/include/lldb/API/SBFrame.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFrame.h?rev=218808&r1=218807&r2=218808&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFrame.h?rev=218808&r1=218807&r2=218808&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/include/lldb/API/SBFrame.h (original)<br>
+++ lldb/trunk/include/lldb/API/SBFrame.h Wed Oct 1 15:43:45 2014<br>
@@ -206,6 +206,7 @@ public:<br>
protected:<br>
<br>
friend class SBBlock;<br>
+ friend class SBExecutionContext;<br>
friend class SBInstruction;<br>
friend class SBThread;<br>
friend class SBValue;<br>
<br>
Modified: lldb/trunk/include/lldb/API/SBProcess.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBProcess.h?rev=218808&r1=218807&r2=218808&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBProcess.h?rev=218808&r1=218807&r2=218808&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/include/lldb/API/SBProcess.h (original)<br>
+++ lldb/trunk/include/lldb/API/SBProcess.h Wed Oct 1 15:43:45 2014<br>
@@ -326,6 +326,7 @@ protected:<br>
friend class SBBreakpointLocation;<br>
friend class SBCommandInterpreter;<br>
friend class SBDebugger;<br>
+ friend class SBExecutionContext;<br>
friend class SBFunction;<br>
friend class SBModule;<br>
friend class SBTarget;<br>
<br>
Modified: lldb/trunk/include/lldb/API/SBTarget.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTarget.h?rev=218808&r1=218807&r2=218808&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTarget.h?rev=218808&r1=218807&r2=218808&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/include/lldb/API/SBTarget.h (original)<br>
+++ lldb/trunk/include/lldb/API/SBTarget.h Wed Oct 1 15:43:45 2014<br>
@@ -933,6 +933,7 @@ protected:<br>
friend class SBAddress;<br>
friend class SBBlock;<br>
friend class SBDebugger;<br>
+ friend class SBExecutionContext;<br>
friend class SBFunction;<br>
friend class SBInstruction;<br>
friend class SBModule;<br>
<br>
Modified: lldb/trunk/include/lldb/API/SBThread.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBThread.h?rev=218808&r1=218807&r2=218808&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBThread.h?rev=218808&r1=218807&r2=218808&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/include/lldb/API/SBThread.h (original)<br>
+++ lldb/trunk/include/lldb/API/SBThread.h Wed Oct 1 15:43:45 2014<br>
@@ -231,6 +231,7 @@ public:<br>
protected:<br>
friend class SBBreakpoint;<br>
friend class SBBreakpointLocation;<br>
+ friend class SBExecutionContext;<br>
friend class SBFrame;<br>
friend class SBProcess;<br>
friend class SBDebugger;<br>
<br>
Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=218808&r1=218807&r2=218808&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=218808&r1=218807&r2=218808&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)<br>
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Oct 1 15:43:45 2014<br>
@@ -639,6 +639,7 @@<br>
8CCB018219BA4E270009FD44 /* SBThreadCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CCB018119BA4E210009FD44 /* SBThreadCollection.h */; settings = {ATTRIBUTES = (Public, ); }; };<br>
8CCB018319BA51BF0009FD44 /* SBThreadCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CCB017F19BA4DD00009FD44 /* SBThreadCollection.cpp */; };<br>
94094C6B163B6F840083A547 /* ValueObjectCast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94094C69163B6CD90083A547 /* ValueObjectCast.cpp */; };<br>
+ 940B02F619DC96E700AD0F52 /* SBExecutionContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 940B02F519DC96E700AD0F52 /* SBExecutionContext.cpp */; };<br>
94145431175E63B500284436 /* lldb-versioning.h in Headers */ = {isa = PBXBuildFile; fileRef = 94145430175D7FDE00284436 /* lldb-versioning.h */; settings = {ATTRIBUTES = (Public, ); }; };<br>
941BCC7F14E48C4000BB969C /* SBTypeFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 9461568614E355F2003A195C /* SBTypeFilter.h */; settings = {ATTRIBUTES = (Public, ); }; };<br>
941BCC8014E48C4000BB969C /* SBTypeFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 9461568714E355F2003A195C /* SBTypeFormat.h */; settings = {ATTRIBUTES = (Public, ); }; };<br>
@@ -1970,6 +1971,9 @@<br>
94031A9F13CF5B3D00DCFF3C /* PriorityPointerPair.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PriorityPointerPair.h; path = include/lldb/Utility/PriorityPointerPair.h; sourceTree = "<group>"; };<br>
94094C68163B6CCC0083A547 /* ValueObjectCast.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ValueObjectCast.h; path = include/lldb/Core/ValueObjectCast.h; sourceTree = "<group>"; };<br>
94094C69163B6CD90083A547 /* ValueObjectCast.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectCast.cpp; path = source/Core/ValueObjectCast.cpp; sourceTree = "<group>"; };<br>
+ 940B02F419DC96CB00AD0F52 /* SBExecutionContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBExecutionContext.h; path = include/lldb/API/SBExecutionContext.h; sourceTree = "<group>"; };<br>
+ 940B02F519DC96E700AD0F52 /* SBExecutionContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBExecutionContext.cpp; path = source/API/SBExecutionContext.cpp; sourceTree = "<group>"; };<br>
+ 940B02F719DC970900AD0F52 /* SBExecutionContext.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBExecutionContext.i; sourceTree = "<group>"; };<br>
94145430175D7FDE00284436 /* lldb-versioning.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "lldb-versioning.h"; path = "include/lldb/lldb-versioning.h"; sourceTree = "<group>"; };<br>
94380B8019940B0300BFE4A8 /* StringLexer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StringLexer.h; path = include/lldb/Utility/StringLexer.h; sourceTree = "<group>"; };<br>
94380B8119940B0A00BFE4A8 /* StringLexer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringLexer.cpp; path = source/Utility/StringLexer.cpp; sourceTree = "<group>"; };<br>
@@ -2653,6 +2657,7 @@<br>
9452573616262CD000325455 /* SBDeclaration.i */,<br>
2611FEFA142D83060017FEA3 /* SBError.i */,<br>
2611FEFB142D83060017FEA3 /* SBEvent.i */,<br>
+ 940B02F719DC970900AD0F52 /* SBExecutionContext.i */,<br>
2611FEFC142D83060017FEA3 /* SBFileSpec.i */,<br>
2611FEFD142D83060017FEA3 /* SBFileSpecList.i */,<br>
2611FEFE142D83060017FEA3 /* SBFrame.i */,<br>
@@ -2744,6 +2749,8 @@<br>
2682F284115EF3A700CCFF99 /* SBError.cpp */,<br>
9A9830FE1125FC5800A56CB0 /* SBEvent.h */,<br>
9A9830FD1125FC5800A56CB0 /* SBEvent.cpp */,<br>
+ 940B02F419DC96CB00AD0F52 /* SBExecutionContext.h */,<br>
+ 940B02F519DC96E700AD0F52 /* SBExecutionContext.cpp */,<br>
4CE4F672162C971A00F75CB3 /* SBExpressionOptions.h */,<br>
4CE4F674162C973F00F75CB3 /* SBExpressionOptions.cpp */,<br>
26022531115F27FA00A601A2 /* SBFileSpec.h */,<br>
@@ -4876,6 +4883,7 @@<br>
9461569B14E358A6003A195C /* SBTypeFormat.cpp in Sources */,<br>
262F12B51835468600AEB384 /* SBPlatform.cpp in Sources */,<br>
9461569C14E358A6003A195C /* SBTypeSummary.cpp in Sources */,<br>
+ 940B02F619DC96E700AD0F52 /* SBExecutionContext.cpp in Sources */,<br>
9461569D14E358A6003A195C /* SBTypeSynthetic.cpp in Sources */,<br>
26680324116005D9008E1FE4 /* SBThread.cpp in Sources */,<br>
26680326116005DB008E1FE4 /* SBTarget.cpp in Sources */,<br>
<br>
Modified: lldb/trunk/scripts/Python/build-swig-Python.sh<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/build-swig-Python.sh?rev=218808&r1=218807&r2=218808&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/build-swig-Python.sh?rev=218808&r1=218807&r2=218808&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/scripts/Python/build-swig-Python.sh (original)<br>
+++ lldb/trunk/scripts/Python/build-swig-Python.sh Wed Oct 1 15:43:45 2014<br>
@@ -91,6 +91,7 @@ HEADER_FILES="${SRC_ROOT}/include/lldb/l<br>
" ${SRC_ROOT}/include/lldb/API/SBDebugger.h"\<br>
" ${SRC_ROOT}/include/lldb/API/SBError.h"\<br>
" ${SRC_ROOT}/include/lldb/API/SBEvent.h"\<br>
+" ${SRC_ROOT}/include/lldb/API/SBExecutionContext.h"\<br>
" ${SRC_ROOT}/include/lldb/API/SBExpressionOptions.h"\<br>
" ${SRC_ROOT}/include/lldb/API/SBFileSpec.h"\<br>
" ${SRC_ROOT}/include/lldb/API/SBFrame.h"\<br>
@@ -141,6 +142,7 @@ INTERFACE_FILES="${SRC_ROOT}/scripts/Pyt<br>
" ${SRC_ROOT}/scripts/Python/interface/SBDeclaration.i"\<br>
" ${SRC_ROOT}/scripts/Python/interface/SBError.i"\<br>
" ${SRC_ROOT}/scripts/Python/interface/SBEvent.i"\<br>
+" ${SRC_ROOT}/scripts/Python/interface/SBExecutionContext.i"\<br>
" ${SRC_ROOT}/scripts/Python/interface/SBExpressionOptions.i"\<br>
" ${SRC_ROOT}/scripts/Python/interface/SBFileSpec.i"\<br>
" ${SRC_ROOT}/scripts/Python/interface/SBFrame.i"\<br>
<br>
Added: lldb/trunk/scripts/Python/interface/SBExecutionContext.i<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBExecutionContext.i?rev=218808&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBExecutionContext.i?rev=218808&view=auto</a><br>
==============================================================================<br>
--- lldb/trunk/scripts/Python/interface/SBExecutionContext.i (added)<br>
+++ lldb/trunk/scripts/Python/interface/SBExecutionContext.i Wed Oct 1 15:43:45 2014<br>
@@ -0,0 +1,42 @@<br>
+//===-- SWIG Interface for SBExecutionContext ---------------------*- C++ -*-===//<br>
+//<br>
+// The LLVM Compiler Infrastructure<br>
+//<br>
+// This file is distributed under the University of Illinois Open Source<br>
+// License. See LICENSE.TXT for details.<br>
+//<br>
+//===----------------------------------------------------------------------===//<br>
+<br>
+namespace lldb {<br>
+<br>
+class SBExecutionContext<br>
+{<br>
+public:<br>
+ SBExecutionContext();<br>
+<br>
+ SBExecutionContext (const lldb::SBExecutionContext &rhs);<br>
+<br>
+ SBExecutionContext (const lldb::SBTarget &target);<br>
+<br>
+ SBExecutionContext (const lldb::SBProcess &process);<br>
+<br>
+ SBExecutionContext (lldb::SBThread thread); // can't be a const& because SBThread::get() isn't itself a const function<br>
+<br>
+ SBExecutionContext (const lldb::SBFrame &frame);<br>
+<br>
+ ~SBExecutionContext();<br>
+<br>
+ SBTarget<br>
+ GetTarget () const;<br>
+<br>
+ SBProcess<br>
+ GetProcess () const;<br>
+<br>
+ SBThread<br>
+ GetThread () const;<br>
+<br>
+ SBFrame<br>
+ GetFrame () const;<br>
+};<br>
+<br>
+} // namespace lldb<br>
<br>
Modified: lldb/trunk/scripts/lldb.swig<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/lldb.swig?rev=218808&r1=218807&r2=218808&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/lldb.swig?rev=218808&r1=218807&r2=218808&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/scripts/lldb.swig (original)<br>
+++ lldb/trunk/scripts/lldb.swig Wed Oct 1 15:43:45 2014<br>
@@ -66,6 +66,7 @@ import os<br>
#include "lldb/API/SBDeclaration.h"<br>
#include "lldb/API/SBError.h"<br>
#include "lldb/API/SBEvent.h"<br>
+#include "lldb/API/SBExecutionContext.h"<br>
#include "lldb/API/SBExpressionOptions.h"<br>
#include "lldb/API/SBFileSpec.h"<br>
#include "lldb/API/SBFileSpecList.h"<br>
@@ -139,6 +140,7 @@ import os<br>
%include "./Python/interface/SBDeclaration.i"<br>
%include "./Python/interface/SBError.i"<br>
%include "./Python/interface/SBEvent.i"<br>
+%include "./Python/interface/SBExecutionContext.i"<br>
%include "./Python/interface/SBExpressionOptions.i"<br>
%include "./Python/interface/SBFileSpec.i"<br>
%include "./Python/interface/SBFileSpecList.i"<br>
<br>
Added: lldb/trunk/source/API/SBExecutionContext.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBExecutionContext.cpp?rev=218808&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBExecutionContext.cpp?rev=218808&view=auto</a><br>
==============================================================================<br>
--- lldb/trunk/source/API/SBExecutionContext.cpp (added)<br>
+++ lldb/trunk/source/API/SBExecutionContext.cpp Wed Oct 1 15:43:45 2014<br>
@@ -0,0 +1,118 @@<br>
+//===-- SBExecutionContext.cpp ------------------------------------*- C++ -*-===//<br>
+//<br>
+// The LLVM Compiler Infrastructure<br>
+//<br>
+// This file is distributed under the University of Illinois Open Source<br>
+// License. See LICENSE.TXT for details.<br>
+//<br>
+//===----------------------------------------------------------------------===//<br>
+<br>
+#include "lldb/API/SBExecutionContext.h"<br>
+<br>
+#include "lldb/API/SBTarget.h"<br>
+#include "lldb/API/SBProcess.h"<br>
+#include "lldb/API/SBThread.h"<br>
+#include "lldb/API/SBFrame.h"<br>
+<br>
+#include "lldb/Target/ExecutionContext.h"<br>
+<br>
+using namespace lldb;<br>
+using namespace lldb_private;<br>
+<br>
+SBExecutionContext::SBExecutionContext() :<br>
+m_exe_ctx_sp()<br>
+{<br>
+}<br>
+<br>
+SBExecutionContext::SBExecutionContext (const lldb::SBExecutionContext &rhs) :<br>
+m_exe_ctx_sp(rhs.m_exe_ctx_sp)<br>
+{<br>
+}<br>
+<br>
+SBExecutionContext::SBExecutionContext (const lldb::SBTarget &target) :<br>
+m_exe_ctx_sp(new ExecutionContextRef())<br>
+{<br>
+ m_exe_ctx_sp->SetTargetSP(target.GetSP());<br>
+}<br>
+<br>
+SBExecutionContext::SBExecutionContext (const lldb::SBProcess &process) :<br>
+m_exe_ctx_sp(new ExecutionContextRef())<br>
+{<br>
+ m_exe_ctx_sp->SetProcessSP(process.GetSP());<br>
+}<br>
+<br>
+SBExecutionContext::SBExecutionContext (lldb::SBThread thread) :<br>
+m_exe_ctx_sp(new ExecutionContextRef())<br>
+{<br>
+ m_exe_ctx_sp->SetThreadPtr(thread.get());<br>
+}<br>
+<br>
+SBExecutionContext::SBExecutionContext (const lldb::SBFrame &frame) :<br>
+m_exe_ctx_sp(new ExecutionContextRef())<br>
+{<br>
+ m_exe_ctx_sp->SetFrameSP(frame.GetFrameSP());<br>
+}<br>
+<br>
+SBExecutionContext::~SBExecutionContext()<br>
+{<br>
+}<br>
+<br>
+const SBExecutionContext &<br>
+SBExecutionContext::operator = (const lldb::SBExecutionContext &rhs)<br>
+{<br>
+ m_exe_ctx_sp = rhs.m_exe_ctx_sp;<br>
+ return *this;<br>
+}<br>
+<br>
+SBTarget<br>
+SBExecutionContext::GetTarget () const<br>
+{<br>
+ SBTarget sb_target;<br>
+ if (m_exe_ctx_sp)<br>
+ {<br>
+ TargetSP target_sp(m_exe_ctx_sp->GetTargetSP());<br>
+ if (target_sp)<br>
+ sb_target.SetSP(target_sp);<br>
+ }<br>
+ return sb_target;<br>
+}<br>
+<br>
+SBProcess<br>
+SBExecutionContext::GetProcess () const<br>
+{<br>
+ SBProcess sb_process;<br>
+ if (m_exe_ctx_sp)<br>
+ {<br>
+ ProcessSP process_sp(m_exe_ctx_sp->GetProcessSP());<br>
+ if (process_sp)<br>
+ sb_process.SetSP(process_sp);<br>
+ }<br>
+ return sb_process;<br>
+}<br>
+<br>
+SBThread<br>
+SBExecutionContext::GetThread () const<br>
+{<br>
+ SBThread sb_thread;<br>
+ if (m_exe_ctx_sp)<br>
+ {<br>
+ ThreadSP thread_sp(m_exe_ctx_sp->GetThreadSP());<br>
+ if (thread_sp)<br>
+ sb_thread.SetThread(thread_sp);<br>
+ }<br>
+ return sb_thread;<br>
+}<br>
+<br>
+SBFrame<br>
+SBExecutionContext::GetFrame () const<br>
+{<br>
+ SBFrame sb_frame;<br>
+ if (m_exe_ctx_sp)<br>
+ {<br>
+ StackFrameSP frame_sp(m_exe_ctx_sp->GetFrameSP());<br>
+ if (frame_sp)<br>
+ sb_frame.SetFrameSP(frame_sp);<br>
+ }<br>
+ return sb_frame;<br>
+}<br>
+<br>
<br>
<br>
_______________________________________________<br>
lldb-commits mailing list<br>
<a href="mailto:lldb-commits@cs.uiuc.edu">lldb-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits</a><br>
</blockquote></div><br></div>