Path: blob/main/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Lua/Lua.h
39642 views
//===-- ScriptInterpreterLua.h ----------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef liblldb_Lua_h_9#define liblldb_Lua_h_1011#include "lldb/API/SBBreakpointLocation.h"12#include "lldb/API/SBFrame.h"13#include "lldb/Core/StructuredDataImpl.h"14#include "lldb/lldb-types.h"15#include "llvm/ADT/StringRef.h"16#include "llvm/Support/Error.h"1718#include "lua.hpp"1920#include <mutex>2122namespace lldb_private {2324extern "C" {25int luaopen_lldb(lua_State *L);26}2728class Lua {29public:30Lua();31~Lua();3233llvm::Error Run(llvm::StringRef buffer);34llvm::Error RegisterBreakpointCallback(void *baton, const char *body);35llvm::Expected<bool>36CallBreakpointCallback(void *baton, lldb::StackFrameSP stop_frame_sp,37lldb::BreakpointLocationSP bp_loc_sp,38StructuredData::ObjectSP extra_args_sp);39llvm::Error RegisterWatchpointCallback(void *baton, const char *body);40llvm::Expected<bool> CallWatchpointCallback(void *baton,41lldb::StackFrameSP stop_frame_sp,42lldb::WatchpointSP wp_sp);43llvm::Error LoadModule(llvm::StringRef filename);44llvm::Error CheckSyntax(llvm::StringRef buffer);45llvm::Error ChangeIO(FILE *out, FILE *err);4647private:48lua_State *m_lua_state;49};5051} // namespace lldb_private5253#endif // liblldb_Lua_h_545556