From 9b4f7473503ffea640f39099b14c8c79d2c9efec Mon Sep 17 00:00:00 2001 From: nwhasd Date: Fri, 16 May 2025 20:42:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dlibpdebug=E5=86=85?= =?UTF-8?q?=E5=AD=98=E6=B3=84=E6=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Debugger/debugger_lib/libpdebug.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Debugger/debugger_lib/libpdebug.cpp b/Debugger/debugger_lib/libpdebug.cpp index 6decb74..a4cde19 100644 --- a/Debugger/debugger_lib/libpdebug.cpp +++ b/Debugger/debugger_lib/libpdebug.cpp @@ -9,6 +9,7 @@ #include #include #include +#include //using namespace std; static int cur_run_state = 0; //当前运行状态, c 和 lua 都可能改变这个状态,要保持同步 @@ -36,7 +37,7 @@ int lua_debugger_ver = 0; // luapanda.lua的版本,便于做向下 struct path_transfer_node; struct breakpoint; // 路径缓存队列 getinfo -> format -std::list getinfo_to_format_cache; +std::list> getinfo_to_format_cache; // 存放断点map,key为source std::map > all_breakpoint_map; @@ -386,8 +387,7 @@ const char* getPath(lua_State *L,const char* source){ } const char* retSource = lua_tostring(L, -1); //加入缓存,返回 - path_transfer_node *nd = new path_transfer_node(source, retSource ); - getinfo_to_format_cache.push_back(nd); + getinfo_to_format_cache.push_back(std::make_unique(source, retSource)); return retSource; }