История изменений
Исправление
kvpfs,
(текущая версия)
:
Так приличней (запустил, без стектрейса, никто пока в стд не умеет)
extern "C" void __cxa_throw(void *e, void *i, void (*dest)(void *)) {
type_info *ti = reinterpret_cast<std::type_info*>(i);
if (*ti == typeid(Any_exception_type))
tracce = basic_stacktrace::current();
using throw_t = decltype(__cxa_throw);
static throw_t *rethrow = (throw_t*)dlsym(RTLD_NEXT, "__cxa_throw");
rethrow(e, i, dest);
}
PS: если кто будет юзать, то линковать бинарь с __cxa_throw() надо с флагом -rdynamic (ну или сунуть __cxa_throw() в какую-нибудь .so, которая первая в limk map’e через LD_PRELOAD).
Исправление
kvpfs,
:
Так приличней (запустил, без стектрейса, никто пока в стд не умеет)
extern "C" void __cxa_throw(void *e, void *i, void (*dest)(void *)) {
type_info *ti = reinterpret_cast<std::type_info*>(i);
if (*ti == typeid(Any_exception_type))
tracce = basic_stacktrace::current();
using throw_t = decltype(__cxa_throw);
static throw_t *rethrow = (throw_t*)dlsym(RTLD_NEXT, "__cxa_throw");
rethrow(e, i, dest);
}
PS: если кто будет юзать, то линковать бинарь с __cxa_throw() надо с флагом -rdynamic (ну или сунуть в какую-нибудь .so, которая первая в limk map’e через LD_PRELOAD).
Исходная версия
kvpfs,
:
Так приличней (запустил, без стектрейса, никто пока в стд не умеет)
extern "C" void __cxa_throw(void *e, void *i, void (*dest)(void *)) {
type_info *ti = reinterpret_cast<std::type_info*>(i);
if (*ti == typeid(Any_exception_type))
tracce = basic_stacktrace::current();
using throw_t = decltype(__cxa_throw);
static throw_t *rethrow = (throw_t*)dlsym(RTLD_NEXT, "__cxa_throw");
rethrow(e, i, dest);
}