feat: updated godot version
This commit is contained in:
parent
0c508b0831
commit
42b028dbb5
4694 changed files with 236470 additions and 401376 deletions
|
|
@ -48,9 +48,7 @@
|
|||
#include <dlfcn.h>
|
||||
#include <execinfo.h>
|
||||
#include <link.h>
|
||||
|
||||
#include <csignal>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
static void handle_crash(int sig) {
|
||||
|
|
@ -104,36 +102,8 @@ static void handle_crash(int sig) {
|
|||
// Non glibc systems apparently don't give PIE relocation info.
|
||||
uintptr_t relocation = 0;
|
||||
#endif //__GLIBC__
|
||||
|
||||
print_error(vformat("Load address: %x\n", (uint64_t)relocation));
|
||||
|
||||
if (strings) {
|
||||
int ret;
|
||||
|
||||
List<String> args;
|
||||
args.push_back("--version");
|
||||
String exe_name;
|
||||
|
||||
if (exe_name.is_empty()) {
|
||||
String output;
|
||||
// Faster implementation from gimli-rs/addr2line.
|
||||
Error err = OS::get_singleton()->execute(OS::get_singleton()->get_environment("HOME").path_join(String("/.cargo/bin/addr2line")), args, &output, &ret);
|
||||
if (err == OK && ret == 0) {
|
||||
exe_name = OS::get_singleton()->get_environment("HOME").path_join(String("/.cargo/bin/addr2line"));
|
||||
}
|
||||
}
|
||||
if (exe_name.is_empty()) {
|
||||
String output;
|
||||
Error err = OS::get_singleton()->execute(String("llvm-addr2line"), args, &output, &ret);
|
||||
if (err == OK && ret == 0) {
|
||||
exe_name = String("llvm-addr2line");
|
||||
}
|
||||
}
|
||||
if (exe_name.is_empty()) {
|
||||
exe_name = String("addr2line");
|
||||
}
|
||||
|
||||
args.clear();
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
char str[1024];
|
||||
snprintf(str, 1024, "%p", (void *)((uintptr_t)bt_buffer[i] - relocation));
|
||||
|
|
@ -143,8 +113,9 @@ static void handle_crash(int sig) {
|
|||
args.push_back(_execpath);
|
||||
|
||||
// Try to get the file/line number using addr2line
|
||||
String output;
|
||||
Error err = OS::get_singleton()->execute(exe_name, args, &output, &ret);
|
||||
int ret;
|
||||
String output = "";
|
||||
Error err = OS::get_singleton()->execute(String("addr2line"), args, &output, &ret);
|
||||
Vector<String> addr2line_results;
|
||||
if (err == OK) {
|
||||
addr2line_results = output.substr(0, output.length() - 1).split("\n", false);
|
||||
|
|
@ -173,7 +144,7 @@ static void handle_crash(int sig) {
|
|||
}
|
||||
|
||||
// Simplify printed file paths to remove redundant `/./` sections (e.g. `/opt/godot/./core` -> `/opt/godot/core`).
|
||||
print_error(vformat("[%d] %x - %s (%s)", (int64_t)i, (uint64_t)bt_buffer[i], fname, err == OK ? addr2line_results[i].replace("/./", "/") : ""));
|
||||
print_error(vformat("[%d] %s (%s)", (int64_t)i, fname, err == OK ? addr2line_results[i].replace("/./", "/") : ""));
|
||||
}
|
||||
|
||||
free(strings);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue