In gdb
, I can run automatically the binary as (as per this post):
gdb -ex run /bin/true
What's the equivalent parameter for lldb
?
This works:
echo run | lldb /bin/true
but I'd like to back to debugger console instead.
Reverse Engineering Stack Exchange is a question and answer site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation. It only takes a minute to sign up.
Sign up to join this communityIn gdb
, I can run automatically the binary as (as per this post):
gdb -ex run /bin/true
What's the equivalent parameter for lldb
?
This works:
echo run | lldb /bin/true
but I'd like to back to debugger console instead.
LLDB >= 3.4 has the -o
/ --one-line
command line option that can be used to launch your program automatically:
lldb -o run /bin/true
For reference here are two relevant snippets from lldb-3.6 --help
:
...
-o
--one-line
Tells the debugger to execute this one-line lldb command
after any file provided on the command line has been loaded.
...
Notes:
Multiple "-s" and "-o" options can be provided. They will be
processed from left to right in order, with the source files
and commands interleaved.
...
And for reviewing command line options in a web browser -- here's a link to the lldb-3.4 man page.
Note that with LLDB < 3.4 (and also newer versions) you can use the -s
/ --source
option to bootstrap commands like run
-- for example:
$ echo run > autorun
$ lldb -s autorun -- /bin/echo arg1 arg2
-o run
instead of manually entering run
in LLDB console it is not possible to interrupt the process using Ctrl-C. Is there any way to fix that?
Feb 15, 2018 at 4:22