[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.

(cherry picked from commit 4e8cba2d225cd385bba2512d714d01197dc914b2)
This commit is contained in:
A Thousand Ships
2026-01-14 14:23:51 +01:00
committed by Thaddeus Crews
parent 64b5c92278
commit 6e7385defc
@@ -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");