Posts

Post not yet marked as solved
3 Replies
623 Views
I am building simple command-line programs in C. When I run LLDB on the command line on any such executable , even though I set a breakpoint in main, LLDB always runs to termination and reports an error. Below is an example: ~ % clang -Wall -g prog.c -o prog aviram@csaamdS278stma ~ % lldb prog (lldb) target create "prog" Current executable set to '/Users/aviram/prog' (x86_64). (lldb) breakpoint set --name main Breakpoint 1: where = progmain + 15 at prog.c:73:21, address = 0x0000000100003ebf (lldb) run Process 99926 launched: '/Users/aviram/prog' (x86_64) Process 99926 exited with status = -1 (0xffffffff) lost connection (lldb) ` Note that it says "lost connection" even though I am _ remote debugging. This happens with every executable I build._ Details: 2019 MacBook Pro (x86_64, Sonoma); Apple Clang 12.0.0 (downloaded with Xcode 15.0.1). Why is this happening and what can I do to debug my program (for real) using LLDB from the command line? Thanks.
Posted Last updated
.