From 5f13ba3d1bd9525ff259708652b764808cefa156 Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Fri, 4 Feb 2022 17:54:30 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20section=20on=20symbolicati?= =?UTF-8?q?on?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/README.md b/README.md index 19a9653..e2312e8 100644 --- a/README.md +++ b/README.md @@ -411,3 +411,37 @@ If you'd like to build PHP Monitor yourself, you need: Once you have downloaded this repository, open `PHP Monitor.xcodeproj`, and you should be able to immediately build the app for your system by pressing Cmd-R. This will create a debug build. (If Xcode complains about code signing, you can turn it off.) If you'd like to create a production build, choose "Any Mac" as the target and select Product > Archive. + +## 🐛 Symbolication of crashes + +_Hello there, visitor. This is advanced stuff for app developers who are interested in figuring out why the app crashed when no debugger was attached._ + +If you have an archived build of the app and exported the DSYM, it is possible to symbolicate .ips crash logs. + +For example, given the following crash (from an .ips file): + +``` +Thread 2 Crashed:: Dispatch queue: com.apple.root.user-initiated-qos +0 libswiftDispatch.dylib 0x7ff82aa3ab8c static OS_dispatch_source.makeProcessSource(identifier:eventMask:queue:) + 28 +1 PHP Monitor 0x1096907d8 0x10965e000 + 206808 + | | + address load address +2 PHP Monitor 0x1096903ac 0x10965e000 + 205740 +3 PHP Monitor 0x10968f88b 0x10965e000 + 202891 +``` + +You must use the correct order for the the address and load address in the command below: + +``` +$ atos -arch x86_64 -o '/path/to/PHP Monitor.app.dSYM/Contents/Resources/DWARF/PHP Monitor' -l 0x10965e000 0x1096907d8 + | | | + architecture path to DSYM address from trace +``` + +This will return the relevant information, for example: + +``` +FSWatcher.startMonitoring(_:behaviour:) (in PHP Monitor) (PhpConfigWatcher.swift:95) +``` + +For more information, see [Apple's documentation](https://developer.apple.com/documentation/xcode/adding-identifiable-symbol-names-to-a-crash-report).