[Linux] Handle debug symbols with renamed executable

GNU debug link expects the file to have the same name as when compiled,
same solution as on Windows.
This commit is contained in:
A Thousand Ships 2026-01-14 14:23:51 +01:00
parent 481f36ed20
commit 4e8cba2d22
No known key found for this signature in database
GPG key ID: 2613257BD9962224

View file

@ -31,6 +31,7 @@
#include "crash_handler_linuxbsd.h"
#include "core/config/project_settings.h"
#include "core/io/file_access.h"
#include "core/object/script_language.h"
#include "core/os/main_loop.h"
#include "core/os/os.h"
@ -67,6 +68,10 @@ static void handle_crash(int sig) {
size_t size = backtrace(bt_buffer, 256);
String _execpath = OS::get_singleton()->get_executable_path();
if (FileAccess::exists(_execpath + ".debugsymbols")) {
_execpath = _execpath + ".debugsymbols";
}
String msg;
if (ProjectSettings::get_singleton()) {
msg = GLOBAL_GET("debug/settings/crash_handler/message");