From owner-dev-commits-doc-all@freebsd.org Mon Dec 28 21:17:14 2020 Return-Path: Delivered-To: dev-commits-doc-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 600BD4C1D84 for ; Mon, 28 Dec 2020 21:17:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4Vk22GJqz4lFb; Mon, 28 Dec 2020 21:17:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B5822031C; Mon, 28 Dec 2020 21:17:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSLHEhR061550; Mon, 28 Dec 2020 21:17:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSLHErj061549; Mon, 28 Dec 2020 21:17:14 GMT (envelope-from git) Date: Mon, 28 Dec 2020 21:17:14 GMT Message-Id: <202012282117.0BSLHErj061549@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Guangyuan Yang Subject: git: 192a5729e5 - main - handbook: add a section on remote debugging via LLDB MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ygy X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 192a5729e55ebddd239731df215b973d39581a29 Auto-Submitted: auto-generated X-BeenThere: dev-commits-doc-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the doc repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 21:17:14 -0000 The branch main has been updated by ygy: URL: https://cgit.FreeBSD.org/doc/commit/?id=192a5729e55ebddd239731df215b973d39581a29 commit 192a5729e55ebddd239731df215b973d39581a29 Author: Guangyuan Yang AuthorDate: 2020-12-28 16:26:55 +0000 Commit: Guangyuan Yang CommitDate: 2020-12-28 21:15:57 +0000 handbook: add a section on remote debugging via LLDB PR: 251709 Obtained from: Moritz Systems Submitted by: Michał Górny Sponsored by: The FreeBSD Foundation Reviewed by: bcr Discussed with: dim, emaste Differential Revision: https://reviews.freebsd.org/D27524 --- .../books/developers-handbook/tools/chapter.xml | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/en_US.ISO8859-1/books/developers-handbook/tools/chapter.xml b/en_US.ISO8859-1/books/developers-handbook/tools/chapter.xml index c7d538f58f..2ce196350e 100644 --- a/en_US.ISO8859-1/books/developers-handbook/tools/chapter.xml +++ b/en_US.ISO8859-1/books/developers-handbook/tools/chapter.xml @@ -1655,6 +1655,48 @@ else if (pid == 0) { /* child */ expr PauseMode = 0 and wait for the sleep() call to return. + + + Remote Debugging Using LLDB + + + The described functionality is available starting with + LLDB version 12.0.0. Users of &os; releases containing an + earlier LLDB version may wish to use the snapshot + available in ports + or packages, as + devel/llvm-devel. + + + Starting with LLDB 12.0.0, remote debugging is supported + on &os;. This means that lldb-server + can be started to debug a program on one host, while + the interactive lldb client connects + to it from another one. + + To launch a new process to be debugged remotely, run + lldb-server on the remote server + by typing + + &prompt.user; lldb-server g host:port -- progname + + The process will be stopped immediately after launching, + and lldb-server will wait for the client + to connect. + + Start lldb locally and type + the following command to connect to the remote + server: + + (lldb) gdb-remote host:port + + lldb-server can also attach to + a running process. To do that, type the following + on the remote server: + + &prompt.user; lldb-server g host:port --attach pid-or-name +