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

feat: Add support for Portable PDB debug files and .NET symbolication #39610

Merged
merged 3 commits into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/sentry/api/endpoints/chunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"sources", # Source artifact bundle upload
"bcsymbolmaps", # BCSymbolMaps and associated PLists/UuidMaps
"il2cpp", # Il2cpp LineMappingJson files
"portablepdbs", # Portable PDB debug file
)


Expand Down
1 change: 1 addition & 0 deletions src/sentry/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ def get_all_languages() -> List[str]:
"application/x-bcsymbolmap": "bcsymbolmap",
"application/x-debugid-map": "uuidmap",
"application/x-il2cpp-json": "il2cpp",
"application/x-portable-pdb": "portablepdb",
}

NATIVE_UNKNOWN_STRING = "<unknown>"
Expand Down
2 changes: 2 additions & 0 deletions src/sentry/lang/native/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def _merge_frame(new_frame, symbolicated, platform="native"):
new_frame["function"] = func
if symbolicated.get("instruction_addr"):
new_frame["instruction_addr"] = symbolicated["instruction_addr"]
if symbolicated.get("function_id"):
new_frame["function_id"] = symbolicated["function_id"]
if symbolicated.get("symbol"):
new_frame["symbol"] = symbolicated["symbol"]
if symbolicated.get("abs_path"):
Expand Down
6 changes: 4 additions & 2 deletions src/sentry/lang/native/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
WINDOWS_PATH_RE = re.compile(r"^([a-z]:\\|\\\\)", re.IGNORECASE)

# Event platforms that could contain native stacktraces
# il2cpp events have the "csharp" platform, and we do need to run those
# through symbolicator to correctly symbolicate il2cpp stack frames.
# "csharp" events are also considered "native" as they are processed by symbolicator.
# This includes il2cpp events that are symbolicated using native debug files,
# as well as .NET with Portable PDB files which are handled by symbolicator.
NATIVE_PLATFORMS = ("cocoa", "native", "csharp")

# Debug image types that can be handled by the symbolicator
Expand All @@ -23,6 +24,7 @@
"elf", # Linux
"macho", # macOS, iOS
"pe", # Windows
"pe_dotnet", # Portable PDB
"wasm", # WASM
)

Expand Down
3 changes: 2 additions & 1 deletion src/sentry/models/debugfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def file_extension(self) -> str:
return "" if self.file_type == "exe" else ".debug"
if self.file_format == "pe":
return ".exe" if self.file_type == "exe" else ".dll"
if self.file_format == "pdb":
if self.file_format == "pdb" or self.file_format == "portablepdb":
return ".pdb"
if self.file_format == "sourcebundle":
return ".src.zip"
Expand Down Expand Up @@ -275,6 +275,7 @@ def create_dif_from_id(
"elf",
"pdb",
"pe",
"portablepdb",
"wasm",
"sourcebundle",
"bcsymbolmap",
Expand Down
1 change: 1 addition & 0 deletions static/app/views/settings/projectDebugFiles/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class ProjectDebugSymbols extends AsyncView<Props, State> {
'bcsymbolmap',
'uuidmap',
'il2cpp',
'portablepdb',
],
},
},
Expand Down