Add dump_syms_macos.sh Script for Breakpad Dumps (#1871)

This commit is contained in:
Florian Märkl 2019-11-04 12:49:14 +01:00 committed by GitHub
parent d8aac7a64d
commit 2b20e83738
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

26
scripts/dump_syms_macos.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
if [ ! $# -eq 2 ]; then
echo "usage: $0 [Cutter.app] [dst]"
exit 1
fi
appbundle="$1"
dst="$2"
files="$appbundle/Contents/MacOS/Cutter.bin $appbundle/Contents/Frameworks/Python.framework/Python $(find "$appbundle" -type f -name '*.dylib')"
mkdir -p "$dst" || exit 1
for file in $files; do
echo "Dumping syms from $file"
dump_syms "$file" > "$dst/tmp.sym" || echo "Failed to dump syms from $file"
infoline=($(head -n1 "$dst/tmp.sym"))
id=${infoline[3]}
name=${infoline[4]}
dir="$dst/$name/$id"
mkdir -p "$dir"
mv "$dst/tmp.sym" "$dir/$name.sym"
done
echo "Done"