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

Posts under LLDB tag

40 Posts
Sort by:
Post not yet marked as solved
0 Replies
281 Views
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
Posted Last updated
.
Post not yet marked as solved
2 Replies
3.4k Views
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
Posted
by DidouDiaz.
Last updated
.
Post not yet marked as solved
0 Replies
289 Views
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)
Posted Last updated
.
Post not yet marked as solved
0 Replies
484 Views
I'm getting the error: ** "Warning: Error creating LLDB target at path '/Users/tantan/Library/Developer/Xcode/DerivedData/Videe-bpukzfmjaxewiuaiolulcqllukjg/Build/Products/Debug-iphonesimulator/[AppName].app'- using an empty LLDB target which can cause slow memory reads from remote devices."** Is there anyone who can explain to me what the reason is and how can fix it? Thanks,
Posted
by tanttdev.
Last updated
.
Post marked as solved
1 Replies
461 Views
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.)
Posted Last updated
.
Post not yet marked as solved
3 Replies
400 Views
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?
Posted
by xAJAx.
Last updated
.
Post not yet marked as solved
2 Replies
426 Views
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
Posted
by planetf1.
Last updated
.
Post marked as solved
1 Replies
319 Views
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?
Posted
by rnikander.
Last updated
.
Post not yet marked as solved
1 Replies
443 Views
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
Posted Last updated
.
Post marked as solved
3 Replies
432 Views
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
Posted Last updated
.
Post not yet marked as solved
1 Replies
1.7k Views
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?
Posted
by yuraist.
Last updated
.
Post not yet marked as solved
0 Replies
457 Views
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
Posted
by vygogames.
Last updated
.
Post not yet marked as solved
3 Replies
700 Views
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
Posted Last updated
.
Post not yet marked as solved
1 Replies
497 Views
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.
Posted
by It9620.
Last updated
.
Post not yet marked as solved
0 Replies
1.4k Views
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.
Posted Last updated
.
Post not yet marked as solved
0 Replies
323 Views
In an Objective C project for MacOS using XCode 12.3 I define variables of various types including NSRect and CGFloat at the start of a class implementation region so that they are accessible from all methods. When I add a breakpoint in a method, some of the variables can be displayed by hovering the cursor over the variable in the code window or examining the variables window. However, some class-level variables are not shown in the variables window or by hovering over them. Attempting to examine then using po in the debugger console shows an undeclared variable error. Class-level variables of type CGFloat which are assigned are visible but not variables that do not have values assigned. None of the objects class NSRect appearing on the RHS of assignments are visible when hovering over the or by using po in the debugger console.
Posted Last updated
.
Post marked as solved
2 Replies
731 Views
My team and I have been working on production iOS apps since 2014, but today in 2021 we have an issue we can't figure out. We have been working on a major feature which we are now at the point of internal alpha testing. We have two test apps: one of the specific section of the app the feature is in, and one of the entire app. In both of these apps, our local builds work without issue in both Debug and Release configurations. However, all of our TestFlight builds (we only do TestFlight builds of the complete app) are crashing all on devices we try it with as soon as the new feature is used. The crash reports point to a 3rd party library we are using regarding buffer sizes (it is an audio feature, using low level I/O AudioUnits). This doesn't really help us track down the issue though because, try as we might, we have never been able to reproduce this in a local build. There it always works without failure. I don't actually understand how this is possible. What could possibly be different between a Release build run locally compared to what is available on TestFlight? Another side of this is, can we somehow debug the TestFlight build on our devices with lldb in order to track down what is going on here?
Posted
by ephemer.
Last updated
.
Post not yet marked as solved
2 Replies
596 Views
Hello, We have an endpoint security daemon which also uses some system extensions (network content filtering, file notifications). When building on debug with the correct entitlements (get-task-allow) we cannot attach with the debugger. More precisely, after attach, instead of displaying thread information, the daemon just stops (in logs appears a SIGKILL with no source). Before this happens, the system freezes for about 15-20 seconds, so I'm guessing it's some kind of watchdog that kills the app before the debugger can completely attach. The same happens with a custom built GDB, as well as various versions of LLDB. How can we find out what kills the daemon and maybe increase the timeout or some other solution like that?
Posted
by dionita.
Last updated
.
Post not yet marked as solved
0 Replies
401 Views
The goal is to set breakpoints with some actions and log state on certain conditions for later analysis. I am thinking that it should be possible via lldb, however, I couldn't think of how to use it in combination to xcodebuild (test). Any help would be much appreciated.
Posted
by myakici.
Last updated
.
Post not yet marked as solved
10 Replies
4.1k Views
I keep running into this error when using po expression produced error: error: Couldn't realize type of self. Try evaluating the expression with -d run-target It typically seems to happen during breakpoints in tests. My Build Configuration is Debug as well. Any ideas?
Posted
by mredig.
Last updated
.