From: John Hodge Date: Sun, 8 Jun 2014 06:03:01 +0000 (+0800) Subject: Usermode/libc++ - Fix system_error construction, silcence EH debug X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=5ac2fe262ff023ca109c7fd48dc3c819ef5b283e;hp=bdfe14e5648c39d8b7e50d5ecd4a6b0ad24321e5;p=tpg%2Facess2.git Usermode/libc++ - Fix system_error construction, silcence EH debug --- diff --git a/Usermode/Libraries/libc++.so_src/gxx_personality.cc b/Usermode/Libraries/libc++.so_src/gxx_personality.cc index f571d773..0ecb86a3 100644 --- a/Usermode/Libraries/libc++.so_src/gxx_personality.cc +++ b/Usermode/Libraries/libc++.so_src/gxx_personality.cc @@ -124,7 +124,7 @@ int get_frame_action(const sLSDA_Header &header, _Unwind_Context *context, const uint64_t &landingpad, int64_t &switch_value) { uint64_t ip = _Unwind_GetIP(context) - _Unwind_GetRegionStart(context); - _SysDebug("IP = 0x%llx + 0x%llx", _Unwind_GetRegionStart(context), ip); + _SysDebug("get_frame_action: IP = 0x%llx + 0x%llx", _Unwind_GetRegionStart(context), ip); // Check if there is a handler for this exception in this frame // - Search call site table for this return address (corresponds to a try block) uintptr_t cs_ldgpad; @@ -182,7 +182,6 @@ int get_frame_action(const sLSDA_Header &header, _Unwind_Context *context, const { leb128s_t filter = _read_leb128s(action_list); leb128s_t disp = _read_leb128s(action_list); - _SysDebug("filter=%lli,disp=%lli", filter, disp); if( filter == 0 ) { // Cleanup @@ -230,7 +229,6 @@ const ::std::type_info *get_type_info(const struct sLSDA_Header &header, int typ assert( ptr > header.ActionTable ); uintptr_t type_ptr = _read_encoded(ptr, NULL, header.TTEncoding, header.TypePtrBase); - _SysDebug("typeinfo_ptr = %p", type_ptr); return reinterpret_cast< ::std::type_info* >(type_ptr); } @@ -275,6 +273,7 @@ bool exception_matches_single(const std::type_info *throw_type, const struct sLS bool exception_matches_list(const std::type_info *throw_type, const struct sLSDA_Header &header, int list_index) { _SysDebug("TODO: exception_matches_list %i", list_index); + abort(); (void)throw_type; (void)header; return true; diff --git a/Usermode/Libraries/libc++.so_src/system_error.cc b/Usermode/Libraries/libc++.so_src/system_error.cc index 59f25f96..9a9fb4d2 100644 --- a/Usermode/Libraries/libc++.so_src/system_error.cc +++ b/Usermode/Libraries/libc++.so_src/system_error.cc @@ -14,31 +14,32 @@ system_error::system_error(::std::error_code ec): m_error_code(ec), m_what_str( (::std::string)ec.category().name() + ":" + ec.message()) { + ::_sys::debug("system_error(%s:%s)", ec.category().name(), ec.message().c_str()); } system_error::system_error(::std::error_code ec, const ::std::string& what_arg): - m_error_code(ec) + system_error(ec) { m_what_str += " - "; m_what_str += what_arg; } system_error::system_error(::std::error_code ec, const char* what_arg): - m_error_code(ec) + system_error(ec) { m_what_str += " - "; m_what_str += what_arg; } system_error::system_error(int ev, const ::std::error_category& ecat): - m_error_code(ev, ecat) + system_error( ::std::error_code(ev, ecat) ) { } system_error::system_error(int ev, const ::std::error_category& ecat, const ::std::string& what_arg): - m_error_code(ev, ecat) + system_error(ev, ecat) { m_what_str += " - "; m_what_str += what_arg; } system_error::system_error(int ev, const ::std::error_category& ecat, const char* what_arg): - m_error_code(ev, ecat) + system_error(ev, ecat) { m_what_str += " - "; m_what_str += what_arg;