Presumably this particular implementation won't work if libcxxabi is statically linked?
We hook exception throwing by subclassing std::type_info, overriding __do_catch, and using a small bit of asm to create a polymorphic type whose vtable points to that std::type_info subclass. This does admittedly mean that you can only access the stack trace if you have a catch specification with this custom type, but we find that usually where you want the stack trace you'd be doing `catch (...)` anyway so changing that to `catch (AnyException&)` isn't too onerous.
I've occasionally thought that it'd be nice to be able to run arbitrary code at the throw point, but while we've had the technical ability to do so for a couple of years there hasn't been any demand, so probably just being able to access the current exception stack trace is sufficient.