lldb 进程启动无法解析 ~/path-to-filename
lldb process launch fails to resolve ~/path-to-filename
在 macOS 10.13.3 的 .lldbinit 中我定义了一个别名:
command alias pl process launch --stop-at-entry --
所以在 lldb 运行 的命令行中我可以说这样的话:
pl ~/path-to-filename
但是,当我检查 argv 时,我发现 lldb 没有对 ~ 执行路径扩展。
当然,会话失败,lldb 找不到文件,但如果在底部我重新运行 会话与 r,~ 解析为绝对路径。
别名不是问题,因为如果我 运行 在 lldb 中启动进程
与:
process launch --stop-at-entry -- ~/path-to-filename
lldb 仍然拒绝解析~。而且,对我来说似乎很奇怪,lldb 做了预期的正确事情,解决 ~,当执行 r 以重新 运行 调试会话时。这是 bash 问题、lldb 中的错误、功能或试点错误吗?我不知道这种行为是否也出现在 Xcode gui 中,因为我不使用它。它让我不想呕吐。
(lldb) help pro lau
Launch the executable in the debugger.
[...]
-X <boolean> ( --shell-expand-args <boolean> )
Set whether to shell expand arguments to the process when launching.
(lldb) help r
'r' is an abbreviation for 'process launch -X true --'
在 macOS 10.13.3 的 .lldbinit 中我定义了一个别名:
command alias pl process launch --stop-at-entry --
所以在 lldb 运行 的命令行中我可以说这样的话:
pl ~/path-to-filename
但是,当我检查 argv 时,我发现 lldb 没有对 ~ 执行路径扩展。
当然,会话失败,lldb 找不到文件,但如果在底部我重新运行 会话与 r,~ 解析为绝对路径。
别名不是问题,因为如果我 运行 在 lldb 中启动进程 与:
process launch --stop-at-entry -- ~/path-to-filename
lldb 仍然拒绝解析~。而且,对我来说似乎很奇怪,lldb 做了预期的正确事情,解决 ~,当执行 r 以重新 运行 调试会话时。这是 bash 问题、lldb 中的错误、功能或试点错误吗?我不知道这种行为是否也出现在 Xcode gui 中,因为我不使用它。它让我不想呕吐。
(lldb) help pro lau
Launch the executable in the debugger.
[...]
-X <boolean> ( --shell-expand-args <boolean> )
Set whether to shell expand arguments to the process when launching.
(lldb) help r
'r' is an abbreviation for 'process launch -X true --'