Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lldb] Pass important options to dsymForUUID #72669

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

JDevlieghere
Copy link
Member

On macOS, we usually use the DebugSymbols framework to find dSYMs, but we have a few places (including crashlog.py) that calls out directly to dsymForUUID. Currently, this invocation is missing two important options:

  • --ignoreNegativeCache: Poor network connectivity or lack of VPN can lead to a negative cache hit. Avoiding those issues is worth the penalty of skipping these caches.
  • --copyExecutable: Ensure we copy the executable as it might not be available at its original location.

rdar://118480731

On macOS, we usually use the DebugSymbols framework to find dSYMs, but
we have a few places (including crashlog.py) that calls out directly to
dsymForUUID. Currently, this invocation is missing two important options:

  * `--ignoreNegativeCache`: Poor network connectivity or lack of VPN
    can lead to a negative cache hit. Avoiding those issues is worth the
    penalty of skipping these caches.
  * `--copyExecutable`: Ensure we copy the executable as it might not be
    available at its original location.

rdar://118480731
@llvmbot
Copy link
Collaborator

llvmbot commented Nov 17, 2023

@llvm/pr-subscribers-lldb

Author: Jonas Devlieghere (JDevlieghere)

Changes

On macOS, we usually use the DebugSymbols framework to find dSYMs, but we have a few places (including crashlog.py) that calls out directly to dsymForUUID. Currently, this invocation is missing two important options:

  • --ignoreNegativeCache: Poor network connectivity or lack of VPN can lead to a negative cache hit. Avoiding those issues is worth the penalty of skipping these caches.
  • --copyExecutable: Ensure we copy the executable as it might not be available at its original location.

rdar://118480731


Full diff: https://github.com/llvm/llvm-project/pull/72669.diff

1 Files Affected:

  • (modified) lldb/examples/python/crashlog.py (+5-1)
diff --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py
index cb8008419404c23..9e4f94264037aea 100755
--- a/lldb/examples/python/crashlog.py
+++ b/lldb/examples/python/crashlog.py
@@ -356,7 +356,11 @@ def locate_module_and_debug_symbols(self):
             # Keep track of unresolved source paths.
             unavailable_source_paths = set()
             if os.path.exists(self.dsymForUUIDBinary):
-                dsym_for_uuid_command = "%s %s" % (self.dsymForUUIDBinary, uuid_str)
+                dsym_for_uuid_command = (
+                    "{} --copyExecutable --ignoreNegativeCache {}".format(
+                        self.dsymForUUIDBinary, uuid_str
+                    )
+                )
                 s = subprocess.check_output(dsym_for_uuid_command, shell=True)
                 if s:
                     try:

Copy link
Member

@medismailben medismailben left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@JDevlieghere JDevlieghere merged commit ec6a34e into llvm:main Nov 17, 2023
4 checks passed
@JDevlieghere JDevlieghere deleted the dsymForUUID-crashlogs branch November 17, 2023 16:00
sr-tream pushed a commit to sr-tream/llvm-project that referenced this pull request Nov 20, 2023
On macOS, we usually use the DebugSymbols framework to find dSYMs, but
we have a few places (including crashlog.py) that calls out directly to
dsymForUUID. Currently, this invocation is missing two important
options:

* `--ignoreNegativeCache`: Poor network connectivity or lack of VPN can
lead to a negative cache hit. Avoiding those issues is worth the penalty
of skipping these caches.
* `--copyExecutable`: Ensure we copy the executable as it might not be
available at its original location.

rdar://118480731
zahiraam pushed a commit to zahiraam/llvm-project that referenced this pull request Nov 20, 2023
On macOS, we usually use the DebugSymbols framework to find dSYMs, but
we have a few places (including crashlog.py) that calls out directly to
dsymForUUID. Currently, this invocation is missing two important
options:

* `--ignoreNegativeCache`: Poor network connectivity or lack of VPN can
lead to a negative cache hit. Avoiding those issues is worth the penalty
of skipping these caches.
* `--copyExecutable`: Ensure we copy the executable as it might not be
available at its original location.

rdar://118480731
JDevlieghere added a commit to swiftlang/llvm-project that referenced this pull request Nov 27, 2023
On macOS, we usually use the DebugSymbols framework to find dSYMs, but
we have a few places (including crashlog.py) that calls out directly to
dsymForUUID. Currently, this invocation is missing two important
options:

* `--ignoreNegativeCache`: Poor network connectivity or lack of VPN can
lead to a negative cache hit. Avoiding those issues is worth the penalty
of skipping these caches.
* `--copyExecutable`: Ensure we copy the executable as it might not be
available at its original location.

rdar://118480731
(cherry picked from commit ec6a34e)
JDevlieghere added a commit to swiftlang/llvm-project that referenced this pull request Dec 1, 2023
[lldb] Pass important options to dsymForUUID (llvm#72669)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants