Environment
Xcode version: Xcode 16.0
iOS device system version: iOS 18.4 / 18.5
Problem description
When debugging iOS 18.4/18.5 on a real device, the App starts very slowly after clicking Run, usually taking 2-3 minutes, which is much slower than iOS 18.3. It manifests as Xcode staying in the Launch stage for a long time, and the application stuck in the opening screen interface. Start the APP first, then attach the process, and this problem will not exist
Location process
Use lldb to enable logs log enable gdb-remote packets
After observing the logs, it was found that:
The jam mainly occurs when processing two data packets:
jGetLoadedDynamicLibrariesInfos and qProcessInfo
These two commands involve dynamic library loading information and process meta information, and the response time is much higher than the normal level, far exceeding other gdb-remote instructions
Use Instruments / Profiler to analyze:
The CPU peak of the real machine debugserver is concentrated in the dynamic library information loading process of _dyld_process_info_create
- Is there a way to deploy a modified debugserver on the real machine to further locate the problem
- How to enable and view the debugsever log to further locate the problem