mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-29 12:15:39 +00:00
The versioned C++ library raises its own exception types: std::__sce_v2::length_error, out_of_range, invalid_argument, runtime_error, overflow_error, range_error, system_error, ios_base::failure and the plain bad_function_call, bad_optional_access, bad_weak_ptr and bad_variant_access. The message types derive from std::__sce_cxxvers::_Error_exception, which derives from the shared std::exception. Catch clauses compiled against these headers name the versioned types, so throwing the unversioned ones (as the versioned _Xbad_function_call did) never reaches them. Adds _Error_exception's constructors, destructors, what() and typeinfo; the versioned _X* throwers, _Throw(const T&) copies and _Throw_Cpp_error; the versioned _Syserror_map (code 0 is "success", unknown codes are "unknown error") and _Xtime_get_ticks. _Xbad_alloc throws the shared std::bad_alloc, as the console does. The unversioned _Throw_Cpp_error body becomes a helper that takes the exception table. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
73 lines
1.5 KiB
ArmAsm
73 lines
1.5 KiB
ArmAsm
.cfi_sections .eh_frame
|
|
.text
|
|
.globl SceV2Catch
|
|
SceV2Catch:
|
|
.cfi_startproc
|
|
#ifdef _WIN32
|
|
.cfi_personality 0x00, __gxx_personality_v0_nid_postfix
|
|
.cfi_lsda 0x00, .Lcatch_lsda
|
|
#else
|
|
.cfi_personality 0x9b, .Lcatch_personality
|
|
.cfi_lsda 0x1b, .Lcatch_lsda
|
|
#endif
|
|
pushq %rbp
|
|
.cfi_def_cfa_offset 16
|
|
.cfi_offset %rbp, -16
|
|
movq %rsp, %rbp
|
|
.cfi_def_cfa_register %rbp
|
|
subq $16, %rsp
|
|
movq %rdi, %rax
|
|
movq %rsi, %rdi
|
|
.Lcatch_call:
|
|
call *%rax
|
|
.Lcatch_call_end:
|
|
ud2
|
|
.Lcatch_landing:
|
|
movl %edx, SceV2Selector(%rip)
|
|
movq %rax, %rdi
|
|
call __cxa_begin_catch_nid_postfix
|
|
movq %rax, %rdi
|
|
call SceV2Inspect
|
|
call __cxa_end_catch_nid_postfix
|
|
leave
|
|
.cfi_def_cfa %rsp, 8
|
|
ret
|
|
.cfi_endproc
|
|
#ifdef _WIN32
|
|
.section .rdata,"dr"
|
|
#else
|
|
.section .data.rel.ro,"aw",@progbits
|
|
.p2align 3
|
|
.Lcatch_personality:
|
|
.quad __gxx_personality_v0_nid_postfix
|
|
.section .rodata
|
|
#endif
|
|
.Lcatch_lsda:
|
|
#ifdef _WIN32
|
|
.byte 0xff, 0x80
|
|
#else
|
|
.byte 0xff, 0x9b
|
|
#endif
|
|
.uleb128 .Lcatch_types_end-.Lcatch_types_offset
|
|
.Lcatch_types_offset:
|
|
.byte 0x01
|
|
.uleb128 .Lcatch_calls_end-.Lcatch_calls
|
|
.Lcatch_calls:
|
|
.uleb128 .Lcatch_call-SceV2Catch
|
|
.uleb128 .Lcatch_call_end-.Lcatch_call
|
|
.uleb128 .Lcatch_landing-SceV2Catch
|
|
.uleb128 1
|
|
.Lcatch_calls_end:
|
|
.byte 1, 1, 2, 0
|
|
#ifdef _WIN32
|
|
.quad SceV2CatchType
|
|
.quad SceV2OtherType
|
|
#else
|
|
.long SceV2CatchType-.
|
|
.long SceV2OtherType-.
|
|
#endif
|
|
.Lcatch_types_end:
|
|
#ifndef _WIN32
|
|
.section .note.GNU-stack,"",@progbits
|
|
#endif
|