-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
BUG:can't debug (with lldb) a nim binary that calls execCmdEx
lldb /tmp/nim//app
(lldb) target create "/tmp/nim//app"
(lldb) r
Process 98697 launched: '/tmp/nim/app' (x86_64)
ok1b.1
/Users/timothee/git_clone/nim/timn/bugs/stdlib/t22_lldb_execCmdEx.nim(12) t22_lldb_execCmdEx
/Users/timothee/git_clone/nim/timn/bugs/stdlib/t22_lldb_execCmdEx.nim(9) test
/Users/timothee/git_clone/nim/Nim/lib/pure/osproc.nim(1330) execCmdEx
/Users/timothee/git_clone/nim/Nim/lib/pure/streams.nim(280) readLine
/Users/timothee/git_clone/nim/Nim/lib/pure/streams.nim(162) readChar
/Users/timothee/git_clone/nim/Nim/lib/pure/streams.nim(87) readData
/Users/timothee/git_clone/nim/Nim/lib/pure/streams.nim(413) fsReadData
/Users/timothee/git_clone/nim/Nim/lib/system/sysio.nim(80) checkErr
/Users/timothee/git_clone/nim/Nim/lib/system/sysio.nim(72) raiseEIO
/Users/timothee/git_clone/nim/Nim/lib/system.nim(2970) sysFatal
Error: unhandled exception: Unknown IO Error [IOError]
Process 98697 exited with status = 1 (0x00000001)
(lldb) ^D
import osproc
proc test=
echo "ok1b.1"
let temp = "brew --version".execCmdEx()
echo "ok1b.2"
echo temp
test()
I'm on OSX
(note: can't use gdb because of https://stackoverflow.com/questions/52529838/gdb-8-2-cant-recognized-executable-file-on-macos-mojave-10-14)
that's very annoying because it makes it impossible to debug some programs, in case they're calling execCmdEx somewhere