GDB equivalent of "-x" option in lldb

Do we have "-x" like option in lldb, which help us to pass set of lldb command in a file. i know about python scripting in lldb but i am looking for "-x" like option in lldb which could allow me not to write a python script . Example

if i do following

#lldb

(lldb)process attach -n CoRD

(lldb)breakpoint set -n tcp_connect

(lldb)breakpoint set -n tcp_send

(lldb) c



then script "test" should contain above command in lldb context and should be passed as something like


#lldb -x test

and it should execute all command from process attach to c


is there exists something like this?

Yes, though lldb allows a few more options than gdb. You can provide commands to run either before or after the file provided on the command line is read in. You can also provide single lldb commands. You can provide more than one file or single command, and they will get run in the order they appear on the command line. Anyway, try running "lldb --help" in Terminal and you will get a full description of the various options.

GDB equivalent of "-x" option in lldb
 
 
Q