Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove execinfo dependency and old crash_print handler #84

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions rott/dosutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,46 +162,3 @@ void DisplayTextSplash(byte *text, int l)

printf ("\033[m");
}

#if !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__HAIKU__) && !defined(_MSC_VER)
#include <execinfo.h>

void print_stack (int level)
{
void *array[64];
char **syms;
int size, i;

printf ("Stack dump:\n");
printf ("{\n");
size = backtrace (array, (sizeof (array))/(sizeof (array[0])));
syms = backtrace_symbols (array, size);
for (i=level+1; i<size;++i) {
printf ("\t%s\n",syms[i]);
}
free (syms);
/*
for (i = 2; i <size; ++i) {
printf ("\t%p\n", array[i]);
}
*/
printf ("}\n");
}
#else

void print_stack (int level)
{
printf("Stack dump not implemented.\n");
}

#endif

void crash_print (int sig)
{
printf ("OH NO OH NO ROTT CRASHED!\n");
printf ("Here is where:\n");
print_stack (1);
SDL_Quit ();
exit (1);
}

4 changes: 0 additions & 4 deletions rott/rt_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ void Init_Tables (void);
void CheckRemoteRidicule ( int scancode );
void SetRottScreenRes (int Width, int Height);

extern void crash_print (int);

//extern int G_argc;
//extern char G_argv[30][80];
int G_weaponscale;
Expand All @@ -155,8 +153,6 @@ int main (int argc, char *argv[])
_argc = argc;
_argv = argv;

signal (11, crash_print);

ApogeePath = GetPrefDir();

// Set which release version we're on
Expand Down
Loading