<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/98418>98418</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            lldb fails to launch a process
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          perlboy-emeritus
      </td>
    </tr>
</table>

<pre>
    
Also reported on stack overload 7/9/2024.

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 with lldb when written. 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.

To compile julian.c and all other C programs I wish to debug:

gcc -g julian.c -o julian

or to compare compiler error messages, sometimes cc or clang, since clang is more verbose.

NOTE: I just reviewed my earlier post (stack overload) from 2018 re lldb and I can see lldb worked for me at macOS 10.13.3. I tried running -g compiled C from 2018 in current lldb, and all fail as reported below. Recompiling with my current mix of tools is ineffective.

$ 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

Me thinks lldb is trying to do a fork and exec and has not correctly set the path to the executable image, although is did find the source code and symbols.  Any help will be greatly appreciated. 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzcV8-O474NfhrlQtiwlUz-HHKYmTToAPvbBbqDXgvZom3tyJIhycm4T19QsifJLlCg1wZBYssiRX4kP9LCe9UaxCN7emFPp5UYQ2fdcUCnKztl2KNTYfSrysrpyIoTK56ftbfgcLAuoARrwAdRf4C9oNNWSNgxfj4wfuYF3-RJJP2-gUM9kYTWsoJgoVEGszAaBGEk-DDKCfoJaisR7BBUr_4tgrLGg_AgDIhh0Aol9CJ0oIwPbqyDdYy_JgW2x85e6XZwthKVnmAcWiekMi2gCh066EX94ycdXhZ5uc63tNs6CB2CFj5AbftBaXTgRxUQGmd7eB4GjdDEbSLABZ1X1oBtotiPn1A5-4HRrRz-jg5BeRDgO-sCNE60PZqQw3uHi3oJr2CrX1gHOv_XqJUwdKU8jEb1BK4wAZQBFTzqhgCIqFXYiQv6eLAXPcJVTHBVoQO8oJsgut460cMb0M55-epUCGgI_NApTyh0ymAOb1DTybsAnhR1OEdH1GEUWk-za8KDCtAJDxWiiUhDUD2CV6ZGeAODKFESrqNfkHhfMI073-iJBBU9VgGu1n2ghAFdg3XQU4yiX8zuhblzxifgrwRtQE-JF32OpkajZwdz-AcmiCnkBNKXBmnRg7EBHHqrL7g8rTT2OVBWkwUOKa-EjvIx7ozvPIWt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