Add usage info for backtick to the lldb tutorial.

This commit is contained in:
Jim Ingham
2023-02-02 13:46:42 -08:00
parent 506621fac4
commit d98086036a

View File

@@ -20,10 +20,23 @@ Unlike gdb's command set, which is rather free-form, we tried to make the lldb c
The command line parsing is done before command execution, so it is uniform
across all the commands. The command syntax for basic commands is very simple,
arguments, options and option values are all white-space separated, and
double-quotes are used to protect white-spaces in an argument. If you need to
put a backslash or double-quote character in an argument you back-slash it in
the argument. That makes the command syntax more regular, but it also means you
may have to quote some arguments in lldb that you wouldn't in gdb.
either single or double-quotes (in pairs) are used to protect white-spaces
in an argument. If you need to put a backslash or double-quote character in an
argument you back-slash it in the argument. That makes the command syntax more
regular, but it also means you may have to quote some arguments in lldb that
you wouldn't in gdb.
There is one other special quote character in lldb - the backtick.
If you put backticks around an argument or option value, lldb will run the text
of the value through the expression parser, and the result of the expression
will be passed to the command. So for instance, if "len" is a local
int variable with the value 5, then the command:
::
(lldb) memory read -c `len` 0x12345
will receive the value 5 for the count option, rather than the string "len".
Options can be placed anywhere on the command line, but if the arguments begin