

(lldb) breakpoint set -source-pattern regular-expression -file SourceFile (gdb) shell grep -e -n pattern source-file Set a breakpoint by a regular expression on a source file’s contents. (lldb) breakpoint set -regex regular-expression Set a breakpoint by a regular expression on a function name. (Note: This will break on any C or C++ functions named count.) Set a breakpoint at all Objective-C methods whose selector is count. Set a breakpoint at an Objective-C function:. (Note: This will break on any C functions named main.) Set a breakpoint at all C++ methods whose basename is main. (lldb) breakpoint set -file test.c -line 12 Set a breakpoint in file test.c at line 12. Set a breakpoint at all functions named main. Step out of the currently selected frame.īacktrace and disassemble every time you stop.Įnter your stop hook command(s).


(lldb) process attach -name a.out -waitforĪttach to a remote GDB protocol server running on the system eorgadd, port 8000.Īttach to a remote GDB protocol server running on the local system, port 8000.Īttach to a Darwin kernel in kdp mode on the system eorgadd.ĭo a source-level single step in the currently selected thread.ĭo a source-level single step over in the currently selected thread.ĭo an instruction-level single step in the currently selected thread.ĭo an instruction-level single step over in the currently selected thread. Wait for a process named a.out to launch and attach. Set environment variables for process and launch process in one command.Īttach to the process with process ID 123. (lldb) settings set target.env-vars DEBUG=1 Set environment variables for process before launching. (lldb) process launch -tty=/dev/ttys006. Launch a process with arguments in an existing Terminal window, /dev/ttys006 (OS X only). Launch a process with arguments in a new terminal window (OS X only). Launch process a.out with arguments 1 2 3 without having to supply the args every time.
