附加 lldb 调试器时 R 会话中止
R Session Aborted when attaching lldb debuger
我尝试使用lldb
调试我正在开发的R包中的seg fault错误。我在 SO 上看到了一些其他问题,这些问题使用 lldb
来成功调试 R 包。但是我无法让它工作....
我首先启动一个新的 Rstudio
进程,并希望通过以下命令将 lldb
附加到 rsession
进程:
(lldb) process attach -name rsession
然后 Rstudio
会说 "R Session Aborted" 我在 lldb
中有以下消息:
Process 20658 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
frame #0: 0x00007fffb69b2bf2 libsystem_kernel.dylib`__psynch_cvwait + 10
libsystem_kernel.dylib`__psynch_cvwait:
-> 0x7fffb69b2bf2 <+10>: jae 0x7fffb69b2bfc ; <+20>
0x7fffb69b2bf4 <+12>: movq %rax, %rdi
0x7fffb69b2bf7 <+15>: jmp 0x7fffb69abcaf ; cerror_nocancel
0x7fffb69b2bfc <+20>: retq
甚至我在 lldb
中输入 c
命令,lldb
给我消息说进程正在恢复,但是 Rstudio
仍然卡在 "R Session Aborted".
(lldb) c
Process 20658 resuming
(lldb)
如果我点击 Rstudio
的开始新会话,我将有一个新的 rsession
进程,lldb
没有附加它......
我应该如何调试 rsession
使用 lldb
?
我目前正在使用 mac Sierra 10.12.5
这个方法对我有用
在第一个航站楼window
> lldb /Applications/RStudio.app/Contents/MacOS/RStudio
(lldb) b fork
(lldb) run
# breakpoint hit - start second lldb
# after running second lldb
(lldb) cont # first fork
(lldb) cont # second call to fork
在第二个航站楼 window
lldb
(lldb) pro at -n rsession -w
Process 1428 stopped
....
Executable module set to "/Applications/RStudio.app/Contents/MacOS/rsession".
Architecture set to: x86_64-apple-macosx.
(lldb) cont
Process 1428 resuming
(lldb)
我在 lldb 中,我没有收到关于失败会话的讨厌消息。
更新:
据@Consistency 报告,可能需要在 lldb 中使用稍微不同的命令:
(lldb) pro at -n rsession
我尝试使用lldb
调试我正在开发的R包中的seg fault错误。我在 SO 上看到了一些其他问题,这些问题使用 lldb
来成功调试 R 包。但是我无法让它工作....
我首先启动一个新的 Rstudio
进程,并希望通过以下命令将 lldb
附加到 rsession
进程:
(lldb) process attach -name rsession
然后 Rstudio
会说 "R Session Aborted" 我在 lldb
中有以下消息:
Process 20658 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
frame #0: 0x00007fffb69b2bf2 libsystem_kernel.dylib`__psynch_cvwait + 10
libsystem_kernel.dylib`__psynch_cvwait:
-> 0x7fffb69b2bf2 <+10>: jae 0x7fffb69b2bfc ; <+20>
0x7fffb69b2bf4 <+12>: movq %rax, %rdi
0x7fffb69b2bf7 <+15>: jmp 0x7fffb69abcaf ; cerror_nocancel
0x7fffb69b2bfc <+20>: retq
甚至我在 lldb
中输入 c
命令,lldb
给我消息说进程正在恢复,但是 Rstudio
仍然卡在 "R Session Aborted".
(lldb) c
Process 20658 resuming
(lldb)
如果我点击 Rstudio
的开始新会话,我将有一个新的 rsession
进程,lldb
没有附加它......
我应该如何调试 rsession
使用 lldb
?
我目前正在使用 mac Sierra 10.12.5
这个方法对我有用
在第一个航站楼window
> lldb /Applications/RStudio.app/Contents/MacOS/RStudio
(lldb) b fork
(lldb) run
# breakpoint hit - start second lldb
# after running second lldb
(lldb) cont # first fork
(lldb) cont # second call to fork
在第二个航站楼 window
lldb
(lldb) pro at -n rsession -w
Process 1428 stopped
....
Executable module set to "/Applications/RStudio.app/Contents/MacOS/rsession".
Architecture set to: x86_64-apple-macosx.
(lldb) cont
Process 1428 resuming
(lldb)
我在 lldb 中,我没有收到关于失败会话的讨厌消息。
更新:
据@Consistency 报告,可能需要在 lldb 中使用稍微不同的命令:
(lldb) pro at -n rsession