Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions lldb/bindings/python/python-wrapper.swig
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,18 @@ void *lldb_private::python::LLDBSWIGPython_CastPyObjectToSBValue(PyObject * data
return sb_ptr;
}

void *lldb_private::python::LLDBSWIGPython_CastPyObjectToSBValueList(PyObject * data) {
lldb::SBValueList *sb_ptr = NULL;

int valid_cast =
SWIG_ConvertPtr(data, (void **)&sb_ptr, SWIGTYPE_p_lldb__SBValueList, 0);

if (valid_cast == -1)
return NULL;

return sb_ptr;
}

void *lldb_private::python::LLDBSWIGPython_CastPyObjectToSBMemoryRegionInfo(PyObject *
data) {
lldb::SBMemoryRegionInfo *sb_ptr = NULL;
Expand Down
108 changes: 63 additions & 45 deletions lldb/bindings/python/static-binding/LLDBWrapPython.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3659,50 +3659,51 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
#define SWIGTYPE_p_std__shared_ptrT_lldb_private__Watchpoint_t swig_types[218]
#define SWIGTYPE_p_std__shared_ptrT_lldb_private__WritableDataBuffer_t swig_types[219]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__AddressRange_t swig_types[220]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__DynamicCheckerFunctions_t swig_types[221]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__DynamicLoader_t swig_types[222]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__File_t swig_types[223]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__JITLoaderList_t swig_types[224]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__MemoryRegionInfo_t swig_types[225]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__OperatingSystem_t swig_types[226]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__ProtocolServer_t swig_types[227]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__ScriptedPlatformInterface_t swig_types[228]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__ScriptedProcessInterface_t swig_types[229]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__SectionList_t swig_types[230]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__SourceManager_t swig_types[231]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__StackFrameRecognizerManager_t swig_types[232]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__Stream_t swig_types[233]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__StructuredDataImpl_t swig_types[234]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__SymbolVendor_t swig_types[235]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__SystemRuntime_t swig_types[236]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__TraceExporter_t swig_types[237]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__BreakpointLocation_t swig_types[238]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Breakpoint_t swig_types[239]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__BroadcasterManager_t swig_types[240]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Debugger_t swig_types[241]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Listener_t swig_types[242]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Module_t swig_types[243]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__ObjectFileJITDelegate_t swig_types[244]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__OptionValue_t swig_types[245]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Process_t swig_types[246]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Queue_t swig_types[247]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Section_t swig_types[248]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__StackFrameList_t swig_types[249]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__StackFrame_t swig_types[250]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__StructuredDataPlugin_t swig_types[251]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Target_t swig_types[252]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__ThreadPlan_t swig_types[253]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Thread_t swig_types[254]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__TypeSystem_t swig_types[255]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Type_t swig_types[256]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__UnixSignals_t swig_types[257]
#define SWIGTYPE_p_unsigned_char swig_types[258]
#define SWIGTYPE_p_unsigned_int swig_types[259]
#define SWIGTYPE_p_unsigned_long_long swig_types[260]
#define SWIGTYPE_p_unsigned_short swig_types[261]
#define SWIGTYPE_p_void swig_types[262]
static swig_type_info *swig_types[264];
static swig_module_info swig_module = {swig_types, 263, 0, 0, 0, 0};
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__DataExtractor_t swig_types[221]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__DynamicCheckerFunctions_t swig_types[222]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__DynamicLoader_t swig_types[223]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__File_t swig_types[224]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__JITLoaderList_t swig_types[225]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__MemoryRegionInfo_t swig_types[226]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__OperatingSystem_t swig_types[227]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__ProtocolServer_t swig_types[228]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__ScriptedPlatformInterface_t swig_types[229]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__ScriptedProcessInterface_t swig_types[230]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__SectionList_t swig_types[231]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__SourceManager_t swig_types[232]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__StackFrameRecognizerManager_t swig_types[233]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__Stream_t swig_types[234]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__StructuredDataImpl_t swig_types[235]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__SymbolVendor_t swig_types[236]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__SystemRuntime_t swig_types[237]
#define SWIGTYPE_p_std__unique_ptrT_lldb_private__TraceExporter_t swig_types[238]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__BreakpointLocation_t swig_types[239]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Breakpoint_t swig_types[240]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__BroadcasterManager_t swig_types[241]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Debugger_t swig_types[242]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Listener_t swig_types[243]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Module_t swig_types[244]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__ObjectFileJITDelegate_t swig_types[245]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__OptionValue_t swig_types[246]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Process_t swig_types[247]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Queue_t swig_types[248]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Section_t swig_types[249]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__StackFrameList_t swig_types[250]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__StackFrame_t swig_types[251]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__StructuredDataPlugin_t swig_types[252]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Target_t swig_types[253]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__ThreadPlan_t swig_types[254]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Thread_t swig_types[255]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__TypeSystem_t swig_types[256]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__Type_t swig_types[257]
#define SWIGTYPE_p_std__weak_ptrT_lldb_private__UnixSignals_t swig_types[258]
#define SWIGTYPE_p_unsigned_char swig_types[259]
#define SWIGTYPE_p_unsigned_int swig_types[260]
#define SWIGTYPE_p_unsigned_long_long swig_types[261]
#define SWIGTYPE_p_unsigned_short swig_types[262]
#define SWIGTYPE_p_void swig_types[263]
static swig_type_info *swig_types[265];
static swig_module_info swig_module = {swig_types, 264, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)

Expand Down Expand Up @@ -5608,6 +5609,18 @@ void *lldb_private::python::LLDBSWIGPython_CastPyObjectToSBValue(PyObject * data
return sb_ptr;
}

void *lldb_private::python::LLDBSWIGPython_CastPyObjectToSBValueList(PyObject * data) {
lldb::SBValueList *sb_ptr = NULL;

int valid_cast =
SWIG_ConvertPtr(data, (void **)&sb_ptr, SWIGTYPE_p_lldb__SBValueList, 0);

if (valid_cast == -1)
return NULL;

return sb_ptr;
}

void *lldb_private::python::LLDBSWIGPython_CastPyObjectToSBMemoryRegionInfo(PyObject *
data) {
lldb::SBMemoryRegionInfo *sb_ptr = NULL;
Expand Down Expand Up @@ -104953,6 +104966,7 @@ static swig_type_info _swigt__p_std__shared_ptrT_lldb_private__WatchpointResourc
static swig_type_info _swigt__p_std__shared_ptrT_lldb_private__Watchpoint_t = {"_p_std__shared_ptrT_lldb_private__Watchpoint_t", "lldb::WatchpointSP *|std::shared_ptr< lldb_private::Watchpoint > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_lldb_private__WritableDataBuffer_t = {"_p_std__shared_ptrT_lldb_private__WritableDataBuffer_t", "lldb::WritableDataBufferSP *|std::shared_ptr< lldb_private::WritableDataBuffer > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__unique_ptrT_lldb_private__AddressRange_t = {"_p_std__unique_ptrT_lldb_private__AddressRange_t", "lldb::AddressRangeUP *|std::unique_ptr< lldb_private::AddressRange > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__unique_ptrT_lldb_private__DataExtractor_t = {"_p_std__unique_ptrT_lldb_private__DataExtractor_t", "lldb::DataExtractorUP *|std::unique_ptr< lldb_private::DataExtractor > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__unique_ptrT_lldb_private__DynamicCheckerFunctions_t = {"_p_std__unique_ptrT_lldb_private__DynamicCheckerFunctions_t", "lldb::DynamicCheckerFunctionsUP *|std::unique_ptr< lldb_private::DynamicCheckerFunctions > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__unique_ptrT_lldb_private__DynamicLoader_t = {"_p_std__unique_ptrT_lldb_private__DynamicLoader_t", "lldb::DynamicLoaderUP *|std::unique_ptr< lldb_private::DynamicLoader > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__unique_ptrT_lldb_private__File_t = {"_p_std__unique_ptrT_lldb_private__File_t", "lldb::FileUP *|std::unique_ptr< lldb_private::File > *", 0, 0, (void*)0, 0};
Expand Down Expand Up @@ -104991,7 +105005,7 @@ static swig_type_info _swigt__p_std__weak_ptrT_lldb_private__TypeSystem_t = {"_p
static swig_type_info _swigt__p_std__weak_ptrT_lldb_private__Type_t = {"_p_std__weak_ptrT_lldb_private__Type_t", "lldb::TypeWP *|std::weak_ptr< lldb_private::Type > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__weak_ptrT_lldb_private__UnixSignals_t = {"_p_std__weak_ptrT_lldb_private__UnixSignals_t", "lldb::UnixSignalsWP *|std::weak_ptr< lldb_private::UnixSignals > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "uint8_t *|uint_fast8_t *|uint_least8_t *|unsigned char *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "lldb::cpu_id_t *|lldb::wp_resource_id_t *|uint32_t *|uint_fast16_t *|uint_fast32_t *|uint_least32_t *|uintptr_t *|unsigned int *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "lldb::cpu_id_t *|lldb::frame_list_id_t *|lldb::wp_resource_id_t *|uint32_t *|uint_fast16_t *|uint_fast32_t *|uint_least32_t *|uintptr_t *|unsigned int *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "lldb::addr_t *|lldb::offset_t *|lldb::pid_t *|lldb::process_t *|lldb::queue_id_t *|lldb::tid_t *|lldb::user_id_t *|uint64_t *|uint_fast64_t *|uint_least64_t *|uintmax_t *|unsigned long long *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "uint16_t *|uint_least16_t *|unsigned short *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
Expand Down Expand Up @@ -105218,6 +105232,7 @@ static swig_type_info *swig_type_initial[] = {
&_swigt__p_std__shared_ptrT_lldb_private__Watchpoint_t,
&_swigt__p_std__shared_ptrT_lldb_private__WritableDataBuffer_t,
&_swigt__p_std__unique_ptrT_lldb_private__AddressRange_t,
&_swigt__p_std__unique_ptrT_lldb_private__DataExtractor_t,
&_swigt__p_std__unique_ptrT_lldb_private__DynamicCheckerFunctions_t,
&_swigt__p_std__unique_ptrT_lldb_private__DynamicLoader_t,
&_swigt__p_std__unique_ptrT_lldb_private__File_t,
Expand Down Expand Up @@ -105483,6 +105498,7 @@ static swig_cast_info _swigc__p_std__shared_ptrT_lldb_private__WatchpointResourc
static swig_cast_info _swigc__p_std__shared_ptrT_lldb_private__Watchpoint_t[] = { {&_swigt__p_std__shared_ptrT_lldb_private__Watchpoint_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_lldb_private__WritableDataBuffer_t[] = { {&_swigt__p_std__shared_ptrT_lldb_private__WritableDataBuffer_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__unique_ptrT_lldb_private__AddressRange_t[] = { {&_swigt__p_std__unique_ptrT_lldb_private__AddressRange_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__unique_ptrT_lldb_private__DataExtractor_t[] = { {&_swigt__p_std__unique_ptrT_lldb_private__DataExtractor_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__unique_ptrT_lldb_private__DynamicCheckerFunctions_t[] = { {&_swigt__p_std__unique_ptrT_lldb_private__DynamicCheckerFunctions_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__unique_ptrT_lldb_private__DynamicLoader_t[] = { {&_swigt__p_std__unique_ptrT_lldb_private__DynamicLoader_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__unique_ptrT_lldb_private__File_t[] = { {&_swigt__p_std__unique_ptrT_lldb_private__File_t, 0, 0, 0},{0, 0, 0, 0}};
Expand Down Expand Up @@ -105748,6 +105764,7 @@ static swig_cast_info *swig_cast_initial[] = {
_swigc__p_std__shared_ptrT_lldb_private__Watchpoint_t,
_swigc__p_std__shared_ptrT_lldb_private__WritableDataBuffer_t,
_swigc__p_std__unique_ptrT_lldb_private__AddressRange_t,
_swigc__p_std__unique_ptrT_lldb_private__DataExtractor_t,
_swigc__p_std__unique_ptrT_lldb_private__DynamicCheckerFunctions_t,
_swigc__p_std__unique_ptrT_lldb_private__DynamicLoader_t,
_swigc__p_std__unique_ptrT_lldb_private__File_t,
Expand Down Expand Up @@ -106483,6 +106500,7 @@ SWIGINTERN int SWIG_mod_exec(PyObject *m) {
SWIG_Python_SetConstant(d, "LLDB_INVALID_PROCESS_ID",SWIG_From_int(static_cast< int >(0)));
SWIG_Python_SetConstant(d, "LLDB_INVALID_THREAD_ID",SWIG_From_int(static_cast< int >(0)));
SWIG_Python_SetConstant(d, "LLDB_INVALID_FRAME_ID",SWIG_From_unsigned_SS_int(static_cast< unsigned int >(4294967295U)));
SWIG_Python_SetConstant(d, "LLDB_UNWINDER_FRAME_LIST_ID",SWIG_From_int(static_cast< int >(0)));
SWIG_Python_SetConstant(d, "LLDB_INVALID_SIGNAL_NUMBER",SWIG_From_int(static_cast< int >(2147483647)));
SWIG_Python_SetConstant(d, "LLDB_INVALID_OFFSET",SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(18446744073709551615ULL)));
SWIG_Python_SetConstant(d, "LLDB_INVALID_LINE_NUMBER",SWIG_From_unsigned_SS_int(static_cast< unsigned int >(4294967295U)));
Expand Down
2 changes: 2 additions & 0 deletions lldb/bindings/python/static-binding/lldb.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ def lldb_iter(obj, getsize, getelem):

LLDB_INVALID_FRAME_ID = _lldb.LLDB_INVALID_FRAME_ID

LLDB_UNWINDER_FRAME_LIST_ID = _lldb.LLDB_UNWINDER_FRAME_LIST_ID

LLDB_INVALID_SIGNAL_NUMBER = _lldb.LLDB_INVALID_SIGNAL_NUMBER

LLDB_INVALID_OFFSET = _lldb.LLDB_INVALID_OFFSET
Expand Down
10 changes: 6 additions & 4 deletions lldb/include/lldb/API/SBValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
#include "lldb/API/SBDefines.h"
#include "lldb/API/SBType.h"

namespace lldb_private {
class ValueImpl;
class ValueLocker;

namespace lldb_private {
namespace python {
class SWIGBridge;
}
Expand Down Expand Up @@ -487,7 +486,7 @@ class LLDB_API SBValue {
/// \return
/// A ValueObjectSP of the best kind (static, dynamic or synthetic) we
/// can cons up, in accordance with the SBValue's settings.
lldb::ValueObjectSP GetSP(ValueLocker &value_locker) const;
lldb::ValueObjectSP GetSP(lldb_private::ValueLocker &value_locker) const;

// these calls do the right thing WRT adjusting their settings according to
// the target's preferences
Expand All @@ -503,8 +502,11 @@ class LLDB_API SBValue {
void SetSP(const lldb::ValueObjectSP &sp, lldb::DynamicValueType use_dynamic,
bool use_synthetic, const char *name);

protected:
friend class lldb_private::ScriptInterpreter;

private:
typedef std::shared_ptr<ValueImpl> ValueImplSP;
typedef std::shared_ptr<lldb_private::ValueImpl> ValueImplSP;
ValueImplSP m_opaque_sp;

void SetSP(ValueImplSP impl_sp);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define LLDB_INTERPRETER_INTERFACES_SCRIPTEDFRAMEINTERFACE_H

#include "ScriptedInterface.h"
#include "lldb/API/SBValueList.h"
#include "lldb/Core/StructuredDataImpl.h"
#include "lldb/Symbol/SymbolContext.h"
#include "lldb/lldb-private.h"
Expand Down Expand Up @@ -49,6 +50,14 @@ class ScriptedFrameInterface : virtual public ScriptedInterface {
virtual std::optional<std::string> GetRegisterContext() {
return std::nullopt;
}

virtual lldb::ValueObjectListSP GetVariables() { return nullptr; }

virtual lldb::ValueObjectSP
GetValueObjectForVariableExpression(llvm::StringRef expr, uint32_t options,
Status &error) {
return nullptr;
}
};
} // namespace lldb_private

Expand Down
3 changes: 3 additions & 0 deletions lldb/include/lldb/Interpreter/ScriptInterpreter.h
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,9 @@ class ScriptInterpreter : public PluginInterface {
lldb::StackFrameListSP
GetOpaqueTypeFromSBFrameList(const lldb::SBFrameList &exe_ctx) const;

lldb::ValueObjectSP
GetOpaqueTypeFromSBValue(const lldb::SBValue &value) const;

protected:
Debugger &m_debugger;
lldb::ScriptLanguage m_script_lang;
Expand Down
19 changes: 11 additions & 8 deletions lldb/include/lldb/Target/ExecutionContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@

#include "lldb/Host/ProcessRunLock.h"
#include "lldb/Target/StackID.h"
#include "lldb/Target/SyntheticFrameProvider.h"
#include "lldb/lldb-private.h"

namespace lldb_private {

struct StoppedExecutionContext;

//===----------------------------------------------------------------------===//
/// Execution context objects refer to objects in the execution of the program
/// that is being debugged. The consist of one or more of the following
Expand Down Expand Up @@ -270,9 +273,12 @@ class ExecutionContextRef {

void ClearFrame() {
m_stack_id.Clear();
m_frame_list_wp.reset();
m_frame_list_id.reset();
}

friend llvm::Expected<StoppedExecutionContext>
GetStoppedExecutionContext(const ExecutionContextRef *exe_ctx_ref_ptr);

protected:
// Member variables
lldb::TargetWP m_target_wp; ///< A weak reference to a target
Expand All @@ -283,13 +289,10 @@ class ExecutionContextRef {
/// backing object changes
StackID m_stack_id; ///< The stack ID that this object refers to in case the
///< backing object changes
mutable lldb::StackFrameListWP
m_frame_list_wp; ///< Weak reference to the
///< frame list that contains
///< this frame. If we can create a valid
///< StackFrameListSP from it, we must use it to resolve
///< the StackID, otherwise, we should ask the Thread's
///< StackFrameList.
/// A map of identifiers to scripted frame providers used in this thread.
mutable std::optional<
std::pair<ScriptedFrameProviderDescriptor, lldb::frame_list_id_t>>
m_frame_list_id;
};

/// \class ExecutionContext ExecutionContext.h
Expand Down
Loading