File tree Expand file tree Collapse file tree 4 files changed +7
-8
lines changed
Expand file tree Collapse file tree 4 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ local function getLuaVersion()
3838end
3939local dbg = dofile (path .. " /script/debugger.lua" )
4040dbg :start {
41- address = (" @%s/ tmp/pid_ %s" ):format (path , pid ),
41+ address = (" @$ tmp/luadbg_ %s" ):format (pid ),
4242 luaVersion = getLuaVersion (),
4343}
4444dbg :event " wait"
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ local proto = require 'common.protocol'
44local function parseAddress (param )
55 local mode , address = param :match " ^([a-z]+):(.*)"
66 if address :sub (1 ,1 ) == ' @' then
7+ local fs = require " bee.filesystem"
8+ address = address :gsub (" %$tmp" , fs .temp_directory_path ():string ():gsub (" ([/\\ ])$" , " " ))
79 return {
810 protocol = ' unix' ,
911 address = address :sub (2 ),
Original file line number Diff line number Diff line change @@ -11,9 +11,7 @@ local initReq
1111local m = {}
1212
1313local function getUnixAddress (pid )
14- local path = WORKDIR / " tmp"
15- fs .create_directories (path )
16- return " @" .. (path / (" pid_%d" ):format (pid )):string ()
14+ return (" @$tmp/luadbg_%s" ):format (pid )
1715end
1816
1917local function ipc_send_luaversion (pid , luaVersion )
@@ -81,10 +79,9 @@ local function proxy_attach(pkg)
8179 local args = pkg .arguments
8280 platform_os .init (args )
8381 if args .processId then
84- local processId = tonumber (args .processId )
85- local ok , errmsg = attach_process (pkg , processId )
82+ local ok , errmsg = attach_process (pkg , args .processId )
8683 if not ok then
87- response_error (pkg , (' Cannot attach process `%d`. %s' ):format (processId , errmsg ))
84+ response_error (pkg , (' Cannot attach process `%d`. %s' ):format (args . processId , errmsg ))
8885 end
8986 return
9087 end
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ dbg:set_wait("DBG", function(str)
2020 cfg = { address = address , client = (client == " c" ) }
2121 else
2222 local pid = params [1 ]
23- cfg = { address = (" @%s/ tmp/pid_ %s" ):format (path , pid ) }
23+ cfg = { address = (" @$ tmp/luadbg_ %s" ):format (pid ) }
2424 end
2525 if params [2 ] == " ansi" then
2626 cfg .ansi = true
You can’t perform that action at this time.
0 commit comments