35 static_cast<ProcessWasm *
>(thread->GetProcess().get());
37 return std::make_shared<RegisterContextWasm>(*gdb_thread,
50 llvm::Expected<std::vector<lldb::addr_t>> call_stack_pcs =
52 if (!call_stack_pcs) {
54 "Failed to get Wasm callstack: {0}");
65 bool &behaves_like_zeroth_frame) {
72 behaves_like_zeroth_frame = (frame_idx == 0);
78 const size_t depth_from_outermost =
m_frames.size() - 1 - frame_idx;
#define LLDB_LOG_ERROR(log, error,...)
static constexpr lldb::addr_t kWasmSyntheticCFABase
Base for synthesized Wasm frame call frame addresses.
This base class provides an interface to stack frames.
lldb::ThreadSP GetThread() const
virtual uint32_t GetConcreteFrameIndex()
Query this frame to find what frame it is in this Thread's StackFrameList, not counting inlined frame...
virtual uint32_t GetFrameIndex() const
Query this frame to find what frame it is in this Thread's StackFrameList.
ProcessWasm provides the access to the Wasm program state retrieved from the Wasm engine.
lldb::DynamicRegisterInfoSP & GetRegisterInfo()
ProcessWasm provides the access to the Wasm program state retrieved from the Wasm engine.
llvm::Expected< std::vector< lldb::addr_t > > GetWasmCallStack()
Retrieve the current call stack from the WebAssembly remote process.
std::vector< lldb::addr_t > m_frames
lldb::RegisterContextSP DoCreateRegisterContextForFrame(lldb_private::StackFrame *frame) override
bool DoGetFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t &cfa, lldb::addr_t &pc, bool &behaves_like_zeroth_frame) override
uint32_t DoGetFrameCount() override
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
std::shared_ptr< lldb_private::Thread > ThreadSP
std::shared_ptr< lldb_private::RegisterContext > RegisterContextSP