ci: dump crashpad symbols on linux

This commit is contained in:
itsmattkc
2021-04-01 11:47:31 +11:00
parent 8a60f3ad65
commit 6abe38b629
3 changed files with 20 additions and 7 deletions
+10
View File
@@ -80,7 +80,17 @@ jobs:
env:
ARCH: x86_64
run: |
# Create install tree
cmake --install app --prefix appdir/usr
# Dump Crashpad symbols
dump_syms app/olive-editor > olive-editor.sym
SYM_HEADER=($(head -n 1 olive-editor.sym)) # Read first line of symbol file
SYM_DIR=appdir/usr/share/olive-editor/symbols/olive-editor/${SYM_HEADER[3]}
mkdir -p "$SYM_DIR"
mv olive-editor.sym "$SYM_DIR"
# Package AppImage
VERSION=${GITHUB_SHA::8}
export VERSION
/usr/local/linuxdeployqt-x86_64.AppImage \
+2 -4
View File
@@ -71,13 +71,11 @@ bool LinuxExceptionHandler(int, siginfo_t*, ucontext_t*)
bool InitializeCrashpad()
{
QString handler_fn;
QString handler_fn = QStringLiteral("crashpad_handler");;
// Determine filename of handler from platform
#ifdef OS_WIN
handler_fn = QStringLiteral("crashpad_handler.exe");
#else
handler_fn = QStringLiteral("crashpad_handler");
handler_fn.append(QStringLiteral(".exe"));
#endif
// Generate absolute path
+8 -3
View File
@@ -115,15 +115,20 @@ void CrashHandlerDialog::GenerateReport()
this, &CrashHandlerDialog::ReadProcessFinished);
connect(p, &QProcess::readyReadStandardOutput, this, &CrashHandlerDialog::ReadProcessHasData);
QDir app_path(qApp->applicationDirPath());
QString stackwalk_bin = app_path.filePath(stackwalk_filename);
QString stackwalk_filename = QStringLiteral("minidump_stackwalk");
QString symbols_path;
#if defined(OS_WIN)
stackwalk_filename.append(QStringLiteral(".exe"));
symbols_path = app_path.filePath(QStringLiteral("symbols"));
#elif defined(Q_OS_LINUX)
symbols_path = app_path.filePath(QStringLiteral("../share/olive-editor/symbols"));
#endif
QDir app_path(qApp->applicationDirPath());
QString stackwalk_bin = app_path.filePath(stackwalk_filename);
p->start(stackwalk_bin, {report_filename_, app_path.filePath(QStringLiteral("symbols"))});
p->start(stackwalk_bin, {report_filename_, symbols_path});
crash_report_->setText(QStringLiteral("Trying to run: %1").arg(stackwalk_bin));
}