The LLDB command-line debugger provides underlying debugging services for development on all Apple platforms.

Posts under LLDB tag

144 Posts

Post

Replies

Boosts

Views

Activity

How do I get source code debugging in LLDB for System Extensions?
Following the instructions found here as well as around the Developer Forums, I've successfully managed to begin debugging my system extension on a virtual machine. Unfortunately, after archiving my system extension and copying over the .app file to my virtual machine, my .app loses access to the source code (on my host machine) and hitting any beak points via lldb yields me hard-to-read assembly code. How do I also get source code when attaching lldb to a system extension?
4
0
2.0k
Mar ’22
Whats wrong with my watch during debugging?
When I set breakpoints I keep getting Invalid expression for variables that are clearly set and there "in context". Furthermore lets say I have an object X with a property y I'm able to check object X with all of its properties but If i try to watch for X.y I get "Invalid expression" this doesnt make much sense... I even try to add watch directly from X.y in the watch section but then I got this error Details Failed to set watch point Domain: IDEDebugSessionErrorDomain Code: 2 Failure Reason: error: Watchpoint creation failed (addr=0x282efac68, size=8, variable expression='self.controller'). error: sending gdb watchpoint packet failed User Info: {   DVTRadarComponentKey = 855031; } -- System Information macOS Version 12.1 (Build 21C52) Xcode 13.2.1 (19586) (Build 13C100) Timestamp: 2022-03-02T15:45:33Z I've looked into my build options for the project and optimizations are set to None on Debug... Am I missing something?
0
0
1.4k
Mar ’22
Xcode console glitch
This is what my Xcode 13.2.1 console looks like: Basically, it has one single-char column and every input or output is wrapped to a new line for every typed/printed char. The only recent change on my mac was it being force-updated to Monterey by my company MDM solution, a couple of days ago. I happen to have Xcode 13.1 installed, and have the same result with it. My next step is to uninstall, download and reinstall the latest version. Does anyone know how to fix it?
1
0
1.4k
Feb ’22
Xcode breaks with SIGCONT before OpenURL handler is called
We define an event handler for OpenURL NSAppleEventManager *appleEventManager = [NSAppleEventManager sharedAppleEventManager]; [appleEventManager setEventHandler:self andSelector:@selector(handleGetURLEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; And we handle it here: (void)handleGetURLEvent:(NSAppleEventDescriptor *)event            withReplyEvent:(NSAppleEventDescriptor *)replyEvent { // Handler type stuff } If I'm debugging in Xcode, I see a SIGCONT before the handler is called. When I continue from the SIGCONT, I enter the handler and everything is fine. This causes automated tests to break, and is generally a pain in the you-know-where. Outside of Xcode it's fine. How can I make it stop doing this? Is there some Xcode setting I've overlooked?
5
0
2.0k
Feb ’22
debug server issue
Facing issues with running debug server for go land and visual studio code. Up on checking the console.app i found the below log line. error: failed to launch process /Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/debugserver: failed to get the task for process 11168 go version go1.17.6 darwin/amd64. Delve Debugger Version: 1.8.0 Build: $Id: 6a6c9c332d5354ddf1f8a2da3cc477bd18d2be53 $ mac os monterey 21.1 command line tools 13 All the mentioned tools above are installed in my local
0
0
1.1k
Jan ’22
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
11k
Jan ’22
lldb error
This is what I am getting every time I close the app. Please suggest alternatives for Xcode 13 dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/sarthaks/Library/Developer/Xcode/DerivedData/Dicee-iOS13-bwfmsdtnysirovgrfszwvnzssntm/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib DYLD_FRAMEWORK_PATH=/Users/sarthaks/Library/Developer/Xcode/DerivedData/Dicee-iOS13-bwfmsdtnysirovgrfszwvnzssntm/Build/Products/Debug-iphonesimulator CoreSimulator 776.4 - Device: iPhone 13 (282367A5-90FC-4D78-85A7-8D400EC8C281) - Runtime: iOS 15.0 (19A339) - DeviceType: iPhone 13 (lldb)
0
0
724
Jan ’22
macOS Xcode debugging: can I single-step just one thread while another thread runs free?
This seems like a very basic question but I couldn't find an answer to this yet: I have a simple C++ command-line application which has its main() thread and from this it forks a service pthread (BSD thread). This service thread performs the I/O on the console. When I just let it run, it works as expected. The question is: I would like to pause and single-step only the main() thread while the service thread continues to run free in the background, but so far the Xcode debugger insists on always pausing or resuming all threads at the same time, apparently (regardless whether the pause was due to clicking the pause icon or hitting a breakpoint in either thread). Have I overlooked something or is it in fact impossible in Xcode to pause and single-step only one of the threads in a Mac application? (I'm not questioning that in most cases the observed behaviour is the desired and most practical one, I'd just need single-thread debugging right now.)
1
0
1.9k
Dec ’21
Getting kernel stack traces from panic (macOS)
I am getting regular kernel panics. I have a Kern*.panic file, and a .contents.panic These files now contain a 'macOSProcessedStackshotData' and so are encoded. I'm a dev, but not familiar with Apple Kernel debugging (though I've done this before on windows/aix/linux). How can I get some simple info from the panic, such as kernel backtrace, loaded drivers etc? Ideally I'm looking for a few points to specific drivers (maybe I can unplug a device) or situations I can avoid
2
0
1.3k
Nov ’21
Flush Metal rendering when program is paused in LLDB?
I watched a WWDC talk on LLDB, and they showed a nice trick of calling CATransaction.flush() from the debugger, to push changes to a UIView to the screen, even when the program was paused. Is there is a similar thing we can do with Metal? I'm using MTKView, but I can change to a lower level if that's required. The MTKView is paused, so I'm using setNeedsDisplay. As usual, I implement the draw delegate method to encode and commit a command buffer. If I do this from LLDB: metalView.setNeedsDisplay() CATransaction.flush() I can see that causes my draw function to run, but nothing shows up on screen. Is there something else we can do to flush those metal commands to the GPU and see them on screen while stepping through the program with the debugger?
1
0
982
Nov ’21
lldb crash
I have used Xcode 12.4, lldb in Xcode 12.4 work ok, it can Add Expression or Use p or po in LLDB command Line. but After I upgrade my OS and Xcode, p or po will trigger LLDB RPC server crash ."The LLDB RPC server has crashed. You may need to manually terminate your process. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log." lldb-rpc-server_2021-10-28-145717_chenxi.crash OS:macOS Big Sur 11.6 Xcode: 13.0 download from AppStore or 13.2beta download from https://developer.apple.com/download/all/ please refer to the attachment for more details. and tell me how to slove this problem 。 thanks
1
1
1.9k
Nov ’21
Debugging on iOS 15 is terribly slow in Xcode
I'm using Xcode 12 with iPhone 12 Pro. Everything worked fine on iOS 14. But after I updated my device to iOS 15 I’m getting the app's splash screen for more than a minute every time I build the app. I've also tried to use Xcode 13 with the iOS 15 device, and it also seems to be broken!  Moreover, when I use a breakpoint and it stops I need to wait for 30-50 seconds to step over or to continue program execution. Does anyone have these problems too?
2
0
4.5k
Oct ’21
VR project crash in xcode simulator
I try to run the game in xcode simulator but it always crashes. HELP pls... on android works fine. Warning: Error creating LLDB target at path '/Users/vylegalovi/Library/Developer/Xcode/DerivedData/Unity-iPhone-efppyotdzukdtyampzmbagbszvbv/Build/Products/Release-iphonesimulator/VRMetroEscape.app'- using an empty LLDB target which can cause slow memory reads from remote devices. W0929 23:53:04.273332 1 commandlineflags.cc:1311] Ignoring RegisterValidateFunction() for flag pointer 0x12ffae050: no flag found at that address CrashReporter: initialized 2021-09-29 23:53:04.485 VRMetroEscape[25809:2206250] Built from '2019.3/staging' branch, Version '2019.3.0f6 (27ab2135bccf)', Build type 'Development', Scripting Backend 'il2cpp' -> applicationDidFinishLaunching() PlayerConnection initialized from /Users/vylegalovi/Library/Developer/CoreSimulator/Devices/D4E84443-11FF-4B7D-8EBD-01895B9BA6B1/data/Containers/Bundle/Application/F8344320-D856-41B5-8AC5-639E39AC54AB/VRMetroEscape.app/Data (debug = 0) PlayerConnection initialized network socket : 0.0.0.0 55000 Multi-casting "[IP] 192.168.201.3 [Port] 55000 [Flags] 2 [Guid] 2011080506 [EditorId] 0 [Version] 1048832 [Id] iPhonePlayer(David-MacBook-Air.local):56000 [Debug] 0 [PackageName] iPhonePlayer [ProjectName] <no name>" to [225.0.0.222:54997]... Started listening to [0.0.0.0:55000] PlayerConnection already initialized - listening to [0.0.0.0:55000] 2021-09-29 23:53:04.816017+0200 VRMetroEscape[25809:2206250] Cannot find executable for CFBundle 0x7fc14c4bbee0 </System/Library/Frameworks/Metal.framework> (not loaded) 2021-09-29 23:53:04.971547+0200 VRMetroEscape[25809:2206250] Cannot find executable for CFBundle 0x7fc14df51ab0 </System/Library/Frameworks/QuartzCore.framework> (not loaded) -> applicationDidBecomeActive() [Subsystems] Discovering subsystems at path /Users/vylegalovi/Library/Developer/CoreSimulator/Devices/D4E84443-11FF-4B7D-8EBD-01895B9BA6B1/data/Containers/Bundle/Application/F8344320-D856-41B5-8AC5-639E39AC54AB/VRMetroEscape.app/Data/UnitySubsystems GfxDevice: creating device client; threaded=1 gfx device intialization failed
0
0
919
Sep ’21
What causes lldb_unnamed_symbol
Hello: I'm linking my Swift app against an Objective-c framework. I can call all the methods within the class in the framework, except for one. When I try and call it, I get an exception: #0 0x00007fff2037b829 in objc_msgSend () #1 0x000000010f856df4 in ___lldb_unnamed_symbol147$$MyFramework () I don't think it's the signature of the method, I can jump to the definition in the header file and the definition of the parameters the method needs. And even if it was a signature mismatch, that's a compile error. So what would cause an error like this. Thanks in advance for your time John
3
0
3.2k
Sep ’21
EXC_BAD_ACCESS (code=1, address=0x10) when implement logic operation to NULL pointer
Hello. I'm just studying C programming, and I have a trouble with impossibility to implement logic operation to pointer with NULL value. For example: int * ptr; ptr = NULL: if (ptr) { printf("Ptr isn't NULL\n"); } else { printf("Ptr is NULL\n"); } I get exception = EXC_BAD_ACCESS (code=1, address=0x10). The real case in lldb debugger in picture. Please, help me. This issue really breaks programming principles which I must learn.
1
0
1.9k
Sep ’21
Library not found for -lFirebaseDynamicLinks
Library not found for -lFirebaseDynamicLinks is the real issue that I am facing in my Xcode 12.4~ followed by linker command. THE SPECIFIC ERROR CODE. : Library not found for -lFirebaseDynamicLinks : Linker command failed with exit code 1 (use -v to see invocation) THE PACKAGE JSON FILE { "name": "Sample Project Name", "version": "0.0.1", "private": true, "engines": { "node": "&gt;=8.15.1" }, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start --reset-cache", "reset": "rm -rf node_modules/ &amp;&amp; npm cache clear &amp;&amp; watchman watch-del-all &amp;&amp; yarn install", "test:file": "jest", "test": "jest --verbose --coverage", "test:coverage": "jest --verbose --coverage --coverageDirectory=coverage --colors", "test:update": "jest --verbose --coverage --updateSnapshot", "test:watch": "jest --verbose --watch", "tsc": "tsc", "lint:fix": "tslint --project tsconfig.json --fix", "tslint-check": "tslint-config-prettier-check ./tslint.json", "postinstall": "node tools/checkNodeVersion.js &amp;&amp; npx jetify", "android": "react-native run-android", "android:apk:debug": "cd android &amp;&amp; ./gradlew assembleDebug &amp;&amp; open ./app/build/outputs/apk/", "android:apk:install": "cd android &amp;&amp; ./gradlew installDebug", "android:apk:release": "cd android &amp;&amp; ./gradlew assembleRelease &amp;&amp; open ./app/build/outputs/apk/", "android:build-bundle": "react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/", "android:device": "adb reverse tcp:8081 tcp:8081 &amp;&amp; npm run android", "android:log": "react-native log-android", "ios": "react-native run-ios", "ios:log": "react-native log-ios", "lint": "eslint . --ext .js,.jsx,.ts,.tsx" }, "dependencies": { "@invertase/react-native-apple-authentication": "^2.1.2", "@notifee/react-native": "^1.3.1", "@react-native-community/async-storage": "^1.12.1", "@react-native-community/clipboard": "^1.2.3", "@react-native-community/datetimepicker": "^3.0.2", "@react-native-community/google-signin": "^4.0.3", "@react-native-community/masked-view": "^0.1.10", "@react-native-community/netinfo": "^5.9.7", "@react-native-community/viewpager": "^4.1.6", "@react-native-firebase/analytics": "^12.1.0", "@react-native-firebase/app": "^12.1.0", "@react-native-firebase/auth": "^12.1.0", "@react-native-firebase/dynamic-links": "^12.1.0", "@react-native-firebase/storage": "^12.1.0", "@react-navigation/bottom-tabs": "^5.7.3", "@react-navigation/drawer": "^5.8.7", "@react-navigation/material-top-tabs": "^5.2.16", "@react-navigation/native": "^5.7.2", "@react-navigation/stack": "^5.8.0", "@twotalltotems/react-native-otp-input": "1.3.7", "axios": "^0.20.0", "moment": "^2.27.0", "react": "16.13.1", "react-native": "0.63.0", "react-native-autolink": "^4.0.0", "react-native-countdown-component": "^2.7.1", "react-native-country-picker-modal": "^2.0.0", "react-native-create-thumbnail": "^1.2.1", "react-native-device-info": "^5.6.5", "react-native-dropdownalert": "^4.3.0", "react-native-elements": "^2.1.0", "react-native-fs": "^2.16.6", "react-native-gesture-handler": "^1.8.0", "react-native-image-picker": "^2.3.4", "react-native-keyboard-aware-scroll-view": "^0.9.4", "react-native-localize": "^1.4.1", "react-native-modal": "^11.5.6", "react-native-modal-datetime-picker": "^8.9.3", "react-native-modal-selector": "^2.0.3", "react-native-progress": "^4.1.2", "react-native-reanimated": "^1.10.1", "react-native-responsive-screen": "^1.4.2", "react-native-safe-area-context": "^3.1.1", "react-native-screens": "^2.9.0", "react-native-share": "^3.7.1", "react-native-splash-screen": "^3.2.0", "react-native-super-grid": "^4.0.3", "react-native-svg": "^12.1.0", "react-native-swipe-gestures": "^1.0.5", "react-native-switch-selector": "^2.0.6", "react-native-tab-view": "^2.15.1", "react-native-vector-icons": "^7.0.0", "react-native-video": "^5.1.0-alpha8", "react-native-video-cache": "^2.0.5", "react-native-videoeditorsdk": "^2.5.0", "react-navigation": "^4.4.0", "react-navigation-stack": "^2.8.2", "react-navigation-tabs": "^2.9.0", "react-redux": "^7.2.0", "redux": "^4.0.5", "redux-saga": "^1.1.3", "reflect-metadata": "^0.1.13" }, "devDependencies": { "@babel/core": "^7.8.4", "@babel/runtime": "^7.8.4", "@react-native-community/cli-debugger-ui": "^4.9.0", "@react-native-community/eslint-config": "^1.1.0", "@types/jest": "^25.2.3", "@types/react-native": "^0.63.1", "@types/react-native-vector-icons": "^6.4.5", "@types/react-test-renderer": "^16.9.2", "@typescript-eslint/eslint-plugin": "^2.27.0", "@typescript-eslint/parser": "^2.27.0", "babel-jest": "^25.1.0", "eslint": "^6.5.1", "jest": "^25.1.0", "metro-react-native-babel-preset": "^0.59.0", "prettier": "^2.0.4", "react-native-svg-transformer": "^0.14.3", "react-test-renderer": "16.13.1", "typescript": "^3.8.3" }, "jest": { "preset": "react-native", "moduleFileExtensions": [ "ts", "tsx", "js", "jsx", "json", "node" ] } } If I remove the React Native Firebase Dynamic Links library the project works fine otherwise it is dropping this error up above. I have tried all previous versions the same error occurs. I have tried Build Active Architecture also didn't work. And a couple of Xcode settings also. I also tried resetting the derived data and whole Xcode but no fix. I want to use RNDynamicLinks library in my project.
0
0
2.1k
Sep ’21
How do I get source code debugging in LLDB for System Extensions?
Following the instructions found here as well as around the Developer Forums, I've successfully managed to begin debugging my system extension on a virtual machine. Unfortunately, after archiving my system extension and copying over the .app file to my virtual machine, my .app loses access to the source code (on my host machine) and hitting any beak points via lldb yields me hard-to-read assembly code. How do I also get source code when attaching lldb to a system extension?
Replies
4
Boosts
0
Views
2.0k
Activity
Mar ’22
M1 Pro Xcode 13.2.1 breakpoint debugging
Invalid breakpoint debugging. Tried several versions of Xcode.The breakpoint before app startup can take effect, and the breakpoint after that will not take effect. What caused the problem? My colleagues also encountered the same problem and the same configuration
Replies
0
Boosts
0
Views
814
Activity
Mar ’22
Whats wrong with my watch during debugging?
When I set breakpoints I keep getting Invalid expression for variables that are clearly set and there "in context". Furthermore lets say I have an object X with a property y I'm able to check object X with all of its properties but If i try to watch for X.y I get "Invalid expression" this doesnt make much sense... I even try to add watch directly from X.y in the watch section but then I got this error Details Failed to set watch point Domain: IDEDebugSessionErrorDomain Code: 2 Failure Reason: error: Watchpoint creation failed (addr=0x282efac68, size=8, variable expression='self.controller'). error: sending gdb watchpoint packet failed User Info: {   DVTRadarComponentKey = 855031; } -- System Information macOS Version 12.1 (Build 21C52) Xcode 13.2.1 (19586) (Build 13C100) Timestamp: 2022-03-02T15:45:33Z I've looked into my build options for the project and optimizations are set to None on Debug... Am I missing something?
Replies
0
Boosts
0
Views
1.4k
Activity
Mar ’22
Xcode console glitch
This is what my Xcode 13.2.1 console looks like: Basically, it has one single-char column and every input or output is wrapped to a new line for every typed/printed char. The only recent change on my mac was it being force-updated to Monterey by my company MDM solution, a couple of days ago. I happen to have Xcode 13.1 installed, and have the same result with it. My next step is to uninstall, download and reinstall the latest version. Does anyone know how to fix it?
Replies
1
Boosts
0
Views
1.4k
Activity
Feb ’22
Need kernel debug kit for 11.6 20G165
Now more than ever, it would really help if it were S.O.P. for Apple was to simultaneously release each KDK with each system update. System volume sealing makes the work-arounds for missing KDKs quite painful.
Replies
5
Boosts
0
Views
1.8k
Activity
Feb ’22
Xcode breaks with SIGCONT before OpenURL handler is called
We define an event handler for OpenURL NSAppleEventManager *appleEventManager = [NSAppleEventManager sharedAppleEventManager]; [appleEventManager setEventHandler:self andSelector:@selector(handleGetURLEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; And we handle it here: (void)handleGetURLEvent:(NSAppleEventDescriptor *)event            withReplyEvent:(NSAppleEventDescriptor *)replyEvent { // Handler type stuff } If I'm debugging in Xcode, I see a SIGCONT before the handler is called. When I continue from the SIGCONT, I enter the handler and everything is fine. This causes automated tests to break, and is generally a pain in the you-know-where. Outside of Xcode it's fine. How can I make it stop doing this? Is there some Xcode setting I've overlooked?
Replies
5
Boosts
0
Views
2.0k
Activity
Feb ’22
debug server issue
Facing issues with running debug server for go land and visual studio code. Up on checking the console.app i found the below log line. error: failed to launch process /Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/debugserver: failed to get the task for process 11168 go version go1.17.6 darwin/amd64. Delve Debugger Version: 1.8.0 Build: $Id: 6a6c9c332d5354ddf1f8a2da3cc477bd18d2be53 $ mac os monterey 21.1 command line tools 13 All the mentioned tools above are installed in my local
Replies
0
Boosts
0
Views
1.1k
Activity
Jan ’22
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
Replies
4
Boosts
0
Views
11k
Activity
Jan ’22
lldb error
This is what I am getting every time I close the app. Please suggest alternatives for Xcode 13 dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/sarthaks/Library/Developer/Xcode/DerivedData/Dicee-iOS13-bwfmsdtnysirovgrfszwvnzssntm/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib DYLD_FRAMEWORK_PATH=/Users/sarthaks/Library/Developer/Xcode/DerivedData/Dicee-iOS13-bwfmsdtnysirovgrfszwvnzssntm/Build/Products/Debug-iphonesimulator CoreSimulator 776.4 - Device: iPhone 13 (282367A5-90FC-4D78-85A7-8D400EC8C281) - Runtime: iOS 15.0 (19A339) - DeviceType: iPhone 13 (lldb)
Replies
0
Boosts
0
Views
724
Activity
Jan ’22
macOS Xcode debugging: can I single-step just one thread while another thread runs free?
This seems like a very basic question but I couldn't find an answer to this yet: I have a simple C++ command-line application which has its main() thread and from this it forks a service pthread (BSD thread). This service thread performs the I/O on the console. When I just let it run, it works as expected. The question is: I would like to pause and single-step only the main() thread while the service thread continues to run free in the background, but so far the Xcode debugger insists on always pausing or resuming all threads at the same time, apparently (regardless whether the pause was due to clicking the pause icon or hitting a breakpoint in either thread). Have I overlooked something or is it in fact impossible in Xcode to pause and single-step only one of the threads in a Mac application? (I'm not questioning that in most cases the observed behaviour is the desired and most practical one, I'd just need single-thread debugging right now.)
Replies
1
Boosts
0
Views
1.9k
Activity
Dec ’21
Catch SIGINT in Xcode 12.5.1
In Xcode, I want to do something when ctrl + c is pressed, but it looks like lldb doesn't catch SIGINT signal. I also tried the solution: process handle SIGINT -s false process handle SIGINT -p true Still, it does nothing. What am I doing wrong?
Replies
3
Boosts
0
Views
1.3k
Activity
Dec ’21
Getting kernel stack traces from panic (macOS)
I am getting regular kernel panics. I have a Kern*.panic file, and a .contents.panic These files now contain a 'macOSProcessedStackshotData' and so are encoded. I'm a dev, but not familiar with Apple Kernel debugging (though I've done this before on windows/aix/linux). How can I get some simple info from the panic, such as kernel backtrace, loaded drivers etc? Ideally I'm looking for a few points to specific drivers (maybe I can unplug a device) or situations I can avoid
Replies
2
Boosts
0
Views
1.3k
Activity
Nov ’21
Flush Metal rendering when program is paused in LLDB?
I watched a WWDC talk on LLDB, and they showed a nice trick of calling CATransaction.flush() from the debugger, to push changes to a UIView to the screen, even when the program was paused. Is there is a similar thing we can do with Metal? I'm using MTKView, but I can change to a lower level if that's required. The MTKView is paused, so I'm using setNeedsDisplay. As usual, I implement the draw delegate method to encode and commit a command buffer. If I do this from LLDB: metalView.setNeedsDisplay() CATransaction.flush() I can see that causes my draw function to run, but nothing shows up on screen. Is there something else we can do to flush those metal commands to the GPU and see them on screen while stepping through the program with the debugger?
Replies
1
Boosts
0
Views
982
Activity
Nov ’21
lldb crash
I have used Xcode 12.4, lldb in Xcode 12.4 work ok, it can Add Expression or Use p or po in LLDB command Line. but After I upgrade my OS and Xcode, p or po will trigger LLDB RPC server crash ."The LLDB RPC server has crashed. You may need to manually terminate your process. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log." lldb-rpc-server_2021-10-28-145717_chenxi.crash OS:macOS Big Sur 11.6 Xcode: 13.0 download from AppStore or 13.2beta download from https://developer.apple.com/download/all/ please refer to the attachment for more details. and tell me how to slove this problem 。 thanks
Replies
1
Boosts
1
Views
1.9k
Activity
Nov ’21
"Po" command not working
xcode latest version 13.1 i have installed....additional tools also installed ...but not working debug console "Po" ,"v" and "p"command how to resource solution
Replies
3
Boosts
0
Views
1.2k
Activity
Oct ’21
Debugging on iOS 15 is terribly slow in Xcode
I'm using Xcode 12 with iPhone 12 Pro. Everything worked fine on iOS 14. But after I updated my device to iOS 15 I’m getting the app's splash screen for more than a minute every time I build the app. I've also tried to use Xcode 13 with the iOS 15 device, and it also seems to be broken!  Moreover, when I use a breakpoint and it stops I need to wait for 30-50 seconds to step over or to continue program execution. Does anyone have these problems too?
Replies
2
Boosts
0
Views
4.5k
Activity
Oct ’21
VR project crash in xcode simulator
I try to run the game in xcode simulator but it always crashes. HELP pls... on android works fine. Warning: Error creating LLDB target at path '/Users/vylegalovi/Library/Developer/Xcode/DerivedData/Unity-iPhone-efppyotdzukdtyampzmbagbszvbv/Build/Products/Release-iphonesimulator/VRMetroEscape.app'- using an empty LLDB target which can cause slow memory reads from remote devices. W0929 23:53:04.273332 1 commandlineflags.cc:1311] Ignoring RegisterValidateFunction() for flag pointer 0x12ffae050: no flag found at that address CrashReporter: initialized 2021-09-29 23:53:04.485 VRMetroEscape[25809:2206250] Built from '2019.3/staging' branch, Version '2019.3.0f6 (27ab2135bccf)', Build type 'Development', Scripting Backend 'il2cpp' -> applicationDidFinishLaunching() PlayerConnection initialized from /Users/vylegalovi/Library/Developer/CoreSimulator/Devices/D4E84443-11FF-4B7D-8EBD-01895B9BA6B1/data/Containers/Bundle/Application/F8344320-D856-41B5-8AC5-639E39AC54AB/VRMetroEscape.app/Data (debug = 0) PlayerConnection initialized network socket : 0.0.0.0 55000 Multi-casting "[IP] 192.168.201.3 [Port] 55000 [Flags] 2 [Guid] 2011080506 [EditorId] 0 [Version] 1048832 [Id] iPhonePlayer(David-MacBook-Air.local):56000 [Debug] 0 [PackageName] iPhonePlayer [ProjectName] <no name>" to [225.0.0.222:54997]... Started listening to [0.0.0.0:55000] PlayerConnection already initialized - listening to [0.0.0.0:55000] 2021-09-29 23:53:04.816017+0200 VRMetroEscape[25809:2206250] Cannot find executable for CFBundle 0x7fc14c4bbee0 </System/Library/Frameworks/Metal.framework> (not loaded) 2021-09-29 23:53:04.971547+0200 VRMetroEscape[25809:2206250] Cannot find executable for CFBundle 0x7fc14df51ab0 </System/Library/Frameworks/QuartzCore.framework> (not loaded) -> applicationDidBecomeActive() [Subsystems] Discovering subsystems at path /Users/vylegalovi/Library/Developer/CoreSimulator/Devices/D4E84443-11FF-4B7D-8EBD-01895B9BA6B1/data/Containers/Bundle/Application/F8344320-D856-41B5-8AC5-639E39AC54AB/VRMetroEscape.app/Data/UnitySubsystems GfxDevice: creating device client; threaded=1 gfx device intialization failed
Replies
0
Boosts
0
Views
919
Activity
Sep ’21
What causes lldb_unnamed_symbol
Hello: I'm linking my Swift app against an Objective-c framework. I can call all the methods within the class in the framework, except for one. When I try and call it, I get an exception: #0 0x00007fff2037b829 in objc_msgSend () #1 0x000000010f856df4 in ___lldb_unnamed_symbol147$$MyFramework () I don't think it's the signature of the method, I can jump to the definition in the header file and the definition of the parameters the method needs. And even if it was a signature mismatch, that's a compile error. So what would cause an error like this. Thanks in advance for your time John
Replies
3
Boosts
0
Views
3.2k
Activity
Sep ’21
EXC_BAD_ACCESS (code=1, address=0x10) when implement logic operation to NULL pointer
Hello. I'm just studying C programming, and I have a trouble with impossibility to implement logic operation to pointer with NULL value. For example: int * ptr; ptr = NULL: if (ptr) { printf("Ptr isn't NULL\n"); } else { printf("Ptr is NULL\n"); } I get exception = EXC_BAD_ACCESS (code=1, address=0x10). The real case in lldb debugger in picture. Please, help me. This issue really breaks programming principles which I must learn.
Replies
1
Boosts
0
Views
1.9k
Activity
Sep ’21
Library not found for -lFirebaseDynamicLinks
Library not found for -lFirebaseDynamicLinks is the real issue that I am facing in my Xcode 12.4~ followed by linker command. THE SPECIFIC ERROR CODE. : Library not found for -lFirebaseDynamicLinks : Linker command failed with exit code 1 (use -v to see invocation) THE PACKAGE JSON FILE { "name": "Sample Project Name", "version": "0.0.1", "private": true, "engines": { "node": "&gt;=8.15.1" }, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start --reset-cache", "reset": "rm -rf node_modules/ &amp;&amp; npm cache clear &amp;&amp; watchman watch-del-all &amp;&amp; yarn install", "test:file": "jest", "test": "jest --verbose --coverage", "test:coverage": "jest --verbose --coverage --coverageDirectory=coverage --colors", "test:update": "jest --verbose --coverage --updateSnapshot", "test:watch": "jest --verbose --watch", "tsc": "tsc", "lint:fix": "tslint --project tsconfig.json --fix", "tslint-check": "tslint-config-prettier-check ./tslint.json", "postinstall": "node tools/checkNodeVersion.js &amp;&amp; npx jetify", "android": "react-native run-android", "android:apk:debug": "cd android &amp;&amp; ./gradlew assembleDebug &amp;&amp; open ./app/build/outputs/apk/", "android:apk:install": "cd android &amp;&amp; ./gradlew installDebug", "android:apk:release": "cd android &amp;&amp; ./gradlew assembleRelease &amp;&amp; open ./app/build/outputs/apk/", "android:build-bundle": "react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/", "android:device": "adb reverse tcp:8081 tcp:8081 &amp;&amp; npm run android", "android:log": "react-native log-android", "ios": "react-native run-ios", "ios:log": "react-native log-ios", "lint": "eslint . --ext .js,.jsx,.ts,.tsx" }, "dependencies": { "@invertase/react-native-apple-authentication": "^2.1.2", "@notifee/react-native": "^1.3.1", "@react-native-community/async-storage": "^1.12.1", "@react-native-community/clipboard": "^1.2.3", "@react-native-community/datetimepicker": "^3.0.2", "@react-native-community/google-signin": "^4.0.3", "@react-native-community/masked-view": "^0.1.10", "@react-native-community/netinfo": "^5.9.7", "@react-native-community/viewpager": "^4.1.6", "@react-native-firebase/analytics": "^12.1.0", "@react-native-firebase/app": "^12.1.0", "@react-native-firebase/auth": "^12.1.0", "@react-native-firebase/dynamic-links": "^12.1.0", "@react-native-firebase/storage": "^12.1.0", "@react-navigation/bottom-tabs": "^5.7.3", "@react-navigation/drawer": "^5.8.7", "@react-navigation/material-top-tabs": "^5.2.16", "@react-navigation/native": "^5.7.2", "@react-navigation/stack": "^5.8.0", "@twotalltotems/react-native-otp-input": "1.3.7", "axios": "^0.20.0", "moment": "^2.27.0", "react": "16.13.1", "react-native": "0.63.0", "react-native-autolink": "^4.0.0", "react-native-countdown-component": "^2.7.1", "react-native-country-picker-modal": "^2.0.0", "react-native-create-thumbnail": "^1.2.1", "react-native-device-info": "^5.6.5", "react-native-dropdownalert": "^4.3.0", "react-native-elements": "^2.1.0", "react-native-fs": "^2.16.6", "react-native-gesture-handler": "^1.8.0", "react-native-image-picker": "^2.3.4", "react-native-keyboard-aware-scroll-view": "^0.9.4", "react-native-localize": "^1.4.1", "react-native-modal": "^11.5.6", "react-native-modal-datetime-picker": "^8.9.3", "react-native-modal-selector": "^2.0.3", "react-native-progress": "^4.1.2", "react-native-reanimated": "^1.10.1", "react-native-responsive-screen": "^1.4.2", "react-native-safe-area-context": "^3.1.1", "react-native-screens": "^2.9.0", "react-native-share": "^3.7.1", "react-native-splash-screen": "^3.2.0", "react-native-super-grid": "^4.0.3", "react-native-svg": "^12.1.0", "react-native-swipe-gestures": "^1.0.5", "react-native-switch-selector": "^2.0.6", "react-native-tab-view": "^2.15.1", "react-native-vector-icons": "^7.0.0", "react-native-video": "^5.1.0-alpha8", "react-native-video-cache": "^2.0.5", "react-native-videoeditorsdk": "^2.5.0", "react-navigation": "^4.4.0", "react-navigation-stack": "^2.8.2", "react-navigation-tabs": "^2.9.0", "react-redux": "^7.2.0", "redux": "^4.0.5", "redux-saga": "^1.1.3", "reflect-metadata": "^0.1.13" }, "devDependencies": { "@babel/core": "^7.8.4", "@babel/runtime": "^7.8.4", "@react-native-community/cli-debugger-ui": "^4.9.0", "@react-native-community/eslint-config": "^1.1.0", "@types/jest": "^25.2.3", "@types/react-native": "^0.63.1", "@types/react-native-vector-icons": "^6.4.5", "@types/react-test-renderer": "^16.9.2", "@typescript-eslint/eslint-plugin": "^2.27.0", "@typescript-eslint/parser": "^2.27.0", "babel-jest": "^25.1.0", "eslint": "^6.5.1", "jest": "^25.1.0", "metro-react-native-babel-preset": "^0.59.0", "prettier": "^2.0.4", "react-native-svg-transformer": "^0.14.3", "react-test-renderer": "16.13.1", "typescript": "^3.8.3" }, "jest": { "preset": "react-native", "moduleFileExtensions": [ "ts", "tsx", "js", "jsx", "json", "node" ] } } If I remove the React Native Firebase Dynamic Links library the project works fine otherwise it is dropping this error up above. I have tried all previous versions the same error occurs. I have tried Build Active Architecture also didn't work. And a couple of Xcode settings also. I also tried resetting the derived data and whole Xcode but no fix. I want to use RNDynamicLinks library in my project.
Replies
0
Boosts
0
Views
2.1k
Activity
Sep ’21