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

Cannot show class-level rectangle properties
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.
0
0
585
Aug ’21
TestFlight build different to local Release build. How?
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?
2
0
2.9k
Aug ’21
Debugging Endpoint Security Client daemon
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?
2
0
2k
Aug ’21
Cannot show class-level rectangle properties
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.
Replies
0
Boosts
0
Views
585
Activity
Aug ’21
TestFlight build different to local Release build. How?
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?
Replies
2
Boosts
0
Views
2.9k
Activity
Aug ’21
Debugging Endpoint Security Client daemon
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?
Replies
2
Boosts
0
Views
2k
Activity
Aug ’21
Is it possible to debug unit/UI tests from the command line?
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.
Replies
0
Boosts
0
Views
753
Activity
Jul ’21