libsystem_c.dylib`printf + 174 frame #5: 0x0000000100000f6d test`main at test.c:5:2 frame #6: 0x00007fff6c5dc3d5 libdyld.dylib`start + 1 (lldb) source list 3 int main(void) { 4 char msg = "Hello, world!\n"; 5 printf("%s", msg); 6 return 0; 7 } From the line beginning with frame #5, LLDB indicates that the error is at line 5 of test.c. Running source list, we see that this refers to the call to printf. According to the exception code EXC_BAD_ACCESS from the backtrace, strlen is trying to read from a region of memory it does not have access to by dereferencing an invalid pointer. Returning to the source code, we see that the variable msg is of type char but contains a string instead of a character. To fix the problem, we modify the code to indicate that msg is a pointer to a string of chars by adding the * operator: #include <stdio.h> int main(void) { char* msg = "Hello, world!\n"; printf("%s", msg); return 0; } After recompiling and running the executable again, LLDB now gives the correct result: (lldb) target create "test" Current executable set to 'test' (x86_64). (lldb) run Process 93319 launched: '/Users/wikipedia/test' (x86_64) Hello, world! Process 93319 exited with status = 0 (0x00000000) (lldb) LLDB runs the program, which prints the output of printf to the screen. After the program exits normally, LLDB indicates that the process running the program has completed, and prints its exit status. See also GNU Debugger Microsoft Visual Studio Debugger References External links Supported LLDB Versions in Qt Creator Debuggers Free software programmed in C++ Lua (programming language)-scriptable software Software using the NCSA license Software using the Apache license Video game development software for Linux