我正在尝试使用运行 gdb 的远程计算机调试一个设备驱动程序,该驱动程序正在使 Mac 上的内核崩溃(尝试按照此处的说明进行操作)。两台机器通过以太网连接到同一个网络(甚至同一个路由器,都可以访问网络)。我也设置nvram boot-args="debug=0x144"
了目标并重新启动。
然后我像往常一样在目标上加载内核扩展。在主机上,我像这样启动 gdb:
$ gdb -arch i386 /Volumes/KernelDebugKit/mach_kernel
进入 gdb 后,我加载内核宏并设置远程连接
(gdb) source /Volumes/KernelDebugKit/kgmacros
(gdb) target remote-kdp
(gdb) kdp-reattach 11.22.33.44
但是,最后一个命令没有建立连接,我得到了一个无穷无尽的线轴
kdp_reply_wait: error from kdp_receive: receive timeout exceeded
kdp_transaction (remote_connect): transaction timed out
kdp_transaction (remote_connect): re-sending transaction
将 gdb 连接到目标机器的正确方法是什么?