aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Lua/SWIGLuaBridge.h
blob: 27263c3b634b68ff85d3ca0e1846d1d0a86b4fe1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//===-- SWIGLuaBridge.h -----------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_LUA_SWIGLUABRIDGE_H
#define LLDB_PLUGINS_SCRIPTINTERPRETER_LUA_SWIGLUABRIDGE_H

#include "lldb/lldb-forward.h"
#include "lua.hpp"
#include "llvm/Support/Error.h"

namespace lldb_private {

namespace lua {

class SWIGBridge {
public:
  static llvm::Expected<bool> LLDBSwigLuaBreakpointCallbackFunction(
      lua_State *L, lldb::StackFrameSP stop_frame_sp,
      lldb::BreakpointLocationSP bp_loc_sp,
      const StructuredDataImpl &extra_args_impl);

  static llvm::Expected<bool> LLDBSwigLuaWatchpointCallbackFunction(
      lua_State *L, lldb::StackFrameSP stop_frame_sp, lldb::WatchpointSP wp_sp);
};

} // namespace lua

} // namespace lldb_private

#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_LUA_SWIGLUABRIDGE_H