Does lldb have an equivalent for gdb's shell
command to run external commands from the prompt? (see How can I execute external commands from the gdb command prompt?)
In lldb you can set breakpoints by typing either break or b followed by information on where you want the program to pause. After the b command, you can put either: a function name (e.g., b my_subroutine ) a line number (e.g., b 12 )
lldb is the default debugger in Xcode on macOS and supports debugging C, Objective-C and C++ on the desktop and iOS devices and simulator.
LLDB supports GDB server that QEMU uses, so you can do the same thing with the previous section, but with some command modification as LLDB has some commands that are different than GDB You can run QEMU to listen for a "GDB connection" before it starts executing any code to debug it.
The standard LLDB installation provides you with an extensive set of commands designed to be compatible with familiar GDB commands. In addition to using the standard configuration, you can easily customize LLDB to suit your needs. Both GDB and LLDB are of course excellent debuggers without doubt.
This might be what you're looking for...
(lldb) help platform shell
Run a shell command on a the selected platform. This command takes 'raw'
input (no need to quote stuff).
Syntax: platform shell <shell-command>
Command Options Usage:
platform shell [-t <value>]
-t <value> ( --timeout <value> )
Seconds to wait for the remote host to finish running the command.
IMPORTANT NOTE: Because this command takes 'raw' input, if you use any
command options you must use ' -- ' between the end of the command options
and the beginning of the raw input.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With