点击VM->Clone 选中默认的From current state,点击Next 选中Create a full clone, 点击Next Virtual Machine name 输入target,将克隆的机器命令为目标机
#########################################分别为两个虚拟机增加一个串口,以"Output to named pipe"方式,其中:
调试机选择"this end is the client", "the other end is a virtual machine" 目标机选择"this end is the server", "the other end is a virtual machine" 备注: 两个pipe的名称要相同,并且选中下面的Connect at power on和Yield CPU on poll
######################################### # 重启目标机,在启动菜单中选择"Escape to loader prompt",会显示出下内容: Type "?" for a list of commands, "help" for more detailed help. OK
# 输入: boot -d
会出现以下内容: GDB: debug ports: uart GDB: current port: uart KDB: debugger backends: ddb gdb KDB: current backend: ddb KDB: enter: Boot flags requested debugger [ thread pid 0 tid 0 ] Stopped at kdb_enter+0x3b: movq $0,0xaf0362(%rip) db>