简体   繁体   English

是否有与gdbserver等效的lldb?

[英]Is there an lldb equivalent to gdbserver?

I have recently started developing on macOS and need to remotely debug a process by kicking off a debug server and connecting to it from another machine. 我最近开始在macOS上进行开发,需要通过启动调试服务器并从另一台计算机连接到该服务器来远程调试进程。 Using GDB I would do this on the machine to be debugged: 使用GDB,我将在要调试的机器上执行此操作:

gdbserver :<port> --attach <pid>

However, GDB appears to no longer be supported on macOS as the community has apparently transitioned to using lldb . 但是,由于社区已明显过渡到使用lldb ,因此macOS似乎不再支持GDB。 However, I am unable to find the equivalent command for kicking off a debug server using lldb. 但是,我找不到使用lldb启动调试服务器的等效命令。 I found this equivalency page, but the only mention of something similar is using lldb as a client that connects to some remote server. 我找到了这个等效页面,但是唯一类似的提及是使用lldb作为连接到某个远程服务器的客户端

I have found mention of a lldb-server command, but I am unable to find documentation on how to install it as it did not come with the standard command-line tools package on macOS. 我发现提到lldb-server命令,但是我找不到有关如何安装它的文档,因为它不是macOS上标准命令行工具包附带的。

On macOS systems, use debugserver . 在macOS系统上,使用debugserver eg at /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/debugserver 例如,在/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/debugserver

On linux, use lldb-server . 在linux上,使用lldb-server

debugserver was written before lldb was, and is a bit of a developmental dead-end; debugserver是在lldb之前编写的,有点发展滞后; at some point in the future lldb-server will be updated to handle all the macOS specific features and debugserver will be retired. 在将来的某个时候, lldb-server将被更新以处理所有macOS特定功能,并且debugserver将被debugserver There's no concrete plans to do that work in the immediate future though. 不过,目前尚无具体计划在不久的将来进行这项工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM