I rely on lldb to fine-tune and study my code optimizations as an applied math instructor, and somehow, probably upgrading either macOS to 10.13.6, or the last compiler suite from Apple for that version of the OS broke lldb. Here is a short fragment. The compiled C object, julian, is unimportant in itself as lldb behaves the same way with every C program I have every written on this machine. I can’t say when lldb actually broke as it has been some time since I needed to use lldb. The last time I used it, it worked perfectly, as I have many C programs that were tested when written with lldb. Recompiling the programs does not resolve the problem. Also, reinstalling Apple’s command line tools fails to fix the problem, nor does compiling with alternate front ends.
$ lldb julian
(lldb) target create "julian"
Current executable set to 'julian' (x86_64).
(lldb) b main
Breakpoint 1: where = julian`main + 22 at julian.c:23, address = 0x0000000100000a86
(lldb) l
21 int main(int argc, char** argv) {
22 int day, month, year, yearDay;
23 day = month = year = yearDay = 0;
24
25 if (argc == 1 || (argc == 2 && ((strcmp(argv[1], "-h") == 0) || strcmp(argv[1], "--help") == 0))) {
26 usage(argv[0]);
27 return 0;
28 }
29
30 switch (argc) {
(lldb) run
error: No such file or directory
(lldb)
I include this listing as is to show that lldb, indeed, has found and opened the source. Here are relevant details from environment:
macOS: 10.13.6
gcc: $ /usr/bin/gcc -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include- dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
clang: $ clang -v
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
lldb: $ lldb -v
lldb-1000.0.38.2
Swift-4.2
Any help will be greatly appreciated. Please don’t say scrap HS and move to a newer macOS. Configuring a new machine with all of the stuff I have on HS is out of the question, as I have years of Perl and C I rely on in my role as instructor of applied math.