Sitelet https://github.com/flutter/flutter/pull/189993
Skip to content

Warn when unable to find iOS Device Support Symbols - #189993

Merged
auto-submit[bot] merged 12 commits into
flutter:masterfrom
vashworth:lldb_symbol_warnings
Aug 14, 2026
Merged

auto-submit[bot] merged 12 commits into
flutter:masterfrom
vashworth:lldb_symbol_warnings

Conversation

@vashworth

@vashworth vashworth commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

This PR explicitly sets the iOS Device Support symbols in LLDB if we're able to identify them. If LLDB takes too long or receives a warning: libobjc.A.dylib is being read from process memory. log, we print out a message indicating that symbols may be missing and that you need to open Xcode to trigger it to copy them.

Fixes #189284.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@vashworth
vashworth requested review from a team as code owners July 24, 2026 17:46
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jul 24, 2026
@github-actions github-actions Bot added platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. platform-macos Building on or for macOS specifically a: desktop Running on desktop team-ios Owned by iOS platform team team-macos Owned by the macOS platform team labels Jul 24, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the iOS LLDB debugger integration to resolve and configure Xcode Device Support symbol paths, particularly for iOS 17+ devices, and adds warnings when symbols are missing or incomplete. The review feedback suggests adding a timeout to the LLDB platform status check to prevent potential hangs, correcting a typo in a comment, utilizing the injected logger instead of global state in devices.dart, and verifying that the device architecture string is not empty before constructing symbol paths.

Comment thread packages/flutter_tools/lib/src/ios/lldb.dart
Comment thread packages/flutter_tools/lib/src/ios/lldb.dart Outdated
Comment thread packages/flutter_tools/lib/src/ios/devices.dart
Comment thread packages/flutter_tools/lib/src/ios/lldb.dart Outdated
@jmagman
jmagman requested a review from okorohelijah July 28, 2026 00:38
if (_warnedAboutMissingSymbols && log.contains(missingSymbolsPattern)) {
return true;
}
return _ignorePatterns.any((Pattern pattern) => log.contains(pattern));

@okorohelijah okorohelijah Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LLDB typically outputs the libobjc.A.dylib is being read... warning repeatedly (for every library it fails to find) and because the LogInterceptor executes its action on every match, and _warnedAboutMissingSymbols isn't set to true until the 1-minute timer fires, the raw LLDB logs will continue to pass through here and cause the warning block to be printed lot of times.

We can maybe drop duplicate logs at the source by setting the flag upon the first match:

  bool _ignoreLog(String log) {
    if (log.contains(missingSymbolsPattern)) {
      if (_warnedAboutMissingSymbols) {
        return true;
      }
      _warnedAboutMissingSymbols = true;
    }
    return _ignorePatterns.any((Pattern pattern) => log.contains(pattern));
  }

Comment thread packages/flutter_tools/lib/src/ios/lldb.dart
@vashworth
vashworth requested a review from okorohelijah August 6, 2026 16:51
@vashworth

Copy link
Copy Markdown
Contributor Author

@okorohelijah I refactored this pretty heavily, can you re-review?

@cbracken cbracken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few drive-bys, mostly cause I was curious about how this stuff works these days.

Comment thread packages/flutter_tools/lib/src/ios/device_support.dart Outdated
Comment thread packages/flutter_tools/lib/src/ios/core_devices.dart
Comment thread packages/flutter_tools/lib/src/ios/core_devices.dart
Comment thread packages/flutter_tools/lib/src/ios/lldb.dart
Comment thread packages/flutter_tools/lib/src/ios/lldb.dart
@vashworth
vashworth requested a review from cbracken August 10, 2026 21:46

@cbracken cbracken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM stamp from a Japanese personal seal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop CICD Run CI/CD platform-ios iOS applications specifically platform-macos Building on or for macOS specifically team-ios Owned by iOS platform team team-macos Owned by the macOS platform team tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Xcode 27] Newly paired and/or upgraded devices hang on white screen after launch

4 participants