process handle in lldbinit

As of right now, I don't think you can

Allowing this would require one of two things:

  • a model where LLDB records your preferences and applies them to processes as they come about (only the first one? all of them?)
  • a model where LLDB has "event hooks" for things like a process has shown up, a process has gone away, and you could script the hook (via LLDB commands or Python) to perform certain actions, including setting signal handling

One workaround for this is to take the set of commands you want to run in lldb after the file you are debugging is loaded, put them in a file, and run:

$ lldb -s <command file> <FileToBeDebugged>

Then if you like this and use it often, you can make a shell alias of part up to .

If you are using Xcode, a common trick is to set a breakpoint at main in your project, put the commands you want to run there, and then make it "auto-continue".