mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 19:45:23 -04:00
fix
This commit is contained in:
parent
7013769090
commit
59e444ed72
@ -268,22 +268,25 @@ void ErrorHandler_Fail2(ReturnCode result, const char* raw_msg) {
|
|||||||
*-------------------------------------------------------Info dumping------------------------------------------------------*
|
*-------------------------------------------------------Info dumping------------------------------------------------------*
|
||||||
*#########################################################################################################################*/
|
*#########################################################################################################################*/
|
||||||
static void ErrorHandler_Backtrace(String* backtrace_, void* ctx) {
|
static void ErrorHandler_Backtrace(String* backtrace_, void* ctx) {
|
||||||
|
String str; char strBuffer[STRING_SIZE * 5];
|
||||||
void* addrs[40];
|
void* addrs[40];
|
||||||
int i, frames = backtrace(addrs, 40);
|
int i, frames, num;
|
||||||
char** strings = backtrace_symbols(addrs, frames);
|
char** strings;
|
||||||
|
uintptr_t addr;
|
||||||
|
|
||||||
|
frames = backtrace(addrs, 40);
|
||||||
|
strings = backtrace_symbols(addrs, frames);
|
||||||
|
|
||||||
for (i = 0; i < frames; i++) {
|
for (i = 0; i < frames; i++) {
|
||||||
int number = i + 1;
|
num = i + 1;
|
||||||
uintptr_t addr = (uintptr_t)addrs[i];
|
addr = (uintptr_t)addrs[i];
|
||||||
|
String_InitArray(str, strBuffer);
|
||||||
char strBuffer[STRING_SIZE * 5];
|
|
||||||
String str = String_FromArray(strBuffer);
|
|
||||||
|
|
||||||
/* instruction pointer */
|
/* instruction pointer */
|
||||||
if (strings && strings[i]) {
|
if (strings && strings[i]) {
|
||||||
String_Format3(&str, "%i) 0x%x - %c\n", &number, &addr, strings[i]);
|
String_Format3(&str, "%i) 0x%x - %c\n", &num, &addr, strings[i]);
|
||||||
} else {
|
} else {
|
||||||
String_Format2(&str, "%i) 0x%x\n", &number, &addr);
|
String_Format2(&str, "%i) 0x%x\n", &num, &addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
String_AppendString(backtrace_, &str);
|
String_AppendString(backtrace_, &str);
|
||||||
|
@ -52,8 +52,8 @@ int main(int argc, char** argv) {
|
|||||||
|
|
||||||
argsCount = Platform_GetCommandLineArgs(argc, argv, args);
|
argsCount = Platform_GetCommandLineArgs(argc, argv, args);
|
||||||
/* NOTE: Make sure to comment this out before pushing a commit */
|
/* NOTE: Make sure to comment this out before pushing a commit */
|
||||||
String rawArgs = String_FromConst("UnknownShadow200 fffff 127.0.0.1 25565");
|
/* String rawArgs = String_FromConst("UnknownShadow200 fffff 127.0.0.1 25565"); */
|
||||||
argsCount = String_UNSAFE_Split(&rawArgs, ' ', args, 4);
|
/* argsCount = String_UNSAFE_Split(&rawArgs, ' ', args, 4); */
|
||||||
|
|
||||||
Platform_SetWorkingDir();
|
Platform_SetWorkingDir();
|
||||||
ErrorHandler_Init();
|
ErrorHandler_Init();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user