Skip to content

Commit a57813c

Browse files
committed
修正依赖关系
1 parent 18f4915 commit a57813c

File tree

6 files changed

+15
-8
lines changed

6 files changed

+15
-8
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ elseif(${EMMY_LUA_VERSION} STREQUAL "jit")
2626
#add_definitions(-DEMMY_LUA_JIT_SUPPORT_LUA_SETFUNCS)
2727
endif()
2828

29-
add_definitions(-DEMMY_CORE_VERSION="1.4.2")
29+
add_definitions(-DEMMY_CORE_VERSION="1.5.2")
3030

3131
if(EMMY_USE_LUA_SOURCE)
3232
add_definitions(-DEMMY_USE_LUA_SOURCE)

emmy_debugger/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.11)
22

33
project (emmy_debugger)
44

5-
add_library(emmy_debugger STATIC )
5+
add_library(emmy_debugger STATIC)
66

77
add_dependencies(
88
emmy_debugger
@@ -69,9 +69,10 @@ if(EMMY_USE_LUA_SOURCE)
6969
${emmy_debugger_SOURCE_DIR}/src/api/lua_state/lua_state_jit.cpp
7070
)
7171
else()
72+
add_dependencies(emmy_debugger lua${EMMY_LUA_VERSION})
7273
target_link_libraries(
7374
emmy_debugger
74-
PRIVATE lua${EMMY_LUA_VERSION}
75+
PUBLIC lua${EMMY_LUA_VERSION}
7576
)
7677
target_sources(emmy_debugger
7778
PRIVATE

emmy_debugger/src/api/lua_api.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818

19-
19+
#ifdef EMMY_USE_LUA_SOURCE
2020
#if defined(EMMY_LUA_51) || defined(EMMY_LUA_JIT)
2121
#include "emmy_debugger/api/lua_api.h"
2222
int lua_absindex(lua_State *L, int idx) {
@@ -42,3 +42,4 @@ void lua_pushglobaltable(lua_State* L)
4242
}
4343

4444
#endif
45+
#endif

emmy_debugger/src/emmy_debugger.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ std::string ToPointer(lua_State* L, int index)
311311
return ss.str();
312312
}
313313

314-
314+
#ifndef EMMY_USE_LUA_SOURCE
315315
void DisplayFunction54(std::shared_ptr<Variable> variable, lua_State* L, int index, lua_Debug_54& ar)
316316
{
317317
if (ar.what == nullptr)
@@ -398,7 +398,7 @@ void DisplayFunction(std::shared_ptr<Variable> variable, lua_State* L, int index
398398
}
399399
lua_settop(L, index);
400400
}
401-
401+
#endif
402402
// algorithm optimization
403403
void Debugger::GetVariable(lua_State* L, std::shared_ptr<Variable> variable, int index, int depth, bool queryHelper)
404404
{
@@ -492,7 +492,12 @@ void Debugger::GetVariable(lua_State* L, std::shared_ptr<Variable> variable, int
492492
}
493493
case LUA_TFUNCTION:
494494
{
495+
#ifndef EMMY_USE_LUA_SOURCE
495496
DisplayFunction(variable, L, index);
497+
#else
498+
variable->value = ToPointer(L, index);
499+
#endif
500+
496501
break;
497502
}
498503
case LUA_TLIGHTUSERDATA:

emmy_debugger/src/emmy_debugger_lib.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
#include "emmy_debugger/emmy_debugger_lib.h"
1617
#include <cstring>
17-
#include "emmy_debugger/types.h"
1818
#include "emmy_debugger/emmy_debugger.h"
1919
#include "emmy_debugger/emmy_facade.h"
2020

include/emmy_debugger/api/lua_api_loader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ typedef double lua_Number;
2424
typedef long long lua_Integer;
2525
typedef ptrdiff_t lua_KContext;
2626

27-
#include "emmy_debugger/api/lua_state.h"
27+
#include "lua_state.h"
2828

2929
/*
3030
@@ LUA_IDSIZE gives the maximum size for the description of the source

0 commit comments

Comments
 (0)