--- mrd6-0.9.6.orig/src/linux/mrd_components.cpp 2007-01-07 03:11:27.000000000 +0100 +++ mrd6-0.9.6/src/linux/mrd_components.cpp 2010-11-11 11:16:08.114995686 +0100 @@ -28,10 +28,6 @@ #include #include -#if defined(__GLIBC__) && !defined(__UCLIBC__) -#include -#endif - bool mrd::prepare_os_components() { m_mfa = new us_mfa(); @@ -57,45 +53,14 @@ const char *mrd::loopback_interface_name #define MAX_DEEP_BACKTRACE 32 void mrd::output_backtrace(base_stream &out) const { -#if defined(__GLIBC__) && !defined(__UCLIBC__) - void *bt[MAX_DEEP_BACKTRACE]; - - int count = backtrace(bt, MAX_DEEP_BACKTRACE); - - char **btnames = backtrace_symbols(bt, count); - - for (int i = 0; i < count; i++) { - out.xprintf("#%i %s\n", i+1, btnames[i]); - } - - free(btnames); -#else out.writeline("Backtraces aren't available in this system."); -#endif } char *mrd::obtain_frame_description(void *ptr) const { -#if defined(__GLIBC__) && !defined(__UCLIBC__) - void *p[1] = { ptr }; - - char **names = backtrace_symbols(p, 1); - char *ret = strdup(names[0]); - free(names); - - return ret; -#else return 0; -#endif } void *mrd::posix_uctx::get_current_frame() const { -#if defined(__GLIBC__) -#if defined(__i386__) - return (void *)base->uc_mcontext.gregs[REG_EIP]; -#elif defined(__mips__) - return (void *)base->uc_mcontext.gpregs[CTX_EPC]; -#endif -#endif return 0; }