Skip to content

Commit

Permalink
developers-handbook: tweak introduction to lldb
Browse files Browse the repository at this point in the history
All supported versions of FreeBSD ship with lldb, so we no longer need
to mention FreeBSD version specifics.

While here, make some small tweaks to this text.

Reviewed by:	carlavilla, emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D42333
  • Loading branch information
mhorne committed Oct 23, 2023
1 parent 3ba070a commit 477e130
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -679,28 +679,25 @@ to the file. Once you have done this, you can type `info` and then select [.guim
Using a debugger allows running the program under more controlled circumstances.
Typically, it is possible to step through the program a line at a time, inspect the value of variables, change them, tell the debugger to run up to a certain point and then stop, and so on.
It is also possible to attach to a program that is already running, or load a core file to investigate why the program crashed.
It is even possible to debug the kernel, though that is a little trickier than the user applications we will be discussing in this section.

This section is intended to be a quick introduction to using debuggers and does not cover specialized topics such as debugging the kernel.
For more information about that, refer to crossref:kerneldebug[kerneldebug,Kernel Debugging].

The standard debugger supplied with FreeBSD {rel121-current} is called `lldb` (LLVM debugger).
The standard debugger supplied with FreeBSD is called `lldb` (LLVM debugger).
As it is part of the standard installation for that release, there is no need to do anything special to use it.
It has good command help, accessible via the `help` command, as well as https://lldb.llvm.org/[a web tutorial and documentation].

[NOTE]
====
The `lldb` command is available for FreeBSD {rel113-current} extref:{handbook}ports/[from ports or packages, ports-using] as package:devel/llvm[].
This will install the default version of lldb (currently 9.0).
The `lldb` command is also available extref:{handbook}ports/[from ports or packages, ports-using] as package:devel/llvm[].
====

The other debugger available with FreeBSD is called `gdb` (GNU debugger).
Unlike lldb, it is not installed by default on FreeBSD {rel121-current};
Unlike lldb, it is not installed by default on FreeBSD;
to use it, extref:{handbook}#ports-using/[install] package:devel/gdb[] from ports or packages.
The version installed by default on FreeBSD {rel113-current} is old; instead, install package:devel/gdb[] there as well.
It has quite good on-line help, as well as a set of info pages.
It has excellent on-line help, as well as a set of info pages.

Which one to use is largely a matter of taste.
The two debuggers have a similar feature set, so which one to use is largely a matter of taste.
If familiar with one only, use that one.
People familiar with neither or both but wanting to use one from inside Emacs will need to use `gdb` as `lldb` is unsupported by Emacs.
Otherwise, try both and see which one you prefer.
Expand Down

0 comments on commit 477e130

Please sign in to comment.