[MacPorts] #63412: lldb-10 @10.0.1_1 debugger will not run programs

MacPorts noreply at macports.org
Fri Aug 27 11:22:00 UTC 2021


#63412: lldb-10 @10.0.1_1 debugger will not run programs
-----------------------+----------------------
 Reporter:  snowflake  |      Owner:  kencu
     Type:  defect     |     Status:  assigned
 Priority:  Normal     |  Milestone:
Component:  ports      |    Version:  2.7.99
 Keywords:             |       Port:  lldb-10
-----------------------+----------------------
 OS = macOS 10.11.6

 Xcode lldb keeps on crashing, so I wanted to give Macports lldb-10 a try.

 I followed the instructions in the activation message to generate a
 certificate and codesign the server.

 lldb-10 is not able to run a program.

 Here's a very simple hello program whcih it won't run:

 {{{
 Script started on Fri Aug 27 11:48:10 2021
 command: lldb-mp-10 -f hello -X
 (lldb) target create "hello"
 Current executable set to '/Users/davidevans/junk/hello/hello' (x86_64).
 (lldb) list
    5    main(){
    6      int x = 0;
    7      while(1){
    8        printf("hello world %d\n",x);
    9        x++;
    10       sleep(1);
    11     }
    12   }
 (lldb) br set -n main
 Breakpoint 1: where = hello`main + 15 at hello.c:6:7, address =
 0x0000000100000f3f
 (lldb) run
 error: process exited with status -1 (Error 1)
 (lldb) quit

 Script done on Fri Aug 27 11:48:44 2021
 }}}

 Here's the script I used to codesign the server:
 {{{
 #!/bin/sh

 # This note is output after install of lldb-10
 # Please follow the instructions at
 # https://lldb.llvm.org/resources/build.html#code-signing-on-macos
 # and then codesign lldb-server with:

 # Note: I deleted resource-rules from --preserve-metadata
 # Note I deleted more --preserve-metadata options

 sudo codesign --verbose=4 --force --deep \
      --preserve-metadata=identifier,entitlements,requirements \
      --sign "lldb_codesign" \
      /opt/local/libexec/llvm-10/bin/lldb-server
 }}}

 I deleted some of the metadata options because codesign was complaining. I
 used only the options listed in man codesign.
 `codesign --verify -vv` gives this:
 {{{
 /opt/local/libexec/llvm-10/bin/lldb-server: valid on disk
 /opt/local/libexec/llvm-10/bin/lldb-server: satisfies its Designated
 Requirement
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/63412>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list