Post

Replies

Boosts

Views

Activity

Problem when trying to debug with lldb on new arm64 M1
Hi everybody, I’m the maintainer of GNU Prolog (gprolog). I try to port it to the new arm64/darwin apple architecture since a contributor gave me an ssh access to its machine (I can thus only execute commands via command-line bash). I can compile gprolog (it uses a classical unix-style procedure ./configure + make using gcc (clang)). The machine is pretty fast ! However, at run-time I obtain a segmentation violation which I’d like to debug using lldb. I initially obtained this error:  error: process exited with status -1 (developer mode is not enabled on this machine and this is a non-interactive debug session.) I asked the owner of the machine to enable the developer mode. But now I obtain: error: process exited with status -1 (this is a non-interactive debug session, cannot get permission to debug processes.) I saw several posts mentioning entitlements (I’m sorry I’m not an expert of Mac). Here is what I obtain with my executable (I created a simple test case executable called ./t): codesign -d -vvv --entitlements :- ./t Executable=/Users/ddiaz/GP/src/BipsPl/t Identifier=t Format=Mach-O thin (arm64) CodeDirectory v=20400 size=8410 flags=0x20002(adhoc,linker-signed) hashes=260+0 location=embedded Hash type=sha256 size=32 CandidateCDHash sha256=c0ddf4ad6672b7c65b2a90d274bb29783625d502 CandidateCDHashFull sha256=c0ddf4ad6672b7c65b2a90d274bb29783625d5021b6e1d67c6be5c7774c265b5 Hash choices=sha256 CMSDigest=c0ddf4ad6672b7c65b2a90d274bb29783625d5021b6e1d67c6be5c7774c265b5 CMSDigestType=2 CDHash=c0ddf4ad6672b7c65b2a90d274bb29783625d502 Signature=adhoc Info.plist=not bound TeamIdentifier=not set Sealed Resources=none Internal requirements=none I saw, in some posts, a permission com.apple.security.get-task-allow which should be enable. Do you think the problem comes from this permission ? How can I add it using command-line console ? Thanks you for your help Didou
4
0
8.9k
Apr ’21