42 lines · c
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLDB_SOURCE_PLUGINS_PROCESS_WASM_THREADWASM_H10#define LLDB_SOURCE_PLUGINS_PROCESS_WASM_THREADWASM_H11 12#include "Plugins/Process/gdb-remote/ThreadGDBRemote.h"13 14namespace lldb_private {15namespace wasm {16 17/// ProcessWasm provides the access to the Wasm program state18/// retrieved from the Wasm engine.19class ThreadWasm : public process_gdb_remote::ThreadGDBRemote {20public:21 ThreadWasm(Process &process, lldb::tid_t tid)22 : process_gdb_remote::ThreadGDBRemote(process, tid) {}23 ~ThreadWasm() override = default;24 25 /// Retrieve the current call stack from the WebAssembly remote process.26 llvm::Expected<std::vector<lldb::addr_t>> GetWasmCallStack();27 28 lldb::RegisterContextSP29 CreateRegisterContextForFrame(StackFrame *frame) override;30 31protected:32 Unwind &GetUnwinder() override;33 34 ThreadWasm(const ThreadWasm &);35 const ThreadWasm &operator=(const ThreadWasm &) = delete;36};37 38} // namespace wasm39} // namespace lldb_private40 41#endif // LLDB_SOURCE_PLUGINS_PROCESS_WASM_THREADWASM_H42