mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-01 16:58:29 +00:00
parent
1f62446b65
commit
4cae6c0d12
@ -1,5 +1,8 @@
|
|||||||
CXX_SRC_CC += misc.cc new_delete.cc malloc_free.cc exception.cc guard.cc unwind.cc
|
CXX_SRC_CC += misc.cc new_delete.cc malloc_free.cc exception.cc guard.cc unwind.cc
|
||||||
|
|
||||||
|
# We need the libsupc++ include directory
|
||||||
|
STDINC = yes
|
||||||
|
|
||||||
vpath %.cc $(BASE_DIR)/src/base/cxx
|
vpath %.cc $(BASE_DIR)/src/base/cxx
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -51,6 +54,7 @@ REDEF_SYMBOLS = $(foreach S, $(EH_SYMBOLS), --redefine-sym $(S)=_cxx_$(S) --rede
|
|||||||
KEEP_SYMBOLS += __cxa_guard_acquire
|
KEEP_SYMBOLS += __cxa_guard_acquire
|
||||||
KEEP_SYMBOLS += __dynamic_cast
|
KEEP_SYMBOLS += __dynamic_cast
|
||||||
KEEP_SYMBOLS += __cxa_throw_bad_array_new_length
|
KEEP_SYMBOLS += __cxa_throw_bad_array_new_length
|
||||||
|
KEEP_SYMBOLS += __cxa_current_exception_type
|
||||||
KEEP_SYMBOLS += _ZTVN10__cxxabiv116__enum_type_infoE
|
KEEP_SYMBOLS += _ZTVN10__cxxabiv116__enum_type_infoE
|
||||||
KEEP_SYMBOLS += _ZN10__cxxabiv121__vmi_class_type_infoD0Ev
|
KEEP_SYMBOLS += _ZN10__cxxabiv121__vmi_class_type_infoD0Ev
|
||||||
KEEP_SYMBOLS += _ZTVN10__cxxabiv119__pointer_type_infoE
|
KEEP_SYMBOLS += _ZTVN10__cxxabiv119__pointer_type_infoE
|
||||||
|
@ -12,6 +12,12 @@
|
|||||||
* under the terms of the GNU General Public License version 2.
|
* under the terms of the GNU General Public License version 2.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* libsupc++ includes */
|
||||||
|
#include <cxxabi.h>
|
||||||
|
|
||||||
|
/* Genode includes */
|
||||||
|
#include <base/printf.h>
|
||||||
|
|
||||||
extern "C" char __eh_frame_start__[]; /* from linker script */
|
extern "C" char __eh_frame_start__[]; /* from linker script */
|
||||||
extern "C" void __register_frame (const void *begin); /* from libgcc_eh */
|
extern "C" void __register_frame (const void *begin); /* from libgcc_eh */
|
||||||
|
|
||||||
@ -33,6 +39,28 @@ extern "C" int dl_iterate_phdr(int (*callback) (void *info, unsigned long size,
|
|||||||
extern "C" int dl_iterate_phdr(int (*callback) (void *info, unsigned long size, void *data), void *data) {
|
extern "C" int dl_iterate_phdr(int (*callback) (void *info, unsigned long size, void *data), void *data) {
|
||||||
return -1; }
|
return -1; }
|
||||||
|
|
||||||
void init_exception_handling() {
|
|
||||||
__register_frame(__eh_frame_start__); }
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Terminate handler
|
||||||
|
*/
|
||||||
|
|
||||||
|
void terminate_handler()
|
||||||
|
{
|
||||||
|
std::type_info *t = __cxxabiv1::__cxa_current_exception_type();
|
||||||
|
|
||||||
|
if (t)
|
||||||
|
PERR("Uncaught exception of type '%s' (use 'c++filt -t' to demangle)",
|
||||||
|
t->name());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialization
|
||||||
|
*/
|
||||||
|
|
||||||
|
void init_exception_handling()
|
||||||
|
{
|
||||||
|
__register_frame(__eh_frame_start__);
|
||||||
|
|
||||||
|
std::set_terminate(terminate_handler);
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user