mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-27 07:31:28 +00:00
[lldb] Fix lua build after 27b6a4e63a
This applies the same trick for Lua that I did for python in
27b6a4e63a
.
Differential Revision: https://reviews.llvm.org/D150624
This commit is contained in:
parent
ce90dfc74b
commit
692ae97ae7
@ -3,7 +3,8 @@
|
||||
template <typename T> void PushSBClass(lua_State * L, T * obj);
|
||||
|
||||
// This function is called from Lua::CallBreakpointCallback
|
||||
llvm::Expected<bool> lldb_private::LLDBSwigLuaBreakpointCallbackFunction(
|
||||
llvm::Expected<bool>
|
||||
lldb_private::lua::SWIGBridge::LLDBSwigLuaBreakpointCallbackFunction(
|
||||
lua_State * L, lldb::StackFrameSP stop_frame_sp,
|
||||
lldb::BreakpointLocationSP bp_loc_sp,
|
||||
const StructuredDataImpl &extra_args_impl) {
|
||||
@ -41,7 +42,8 @@ llvm::Expected<bool> lldb_private::LLDBSwigLuaBreakpointCallbackFunction(
|
||||
}
|
||||
|
||||
// This function is called from Lua::CallWatchpointCallback
|
||||
llvm::Expected<bool> lldb_private::LLDBSwigLuaWatchpointCallbackFunction(
|
||||
llvm::Expected<bool>
|
||||
lldb_private::lua::SWIGBridge::LLDBSwigLuaWatchpointCallbackFunction(
|
||||
lua_State * L, lldb::StackFrameSP stop_frame_sp, lldb::WatchpointSP wp_sp) {
|
||||
lldb::SBFrame sb_frame(stop_frame_sp);
|
||||
lldb::SBWatchpoint sb_wp(wp_sp);
|
||||
|
@ -16,6 +16,9 @@ namespace lldb_private {
|
||||
namespace python {
|
||||
class SWIGBridge;
|
||||
}
|
||||
namespace lua {
|
||||
class SWIGBridge;
|
||||
}
|
||||
} // namespace lldb_private
|
||||
|
||||
namespace lldb {
|
||||
@ -98,6 +101,7 @@ public:
|
||||
|
||||
protected:
|
||||
friend class lldb_private::python::SWIGBridge;
|
||||
friend class lldb_private::lua::SWIGBridge;
|
||||
SBBreakpointLocation(const lldb::BreakpointLocationSP &break_loc_sp);
|
||||
|
||||
private:
|
||||
|
@ -16,6 +16,9 @@ namespace lldb_private {
|
||||
namespace python {
|
||||
class SWIGBridge;
|
||||
}
|
||||
namespace lua {
|
||||
class SWIGBridge;
|
||||
}
|
||||
} // namespace lldb_private
|
||||
|
||||
namespace lldb {
|
||||
@ -198,6 +201,7 @@ protected:
|
||||
friend class SBValue;
|
||||
|
||||
friend class lldb_private::python::SWIGBridge;
|
||||
friend class lldb_private::lua::SWIGBridge;
|
||||
|
||||
SBFrame(const lldb::StackFrameSP &lldb_object_sp);
|
||||
|
||||
|
@ -16,6 +16,9 @@ namespace lldb_private {
|
||||
namespace python {
|
||||
class SWIGBridge;
|
||||
}
|
||||
namespace lua {
|
||||
class SWIGBridge;
|
||||
}
|
||||
} // namespace lldb_private
|
||||
|
||||
namespace lldb {
|
||||
@ -104,6 +107,7 @@ protected:
|
||||
friend class SBBreakpointName;
|
||||
friend class SBTrace;
|
||||
friend class lldb_private::python::SWIGBridge;
|
||||
friend class lldb_private::lua::SWIGBridge;
|
||||
|
||||
SBStructuredData(const lldb_private::StructuredDataImpl &impl);
|
||||
|
||||
|
@ -13,7 +13,10 @@
|
||||
#include "lldb/API/SBType.h"
|
||||
|
||||
namespace lldb_private {
|
||||
namespace ptyhon {
|
||||
namespace python {
|
||||
class SWIGBridge;
|
||||
}
|
||||
namespace lua {
|
||||
class SWIGBridge;
|
||||
}
|
||||
} // namespace lldb_private
|
||||
@ -86,6 +89,7 @@ public:
|
||||
|
||||
protected:
|
||||
friend class lldb_private::python::SWIGBridge;
|
||||
friend class lldb_private::lua::SWIGBridge;
|
||||
|
||||
SBWatchpoint(const lldb::WatchpointSP &wp_sp);
|
||||
|
||||
|
@ -83,8 +83,8 @@ Lua::CallBreakpointCallback(void *baton, lldb::StackFrameSP stop_frame_sp,
|
||||
lua_pushlightuserdata(m_lua_state, baton);
|
||||
lua_gettable(m_lua_state, LUA_REGISTRYINDEX);
|
||||
StructuredDataImpl extra_args_impl(std::move(extra_args_sp));
|
||||
return LLDBSwigLuaBreakpointCallbackFunction(m_lua_state, stop_frame_sp,
|
||||
bp_loc_sp, extra_args_impl);
|
||||
return lua::SWIGBridge::LLDBSwigLuaBreakpointCallbackFunction(
|
||||
m_lua_state, stop_frame_sp, bp_loc_sp, extra_args_impl);
|
||||
}
|
||||
|
||||
llvm::Error Lua::RegisterWatchpointCallback(void *baton, const char *body) {
|
||||
@ -109,8 +109,8 @@ Lua::CallWatchpointCallback(void *baton, lldb::StackFrameSP stop_frame_sp,
|
||||
|
||||
lua_pushlightuserdata(m_lua_state, baton);
|
||||
lua_gettable(m_lua_state, LUA_REGISTRYINDEX);
|
||||
return LLDBSwigLuaWatchpointCallbackFunction(m_lua_state, stop_frame_sp,
|
||||
wp_sp);
|
||||
return lua::SWIGBridge::LLDBSwigLuaWatchpointCallbackFunction(
|
||||
m_lua_state, stop_frame_sp, wp_sp);
|
||||
}
|
||||
|
||||
llvm::Error Lua::CheckSyntax(llvm::StringRef buffer) {
|
||||
|
@ -15,13 +15,20 @@
|
||||
|
||||
namespace lldb_private {
|
||||
|
||||
llvm::Expected<bool> LLDBSwigLuaBreakpointCallbackFunction(
|
||||
lua_State *L, lldb::StackFrameSP stop_frame_sp,
|
||||
lldb::BreakpointLocationSP bp_loc_sp,
|
||||
const StructuredDataImpl &extra_args_impl);
|
||||
namespace lua {
|
||||
|
||||
llvm::Expected<bool> LLDBSwigLuaWatchpointCallbackFunction(
|
||||
lua_State *L, lldb::StackFrameSP stop_frame_sp, lldb::WatchpointSP wp_sp);
|
||||
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
|
||||
|
||||
|
@ -14,14 +14,16 @@ using namespace lldb_private;
|
||||
|
||||
extern "C" int luaopen_lldb(lua_State *L) { return 0; }
|
||||
|
||||
llvm::Expected<bool> lldb_private::LLDBSwigLuaBreakpointCallbackFunction(
|
||||
llvm::Expected<bool>
|
||||
lldb_private::lua::SWIGBridge::LLDBSwigLuaBreakpointCallbackFunction(
|
||||
lua_State *L, lldb::StackFrameSP stop_frame_sp,
|
||||
lldb::BreakpointLocationSP bp_loc_sp,
|
||||
const StructuredDataImpl &extra_args_impl) {
|
||||
return false;
|
||||
}
|
||||
|
||||
llvm::Expected<bool> lldb_private::LLDBSwigLuaWatchpointCallbackFunction(
|
||||
llvm::Expected<bool>
|
||||
lldb_private::lua::SWIGBridge::LLDBSwigLuaWatchpointCallbackFunction(
|
||||
lua_State *L, lldb::StackFrameSP stop_frame_sp, lldb::WatchpointSP wp_sp) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user