Claudiu
Claudiu

Reputation: 229281

What is the lldb equivalent of gdb's --args?

I'm used to running gdb like so:

$ gdb --args exe --lots --of --flags -a -b -c d e
...
(gdb) r

Is there an equivalent for lldb?

Upvotes: 36

Views: 25962

Answers (3)

Princekin
Princekin

Reputation: 754

just run 'run arg1 arg2' in lldb

Upvotes: 0

Patryk Gawroński
Patryk Gawroński

Reputation: 175

You can also start lldb first and use:

(lldb) settings set target.run-args 1 2 3
(lldb) run

or:

(lldb) process launch -- <args>

Upvotes: 9

Claudiu
Claudiu

Reputation: 229281

Yes, it's just -- instead of --args. From the help:

lldb -v [[--] <PROGRAM-ARG-1> [<PROGRAM_ARG-2> ...]]

Thus:

$ lldb -- exe --lots --of --flags -a -b -c d e

Upvotes: 42

Related Questions