|
Lines 1655-1660
else if (pid == 0) { /* child */
Link Here
|
| 1655 |
<userinput>expr PauseMode = 0</userinput> and wait |
1655 |
<userinput>expr PauseMode = 0</userinput> and wait |
| 1656 |
for the <function>sleep()</function> call to return.</para> |
1656 |
for the <function>sleep()</function> call to return.</para> |
| 1657 |
</sect3> |
1657 |
</sect3> |
|
|
1658 |
|
| 1659 |
<sect3> |
| 1660 |
<title>Remote Debugging Using LLDB</title> |
| 1661 |
|
| 1662 |
<para>Starting with LLDB 12.0.0, remote debugging is supported |
| 1663 |
on FreeBSD. This means that <command>lldb-server</command> |
| 1664 |
can be started to debug a program on one host, while |
| 1665 |
the interactive <command>lldb</command> client connects |
| 1666 |
to it from another one.</para> |
| 1667 |
|
| 1668 |
<para>To launch a new process to be debugged remotely, run |
| 1669 |
<command>lldb-server</command> on the remote server |
| 1670 |
by typing</para> |
| 1671 |
|
| 1672 |
<screen>&prompt.user; <userinput>lldb-server g <replaceable>host:port</replaceable> -- <replaceable>progname</replaceable></userinput></screen> |
| 1673 |
|
| 1674 |
<para>The process will be stopped immediately after launching, |
| 1675 |
and <command>lldb-server</command> will wait for the client |
| 1676 |
to connect.</para> |
| 1677 |
|
| 1678 |
<para>Start <command>lldb</command> locally and type |
| 1679 |
the following command to connect to the remote |
| 1680 |
server:</para> |
| 1681 |
|
| 1682 |
<screen>(lldb) <userinput>gdb-remote <replaceable>host:port</replaceable></userinput></screen> |
| 1683 |
|
| 1684 |
<para><command>lldb-server</command> can also attach to |
| 1685 |
a running process. To do that, type the following |
| 1686 |
on the remote server:</para> |
| 1687 |
|
| 1688 |
<screen>&prompt.user; <userinput>lldb-server g <replaceable>host:port</replaceable> --attach <replaceable>pid-or-name</replaceable></userinput></screen> |
| 1689 |
</sect3> |
| 1658 |
</sect2> |
1690 |
</sect2> |
| 1659 |
|
1691 |
|
| 1660 |
<sect2> |
1692 |
<sect2> |
| 1661 |
- |
|
|