[Lldb-commits] [PATCH] D54476: [CMake] Streamline code signing for debugserver

Stefan Gränitz via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 14 09:13:20 PST 2018


sgraenitz marked 2 inline comments as not done.
sgraenitz added inline comments.


================
Comment at: tools/debugserver/source/CMakeLists.txt:128-133
+    # TODO: Following the old behavior, DEBUGSERVER_PATH still points to the
+    # original system binary, even if we copy it over. Keep this?
+    set(DEBUGSERVER_PATH "${lldb_framework_dir}/LLDB.framework/Resources/debugserver" CACHE FILEPATH "" FORCE)
+
+    # If we haven't built a signed debugserver. If possible, copy the one from
+    # the system to make the built debugger functional on Darwin.
----------------
sgraenitz wrote:
> xiaobai wrote:
> > I'm pretty sure that if you do not copy debugserver it will still find the one from your `${lldb_framework_dir}` when you run lldb anyway. Do you know why we copy it over?
> Yes this is what I mean with "old behaviour" here. `DEBUGSERVER_PATH` still points to the original system binary and gets passed to tests, e.g. in `test/CMakeLists.txt` above.
> Do you know why we copy it over?

It was introduced with https://reviews.llvm.org/rL325068 and the commit message points out, that this makes the built debugger functional on Darwin when compiling without code signing. In order to use debugserver on Darwin, it cannot be ad-hoc code signed, but needs a "real" certificate (as documented in docs/code-signing.txt).

Got in touch with Vedant and it seems, that `DEBUGSERVER_PATH` could also point to the copied version. Did that.



https://reviews.llvm.org/D54476





More information about the lldb-commits mailing list