diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt index a732296..f1e0d97 100644 --- a/demos/CMakeLists.txt +++ b/demos/CMakeLists.txt @@ -22,6 +22,10 @@ libhal_build_demos( DEMOS single_level multi_levels + multiple_virtual_inheritance + + INCLUDES + . PACKAGES libhal-exceptions diff --git a/demos/applications/multiple_virtual_inheritance.cpp b/demos/applications/multiple_virtual_inheritance.cpp new file mode 100644 index 0000000..294f5a8 --- /dev/null +++ b/demos/applications/multiple_virtual_inheritance.cpp @@ -0,0 +1,117 @@ +// Copyright 2024 Khalil Estell +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include + +resource_list* resources; + +struct V +{ + int inner_detail_v = 0; +}; + +struct M +{ + int inner_detail_m = 0x8888; +}; + +struct R1 : public virtual V +{ + int inner_detail_r1 = 0; +}; + +struct R2 : public virtual V +{ + int inner_detail_r2 = 0; +}; + +struct R3 + : protected virtual M + , public virtual V +{ + int inner_detail_r3 = 0; +}; + +struct R4 +{ + int inner_detail_r4 = 0; +}; + +struct R + : public R1 + , protected virtual M + , public R2 + , public R3 + , public R4 +{ + int inner_detail_r = 0; +}; + +struct error : public R +{ + int data = 0; + + // Extra virtual class functions to add to the complexity + virtual void foo() + { + inner_detail_r++; + } + virtual void bar() + { + inner_detail_r++; + } +}; + +int volatile value = 5; +std::uint64_t start = 0; +std::uint64_t end = 0; + +void foo() +{ + if (value) { + start = resources->clock->uptime(); + error obj{}; + obj.inner_detail_r = 0x1111; + obj.inner_detail_r1 = 0x2222; + obj.inner_detail_r2 = 0x3333; + obj.inner_detail_r3 = 0x4444; + obj.inner_detail_r4 = 0x5555; + obj.inner_detail_v = 0x6666; + obj.data = 0x9999; + throw obj; + } +} + +std::uint32_t global = 0; + +void application(resource_list& p_resources) +{ + resources = &p_resources; + + try { + foo(); + } catch (M const& p_error) { + end = resources->clock->uptime(); + global = p_error.inner_detail_m; + } catch (V const& p_error) { + end = resources->clock->uptime(); + global = p_error.inner_detail_v; + } + + while (true) { + // print out `global` in gdb to see its contents. Check to see if it matches + // the expected value in error for that sub-object. + continue; + } +} diff --git a/demos/applications/single_level.cpp b/demos/applications/single_level.cpp index 436fd90..f1da826 100644 --- a/demos/applications/single_level.cpp +++ b/demos/applications/single_level.cpp @@ -12,9 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "../resource_list.hpp" - -int volatile value = 5; +#include resource_list* resources; @@ -25,25 +23,35 @@ struct error std::uint64_t start = 0; std::uint64_t end = 0; +int volatile value = 5; void foo() { if (value) { start = resources->clock->uptime(); - throw error{ .data = value }; + error obj; + obj.data = 0x9999; + obj.data = value; + throw obj; } } +std::uint32_t global = 0; + void application(resource_list& p_resources) { + [[maybe_unused]] static constexpr auto error_size = sizeof(error); resources = &p_resources; try { foo(); } catch (error const& p_error) { end = resources->clock->uptime(); + global = p_error.data; } while (true) { + // print out `global` in gdb to see its contents. Check to see if it matches + // the expected value in error for that sub-object. continue; } } diff --git a/demos/conanfile.py b/demos/conanfile.py index 2754f4f..b02b5fc 100644 --- a/demos/conanfile.py +++ b/demos/conanfile.py @@ -16,10 +16,10 @@ class demos(ConanFile): - python_requires = "libhal-bootstrap/[^2.0.0]" + python_requires = "libhal-bootstrap/[^4.0.0]" python_requires_extend = "libhal-bootstrap.demo" def requirements(self): bootstrap = self.python_requires["libhal-bootstrap"] bootstrap.module.add_demo_requirements(self) - self.requires("libhal-exceptions/[latest || ^1.0.0]") + self.requires("libhal-exceptions/[^1.0.0 || latest]") diff --git a/src/arm_cortex/estell/exception.cpp b/src/arm_cortex/estell/exception.cpp index 7e18f39..7d631bf 100644 --- a/src/arm_cortex/estell/exception.cpp +++ b/src/arm_cortex/estell/exception.cpp @@ -14,6 +14,9 @@ #include #include +#include +#include +#include #include #include #include @@ -183,7 +186,7 @@ index_entry_t const& get_index_entry(std::uint32_t p_program_counter) if ((sleb128 & 0x80) == 0x00) { auto const bytes_consumed = i + 1; auto const loaded_bits = bytes_consumed * leb128_bits; - auto const ext_shift_amount = (30 - loaded_bits); + auto const ext_shift_amount = (32 - loaded_bits); // Shift to the left up to the signed MSB bit result <<= ext_shift_amount; // Arithmetic shift right to sign extend number @@ -586,12 +589,13 @@ class action_decoder do { m_filter = read_sleb128(&m_action_position); + auto const previous_next_offset_position = m_action_position; auto const next_action_offset = read_sleb128(&m_action_position); if (next_action_offset == 0) { m_action_position = nullptr; } else { - m_action_position += next_action_offset; + m_action_position = previous_next_offset_position + next_action_offset; } // Negative numbers are for the deprecated `throws()` specifier that we do // not support. We throw those away and continue looking through the @@ -699,12 +703,19 @@ inline void enter_function(exception_object& p_exception_object) type_info != nullptr; type_info = a_decoder.get_next_catch_type()) { - // TODO(#6): Replace with dynamic cast - if (type_info != p_exception_object.type_info && + // This is our dynamic cast :P + auto position = std::find_if(p_exception_object.type_info.begin(), + p_exception_object.type_info.end(), + [&type_info](auto const& element) -> bool { + return element.type_info == type_info; + }); + + if (position == p_exception_object.type_info.end() && type_info != action_decoder::install_context_type()) { continue; } + p_exception_object.choosen_type_offset = position->offset; // ====== Prepare to Install context!! ===== cpu[0] = &p_exception_object; cpu[1] = a_decoder.filter(); @@ -1774,6 +1785,151 @@ void raise_exception(exception_object& p_exception_object) } } // namespace ke +extern "C" +{ + // mangled name for vtable for __cxxabi::__class_type_info + extern void* _ZTVN10__cxxabiv117__class_type_infoE[]; + // mangled name for vtable for __cxxabi::__si_class_type_info + extern void* _ZTVN10__cxxabiv120__si_class_type_infoE[]; + // mangled name for vtable for __cxxabi::__vmi_class_type_info + extern void* _ZTVN10__cxxabiv121__vmi_class_type_infoE[]; +} + +namespace ke { +enum class rtti_type +{ + class_type, + single_inheritance, + virtual_or_multi_inheritance, + anything_else, +}; + +rtti_type get_rtti_type(void const* p_type_info) +{ + auto const* word_pointer = + reinterpret_cast(p_type_info); + auto const vtable_method_location = word_pointer[0]; + auto const vtable_start = vtable_method_location - 8; + auto const* vtable_address = reinterpret_cast(vtable_start); + + if (vtable_address == &_ZTVN10__cxxabiv117__class_type_infoE) { + return rtti_type::class_type; + } else if (vtable_address == &_ZTVN10__cxxabiv120__si_class_type_infoE) { + return rtti_type::single_inheritance; + } else if (vtable_address == &_ZTVN10__cxxabiv121__vmi_class_type_infoE) { + return rtti_type::virtual_or_multi_inheritance; + } else { + return rtti_type::anything_else; + } +} + +std::type_info const* extract_si_parent_info(void const* p_info) +{ + [[maybe_unused]] constexpr std::size_t vtable_entry = 0; + [[maybe_unused]] constexpr std::size_t name = 1; + [[maybe_unused]] constexpr std::size_t parent_info_address = 2; + + auto const* word_pointer = reinterpret_cast(p_info); + auto const address = word_pointer[parent_info_address]; + + return reinterpret_cast(address); +} + +template +void push_vmi_info(ke::exception_ptr p_thrown_exception, + base_class_type_info& p_info, + flattened_hierarchy& p_map) +{ + [[maybe_unused]] constexpr std::size_t vtable_entry = 0; + [[maybe_unused]] constexpr std::size_t name = 1; + [[maybe_unused]] constexpr std::size_t flags = 2; + [[maybe_unused]] constexpr std::size_t vla_length = 3; + [[maybe_unused]] constexpr std::size_t vla_start = 4; + + auto const* word_pointer = + reinterpret_cast(p_info.type_info); + auto const length = word_pointer[vla_length]; + for (std::size_t i = vla_start; i < vla_start + (length * 2); i += 2) { + base_class_type_info parent_info{}; + auto const parent_address = word_pointer[i]; + // Shift by 8 to remove the first byte which is just flags + auto const offset_flags = static_cast(word_pointer[i + 1]); + + constexpr auto public_mask = 0x2; + bool const public_parent = offset_flags & public_mask; + + if (not public_parent) { + continue; + } + + auto const offset = offset_flags >> 8; + parent_info.type_info = reinterpret_cast(parent_address); + if (offset >= 0) { + // Shift the lower 8-bits of flag information + parent_info.offset = p_info.offset + offset; + } else { + // Use a byte array to allow pointer arithmetic + constexpr std::ptrdiff_t ptr_diff_size = sizeof(std::ptrdiff_t); + auto const* byte_accessor = as(p_thrown_exception); + // Get the address of the child object with this virtual parent + auto const* child_object = byte_accessor + p_info.offset; + // The first word is a pointer to the child object's vtable, so lets + // access it. + auto const* vtable = *as(child_object); + // The location of the virtual parent relative to this object is found + // behind the vtable, which is why the offset is negative. Because we are + // indexing by word (pointer) lengths, we need to divide the offset by the + // size of a intptr_t. ARM objects are word aligned so this works safely. + auto const index_of_parent_offset_in_vtable = offset / ptr_diff_size; + // Because the offset is negative, look behind the object's vtable to find + // the offset to the start of the virtual class. + auto const offset_to_virtual = vtable[index_of_parent_offset_in_vtable]; + // The virtual base of the child does not include the full offset from the + // start of the thrown object. We need to add the offset from the + // sub-object to get the correct location. + parent_info.offset = offset_to_virtual + p_info.offset; + } + p_map.push_back(parent_info); + } +} + +template +void flatten_rtti(ke::exception_ptr p_thrown_exception, + flattened_hierarchy& p_map, + std::type_info const* p_type_info) +{ + // Add first element to the list + p_map.push_back({ .type_info = p_type_info, .offset = 0 }); + auto iter = p_map.begin(); + auto info = get_rtti_type(p_type_info); + + // If this is a non-class type, then there is in hierarchy and this first + // element we pushed is the only one. + if (info == rtti_type::anything_else) { + return; + } + + for (; iter != p_map.begin() + p_map.size; iter++) { + info = get_rtti_type(iter->type_info); + + if (info == rtti_type::class_type) { + // There is nothing to do in this case. This entry is are already in the + // list from being something else's parent either via VMI or SI. + continue; + } else if (info == rtti_type::single_inheritance) { + base_class_type_info parent_info{}; + parent_info.type_info = extract_si_parent_info(iter->type_info); + // Assign your offset to your direct parent because their memory is within + // you. + parent_info.offset += iter->offset; + p_map.push_back(parent_info); + } else if (info == rtti_type::virtual_or_multi_inheritance) { + push_vmi_info(p_thrown_exception, *iter, p_map); + } + } +} +} // namespace ke + extern "C" { void _exit([[maybe_unused]] int rc) // NOLINT @@ -1813,7 +1969,9 @@ extern "C" void* __wrap___cxa_begin_catch(void* p_exception_object) { - return ke::extract_thrown_object(p_exception_object); + auto* eo = reinterpret_cast(p_exception_object); + auto* thrown_object = ke::extract_thrown_object(eo); + return thrown_object; } void __wrap___cxa_end_cleanup() @@ -1871,9 +2029,10 @@ extern "C" { ke::active_exception = p_thrown_exception; auto& exception_object = ke::extract_exception_object(p_thrown_exception); - exception_object.type_info = p_type_info; exception_object.destructor = p_destructor; ke::capture_cpu_core(exception_object.cpu); + ke::flatten_rtti<12>( + p_thrown_exception, exception_object.type_info, p_type_info); // TODO(35): Replace this with an immediate call to unwind_frame(). What we // have below is fragile and can break very easily. @@ -1882,8 +2041,10 @@ extern "C" #if OPTIMIZATION_LEVEL == Debug std::uint32_t const* stack_pointer = *exception_object.cpu.sp; exception_object.cpu.r3 = stack_pointer[0]; - exception_object.cpu.pc = stack_pointer[1]; - exception_object.cpu.sp = stack_pointer + 2; + exception_object.cpu.r4 = stack_pointer[1]; + exception_object.cpu.r5 = stack_pointer[2]; + exception_object.cpu.pc = stack_pointer[3]; + exception_object.cpu.sp = stack_pointer + 4; #elif OPTIMIZATION_LEVEL == MinSizeRel #elif OPTIMIZATION_LEVEL == MinSizeRel std::uint32_t const* stack_pointer = *exception_object.cpu.sp; diff --git a/src/arm_cortex/estell/internal.hpp b/src/arm_cortex/estell/internal.hpp index 8f9ce1f..661a4ad 100644 --- a/src/arm_cortex/estell/internal.hpp +++ b/src/arm_cortex/estell/internal.hpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -313,10 +314,66 @@ struct cache_t } }; +struct base_class_type_info +{ + void const* type_info = nullptr; + std::int32_t offset = 0; +}; + +template +struct flattened_hierarchy +{ + static_assert(max_count > 0); + static constexpr auto capacity = max_count; + + std::array bases{}; + std::uint32_t size = 0; + + explicit flattened_hierarchy(std::type_info const* p_info) + { + bases[0].type_info = p_info; + bases[0].offset = 0; + size++; + } + + flattened_hierarchy() + { + } + + auto begin() + { + return bases.begin(); + } + + auto end() + { + return bases.begin() + size; + } + + auto cbegin() const + { + return bases.cbegin(); + } + + auto cend() const + { + return bases.cbegin() + size; + } + + void push_back(base_class_type_info const& p_info) + { + if (size > max_count) { + std::terminate(); + } + bases[size++] = p_info; + } +}; + struct exception_object { cortex_m_cpu cpu{}; - std::type_info* type_info = nullptr; + flattened_hierarchy<12> type_info{}; + std::size_t choosen_type_offset = 0; destructor_t* destructor = nullptr; cache_t cache{}; }; @@ -332,12 +389,15 @@ inline exception_object& extract_exception_object(void* p_thrown_exception) return *reinterpret_cast(start_of_exception_object); } -inline void* extract_thrown_object(void* p_exception_object) +inline void* extract_thrown_object(exception_object* p_exception_object) { auto object_address = reinterpret_cast(p_exception_object); - auto start_of_thrown = object_address + sizeof(exception_object); - return reinterpret_cast(start_of_thrown); + auto start_of_thrown = object_address + sizeof(exception_object) + + p_exception_object->choosen_type_offset; + return reinterpret_cast(start_of_thrown); } + +inline constexpr auto eo_size = sizeof(exception_object); } // namespace ke struct [[gnu::packed]] su16_t @@ -366,4 +426,4 @@ extern "C" extern std::uint32_t __exidx_end; extern std::uint32_t __extab_start; extern std::uint32_t __extab_end; -} \ No newline at end of file +} diff --git a/symbol_dump.demangled.txt b/symbol_dump.demangled.txt new file mode 100644 index 0000000..aa200a0 --- /dev/null +++ b/symbol_dump.demangled.txt @@ -0,0 +1,397 @@ +08000274 t _GLOBAL__sub_I__ZN10__cxxabiv119__terminate_handlerE +080000f0 t _GLOBAL__sub_I__ZNSt3pmr15memory_resourceD2Ev +08000134 t _GLOBAL__sub_I___cxa_get_globals_fast +0800382c T _Unwind_Backtrace +08002e48 t _Unwind_DebugHook +08003808 T _Unwind_ForcedUnwind +08003070 t _Unwind_GetGR +0800379c T _Unwind_RaiseException +080037c0 T _Unwind_Resume +080037e4 T _Unwind_Resume_or_Rethrow +080030bc t _Unwind_SetGR +08003040 T _Unwind_VRS_Get +08003404 T _Unwind_VRS_Pop +0800308c T _Unwind_VRS_Set +08002e3c t _Unwind_decode_typeinfo_ptr.constprop.0 +080014a8 T application(resource_list&) +080014e4 T terminate_handler() +08001508 T initialize_platform() +08001454 T foo() +08000210 t __static_initialization_and_destruction_0(int, int) +0800263c T _ZGTtNKSt9exception4whatEv +20000290 b guard variable for initialize_platform()::dwt_steady_clock +08001db0 T __cxxabiv1::__terminate(void (*)()) +08001d04 T __cxxabiv1::__class_type_info::~__class_type_info() +08001cf0 T __cxxabiv1::__class_type_info::~__class_type_info() +08001cf0 T __cxxabiv1::__class_type_info::~__class_type_info() +2000010c D __cxxabiv1::__terminate_handler +08000284 W __cxxabiv1::__terminate_handler::'lambda'()::_FUN() +08001e6c T __cxxabiv1::__si_class_type_info::~__si_class_type_info() +08001e58 T __cxxabiv1::__si_class_type_info::~__si_class_type_info() +08001e58 T __cxxabiv1::__si_class_type_info::~__si_class_type_info() +08001fbc T __cxxabiv1::__vmi_class_type_info::~__vmi_class_type_info() +08001fa8 T __cxxabiv1::__vmi_class_type_info::~__vmi_class_type_info() +08001fa8 T __cxxabiv1::__vmi_class_type_info::~__vmi_class_type_info() +200002b0 b (anonymous namespace)::eh_globals +200002bc b (anonymous namespace)::__new_handler +080026cc t (anonymous namespace)::constant_init::~constant_init() +080026cc t (anonymous namespace)::constant_init::~constant_init() +2000016c b ke::(anonymous namespace)::active_exception +20000170 b ke::(anonymous namespace)::exception_buffer +08001138 W ke::parse_header(unsigned char const**) +08000346 T ke::unwind_frame(ke::instructions_t const&, ke::cortex_m_cpu&) +08000bf6 W ke::action_decoder::get_next_catch_type() +08000bce W ke::action_decoder::get_current_type_info_from_filter() +0800121a W ke::enter_function(ke::exception_object&) +0800085a T ke::get_index_entry(unsigned long) +08000ae8 W ke::index_less_than::operator()(unsigned long, ke::index_entry_t const&) +08000f7e W ke::call_site_info ke::parse_call_site<(ke::lsda_encoding)10>(unsigned char const**, unsigned long, unsigned char const*) +08000ff0 W ke::call_site_info ke::parse_call_site<(ke::lsda_encoding)11>(unsigned char const**, unsigned long, unsigned char const*) +0800105e W ke::call_site_info ke::parse_call_site<(ke::lsda_encoding)12>(unsigned char const**, unsigned long, unsigned char const*) +08000ea4 W ke::call_site_info ke::parse_call_site<(ke::lsda_encoding)2>(unsigned char const**, unsigned long, unsigned char const*) +08000f10 W ke::call_site_info ke::parse_call_site<(ke::lsda_encoding)3>(unsigned char const**, unsigned long, unsigned char const*) +080011ac W ke::call_site_info ke::parse_call_site<(ke::lsda_encoding)4>(unsigned char const**, unsigned long, unsigned char const*) +08000c94 W ke::call_site_info ke::parse_call_site<(ke::lsda_encoding)9>(unsigned char const**, unsigned long, unsigned char const*) +08000884 T ke::raise_exception(ke::exception_object&) +080010ce W ke::skip_dwarf_info(unsigned char const**) +080002fc T ke::current_exception() +08000b40 W ke::decoded_uleb128_t<4u> ke::multi_read_uleb128<4u>(unsigned char const*) +08000e82 W unsigned long const* ke::pop_register_range<1u, (ke::pop_lr)1>(unsigned long const*, ke::cortex_m_cpu&) +08000e64 W unsigned long const* ke::pop_register_range<2u, (ke::pop_lr)1>(unsigned long const*, ke::cortex_m_cpu&) +08000e46 W unsigned long const* ke::pop_register_range<3u, (ke::pop_lr)1>(unsigned long const*, ke::cortex_m_cpu&) +08000e28 W unsigned long const* ke::pop_register_range<4u, (ke::pop_lr)1>(unsigned long const*, ke::cortex_m_cpu&) +08000e0a W unsigned long const* ke::pop_register_range<5u, (ke::pop_lr)1>(unsigned long const*, ke::cortex_m_cpu&) +08000dec W unsigned long const* ke::pop_register_range<6u, (ke::pop_lr)1>(unsigned long const*, ke::cortex_m_cpu&) +08000dce W unsigned long const* ke::pop_register_range<7u, (ke::pop_lr)1>(unsigned long const*, ke::cortex_m_cpu&) +08000308 T ke::get_arm_exception_index() +08000b86 W ke::parse_uleb128_call_site(unsigned char const*, unsigned long, unsigned char const*) +0800084e T ke::get_type_info_from_class_type(void const*) +08000ea0 W unsigned int const const* ke::as(void const*) +08000bcc W unsigned int const* const* ke::as(void const*) +08000fee W long const* ke::as(void const*) +08000f0e W unsigned long const* ke::as(void const*) +08000f7c W short const* ke::as(void const*) +08000ea2 W unsigned short const* ke::as(void const*) +0800105c W long long const* ke::as(void const*) +080010cc W unsigned long long const* ke::as(void const*) +080002fa T ke::get_lu(void*) +08000afc W ke::to_lsda(ke::exception_object&) +080002f8 T ke::get_su16(void*) +08000250 T hal::get_terminate() +0800023c T hal::set_terminate(void (*)()) +20000004 D hal::_default_allocator +20000110 D hal::_exception_allocator +08000268 T hal::get_exception_allocator() +0800025c T hal::set_exception_allocator(std::pmr::memory_resource*) +08000286 W hal::single_exception_allocator<256u>::do_allocate(unsigned int, unsigned int) +080002ae W hal::single_exception_allocator<256u>::do_deallocate(void*, unsigned int, unsigned int) +080002d8 W hal::single_exception_allocator<256u>::~single_exception_allocator() +080002c4 W hal::single_exception_allocator<256u>::~single_exception_allocator() +080002c4 W hal::single_exception_allocator<256u>::~single_exception_allocator() +20000134 d hal::stm32f1::(anonymous namespace)::adc_clock_rate +20000120 d hal::stm32f1::(anonymous namespace)::ahb_clock_rate +200002a4 b hal::stm32f1::(anonymous namespace)::pll_clock_rate +200002a8 b hal::stm32f1::(anonymous namespace)::rtc_clock_rate +200002ac b hal::stm32f1::(anonymous namespace)::usb_clock_rate +20000124 d hal::stm32f1::(anonymous namespace)::apb1_clock_rate +20000128 d hal::stm32f1::(anonymous namespace)::apb2_clock_rate +2000012c d hal::stm32f1::(anonymous namespace)::timer_apb1_clock_rate +20000130 d hal::stm32f1::(anonymous namespace)::timer_apb2_clock_rate +080043d0 V hal::stm32f1::rtc_register::backup_domain_reset +080043c8 V hal::stm32f1::rtc_register::low_speed_osc_enable +080043e0 V hal::stm32f1::clock_control::pll_enable +080043d8 V hal::stm32f1::clock_control::external_osc_enable +08001600 T hal::stm32f1::configure_clocks(hal::stm32f1::clock_tree) +08001c7c T hal::stm32f1::maximum_speed_using_internal_oscillator() +20000138 V hal::stm32f1::rcc +2000013c V hal::stm32f1::flash +08001bb0 T hal::stm32f1::frequency(hal::stm32f1::peripheral) +0800159c T hal::cortex_m::dwt_counter::driver_uptime() +080015bc T hal::cortex_m::dwt_counter::driver_frequency() +080015fc T hal::cortex_m::dwt_counter::register_cpu_frequency(float) +080015c0 T hal::cortex_m::dwt_counter::dwt_counter(float) +080015c0 T hal::cortex_m::dwt_counter::dwt_counter(float) +0800157c W hal::cortex_m::dwt_counter::~dwt_counter() +08001568 W hal::cortex_m::dwt_counter::~dwt_counter() +08001568 W hal::cortex_m::dwt_counter::~dwt_counter() +2000011c V hal::cortex_m::dwt +20000118 V hal::cortex_m::core +08001e4c T __gnu_cxx::recursive_init_error::recursive_init_error() +08001e4c T __gnu_cxx::recursive_init_error::recursive_init_error() +08001e30 T __gnu_cxx::recursive_init_error::~recursive_init_error() +08001e1c T __gnu_cxx::recursive_init_error::~recursive_init_error() +08001e1c T __gnu_cxx::recursive_init_error::~recursive_init_error() +08001d80 T __cxxabiv1::__class_type_info::__do_catch(std::type_info const*, void**, unsigned int) const +08001d64 T __cxxabiv1::__class_type_info::__do_upcast(__cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info::__upcast_result&) const +08001cb0 T __cxxabiv1::__class_type_info::__do_upcast(__cxxabiv1::__class_type_info const*, void**) const +08001d20 T __cxxabiv1::__class_type_info::__do_dyncast(int, __cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info::__dyncast_result&) const +08001ce4 T __cxxabiv1::__class_type_info::__do_find_public_src(int, void const*, __cxxabiv1::__class_type_info const*, void const*) const +08001f48 T __cxxabiv1::__si_class_type_info::__do_upcast(__cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info::__upcast_result&) const +08001ec4 T __cxxabiv1::__si_class_type_info::__do_dyncast(int, __cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info::__dyncast_result&) const +08001e88 T __cxxabiv1::__si_class_type_info::__do_find_public_src(int, void const*, __cxxabiv1::__class_type_info const*, void const*) const +0800248c T __cxxabiv1::__vmi_class_type_info::__do_upcast(__cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info::__upcast_result&) const +08002060 T __cxxabiv1::__vmi_class_type_info::__do_dyncast(int, __cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info::__dyncast_result&) const +08001fd8 T __cxxabiv1::__vmi_class_type_info::__do_find_public_src(int, void const*, __cxxabiv1::__class_type_info const*, void const*) const +080002a4 W hal::single_exception_allocator<256u>::do_is_equal(std::pmr::memory_resource const&) const +080025c8 t std::pmr::(anonymous namespace)::null_res_t::do_is_equal(std::pmr::memory_resource const&) const +080025c8 t std::pmr::(anonymous namespace)::newdel_res_t::do_is_equal(std::pmr::memory_resource const&) const +08002690 T std::bad_alloc::what() const +0800263c T std::exception::what() const +08001f78 T std::type_info::__is_pointer_p() const +08001f78 T std::type_info::__is_function_p() const +08001f7c T std::type_info::__equal(std::type_info const&) const +08001f7c T std::type_info::operator==(std::type_info const&) const +20000148 d std::pmr::(anonymous namespace)::newdel_res +08002620 t std::pmr::(anonymous namespace)::null_res_t::do_allocate(unsigned int, unsigned int) +080025d4 t std::pmr::(anonymous namespace)::null_res_t::do_deallocate(void*, unsigned int, unsigned int) +080025fc t std::pmr::(anonymous namespace)::null_res_t::~null_res_t() +080025d8 t std::pmr::(anonymous namespace)::null_res_t::~null_res_t() +080025d8 t std::pmr::(anonymous namespace)::null_res_t::~null_res_t() +20000140 d std::pmr::(anonymous namespace)::default_res +08002618 t std::pmr::(anonymous namespace)::newdel_res_t::do_allocate(unsigned int, unsigned int) +0800260c t std::pmr::(anonymous namespace)::newdel_res_t::do_deallocate(void*, unsigned int, unsigned int) +080025ec t std::pmr::(anonymous namespace)::newdel_res_t::~newdel_res_t() +080025dc t std::pmr::(anonymous namespace)::newdel_res_t::~newdel_res_t() +080025dc t std::pmr::(anonymous namespace)::newdel_res_t::~newdel_res_t() +080025e4 t std::pmr::(anonymous namespace)::constant_init::~constant_init() +080025e4 t std::pmr::(anonymous namespace)::constant_init::~constant_init() +080025e0 t std::pmr::(anonymous namespace)::constant_init::~constant_init() +080025e0 t std::pmr::(anonymous namespace)::constant_init::~constant_init() +080025e8 t std::pmr::(anonymous namespace)::constant_init>::~constant_init() +080025e8 t std::pmr::(anonymous namespace)::constant_init>::~constant_init() +20000144 d std::pmr::(anonymous namespace)::null_res +08002628 T std::pmr::memory_resource::~memory_resource() +08002628 T std::pmr::memory_resource::~memory_resource() +080026ac T std::bad_alloc::~bad_alloc() +08002698 T std::bad_alloc::~bad_alloc() +08002698 T std::bad_alloc::~bad_alloc() +08002638 T std::exception::~exception() +08002638 T std::exception::~exception() +08001f74 T std::type_info::~type_info() +08001f74 T std::type_info::~type_info() +080013ee W __gnu_cxx::__normal_iterator> std::__upper_bound<__gnu_cxx::__normal_iterator>, unsigned long, __gnu_cxx::__ops::_Val_comp_iter>(__gnu_cxx::__normal_iterator>, __gnu_cxx::__normal_iterator>, unsigned long const&, __gnu_cxx::__ops::_Val_comp_iter) +080026d0 T std::get_new_handler() +080000c0 T std::__throw_bad_alloc() +080013e4 W void std::__advance<__gnu_cxx::__normal_iterator>, int>(__gnu_cxx::__normal_iterator>&, int, std::random_access_iterator_tag) +08001434 W _ZSt9__fill_a1IhEN9__gnu_cxx11__enable_ifIXsrSt9__is_byteIT_E7__valueEvE6__typeEPS3_S7_RKS3_ +08001dc0 T std::terminate() +08004358 V typeinfo for S +0800434c V typeinfo for T +08004390 V typeinfo for V +08004380 V typeinfo for error +08004420 T typeinfo for __cxxabiv1::__class_type_info +080044c4 T typeinfo for __cxxabiv1::__si_class_type_info +0800453c T typeinfo for __cxxabiv1::__vmi_class_type_info +0800447c T typeinfo for __gnu_cxx::recursive_init_error +080045cc t typeinfo for std::pmr::(anonymous namespace)::null_res_t +08004598 t typeinfo for std::pmr::(anonymous namespace)::newdel_res_t +08004590 T typeinfo for std::pmr::memory_resource +0800467c T typeinfo for std::bad_alloc +08004654 T typeinfo for std::exception +0800450c T typeinfo for std::type_info +08004354 V typeinfo name for S +08004348 V typeinfo name for T +0800438c V typeinfo name for V +08004378 V typeinfo name for error +080043fc T typeinfo name for __cxxabiv1::__class_type_info +0800449c T typeinfo name for __cxxabiv1::__si_class_type_info +08004514 T typeinfo name for __cxxabiv1::__vmi_class_type_info +08004458 T typeinfo name for __gnu_cxx::recursive_init_error +080045d8 t typeinfo name for std::pmr::(anonymous namespace)::null_res_t +080045a4 t typeinfo name for std::pmr::(anonymous namespace)::newdel_res_t +08004574 T typeinfo name for std::pmr::memory_resource +0800466c T typeinfo name for std::bad_alloc +08004644 T typeinfo name for std::exception +080044fc T typeinfo name for std::type_info +0800442c T vtable for __cxxabiv1::__class_type_info +080044d0 T vtable for __cxxabiv1::__si_class_type_info +08004548 T vtable for __cxxabiv1::__vmi_class_type_info +08004398 V vtable for hal::steady_clock +08003f14 V vtable for hal::single_exception_allocator<256u> +080043b0 T vtable for hal::cortex_m::dwt_counter +08004488 T vtable for __gnu_cxx::recursive_init_error +08004618 t vtable for std::pmr::(anonymous namespace)::null_res_t +080045fc t vtable for std::pmr::(anonymous namespace)::newdel_res_t +08004688 T vtable for std::bad_alloc +20000294 b initialize_platform()::dwt_steady_clock +08003f38 t ke::unwind_frame(ke::instructions_t const&, ke::cortex_m_cpu&)::jump_table +0800262c T operator delete(void*) +080026c8 T operator delete(void*, std::align_val_t) +08001dac T operator delete(void*, unsigned int) +08002630 T operator delete(void*, unsigned int, std::align_val_t) +08002644 T operator new(unsigned int, std::align_val_t) +080046b4 r __EH_FRAME_BEGIN__ +080046dc r __FRAME_END__ +20000150 D __TMC_END__ +0800382c T ___Unwind_Backtrace +08003808 T ___Unwind_ForcedUnwind +0800379c T ___Unwind_RaiseException +080037c0 T ___Unwind_Resume +080037e4 T ___Unwind_Resume_or_Rethrow +080026ec T __addsf3 +08001ca4 T __aeabi_atexit +08002c14 T __aeabi_cfcmpeq +08002c14 T __aeabi_cfcmple +08002c0c T __aeabi_cfrcmple +080026ec T __aeabi_fadd +08002c24 T __aeabi_fcmpeq +08002c60 T __aeabi_fcmpge +08002c74 T __aeabi_fcmpgt +08002c4c T __aeabi_fcmple +08002c38 T __aeabi_fcmplt +08002a64 T __aeabi_fdiv +080028fc T __aeabi_fmul +080026e0 T __aeabi_frsub +080026e8 T __aeabi_fsub +08002854 T __aeabi_i2f +08002880 T __aeabi_l2f +08003b70 T __aeabi_memcpy +08003b70 T __aeabi_memcpy4 +08003b70 T __aeabi_memcpy8 +0800284c T __aeabi_ui2f +08002870 T __aeabi_ul2f +080033ec T __aeabi_unwind_cpp_pr0 +080033f4 W __aeabi_unwind_cpp_pr1 +080033fc W __aeabi_unwind_cpp_pr2 +200004d8 B __bss_end +200004d8 B __bss_end__ +00000388 A __bss_size +20000150 D __bss_start +08002bac T __cmpsf2 +08003e1c T __cxa_atexit +08001e0c T __cxa_guard_abort +08001dd4 T __cxa_guard_acquire +08001e14 T __cxa_guard_release +20000150 D __data_end +00000150 A __data_size +08004898 A __data_source +20000000 D __data_start +08002a64 T __divsf3 +080001c4 t __do_global_dtors_aux +080046b0 t __do_global_dtors_aux_fini_array_entry +20000000 D __dso_handle +200004d8 B __end +08002bac T __eqsf2 +08004898 R __exidx_end +08004758 R __exidx_start +08000000 A __flash +00010000 A __flash_size +08002880 T __floatdisf +08002854 T __floatsisf +08002870 T __floatundisf +0800284c T __floatunsisf +080046a0 t __frame_dummy_init_array_entry +08002b9c T __gesf2 +080030d4 T __gnu_Unwind_Backtrace +08002fd0 T __gnu_Unwind_ForcedUnwind +08002f68 T __gnu_Unwind_RaiseException +080036bc T __gnu_Unwind_Restore_VFP +080036cc T __gnu_Unwind_Restore_VFP_D +080036dc T __gnu_Unwind_Restore_VFP_D_16_to_31 +08003774 T __gnu_Unwind_Restore_WMMXC +080036ec T __gnu_Unwind_Restore_WMMXD +08002fe8 T __gnu_Unwind_Resume +08003028 T __gnu_Unwind_Resume_or_Rethrow +080036c4 T __gnu_Unwind_Save_VFP +080036d4 T __gnu_Unwind_Save_VFP_D +080036e4 T __gnu_Unwind_Save_VFP_D_16_to_31 +08003788 T __gnu_Unwind_Save_WMMXC +08003730 T __gnu_Unwind_Save_WMMXD +08003888 T __gnu_unwind_execute +08002d28 t __gnu_unwind_get_pr_addr +08003154 t __gnu_unwind_pr_common +08002b9c T __gtsf2 +20002400 A __heap_end +200004d8 B __heap_start +080046b0 t __init_array_end +080046a0 t __init_array_start +08000080 V __interrupt_vector +08002ba4 T __lesf2 +08003dc8 T __libc_init_array +200002d0 B __lock___libc_recursive_mutex +08002ba4 T __ltsf2 +08003b9c T __malloc_free +200002c8 B __malloc_free_list +08003c58 T __malloc_grow_chunk +08003c98 T __malloc_malloc +08003c10 T __malloc_sbrk_aligned +200002c4 B __malloc_sbrk_start +200002c0 B __malloc_sbrk_top +080028fc T __mulsf3 +08002bac T __nesf2 +08002c88 T __popcountsi2 +080046a0 t __preinit_array_end +080046a0 t __preinit_array_start +20000000 A __ram +00002800 A __ram_size +080036a4 T __restore_core_regs +08003e18 T __retarget_lock_acquire_recursive +08003e1a T __retarget_lock_release_recursive +20002800 D __stack +00000400 A __stack_size +080026e8 T __subsf3 +00000000 A __tbss_size +08003f14 T __text_end +08000080 D __weak_interrupt_vector +08001448 T __wrap___aeabi_unwind_cpp_pr0 +08000326 T __wrap___cxa_allocate_exception +08000342 T __wrap___cxa_begin_catch +0800033c T __wrap___cxa_call_unexpected +08000ac8 T __wrap___cxa_end_catch +08000a08 T __wrap___cxa_end_cleanup +08000aa4 T __wrap___cxa_free_exception +08000a20 T __wrap___cxa_rethrow +08000a60 T __wrap___cxa_throw +08001446 T __wrap___gnu_unwind_pr_common +0800144c T __wrap___gxx_personality_v0 +0800144a T __wrap__sig_func +0800144e T __wrap_deregister_tm_clones +08001450 T __wrap_register_tm_clones +08000320 T _exit +08003ec8 T _on_exit +200002d4 b _sig_func +0800014c T _start +080000e0 T abort +08003d30 T aligned_alloc +08003e68 W arm_busfault_isr +08003e6a W arm_debugmon_isr +08003e68 T arm_halt_isr +08003e68 W arm_hardfault_isr +08003e6a T arm_ignore_isr +08003e68 W arm_memmanage_isr +08003e6a W arm_nmi_isr +08003e6a W arm_pendsv_isr +08003e6a W arm_svc_isr +08003e6a W arm_systick_isr +08003e68 W arm_usagefault_isr +2000014c d brk +20000270 B cached_type_info +08003b9c T cfree +20000150 b completed.1 +08000184 t deregister_tm_clones +20000288 B end +200002cc B errno +080001ec t frame_dummy +08003b9c T free +08002d50 t get_eit_entry +080014e6 T main +08003c98 T malloc +08003d30 T memalign +08003b70 T memcpy +08003b8c T memset +08003850 t next_unwind_byte +20000154 b object.0 +20000354 b on_exits +08003e6c T raise +080001a0 t register_tm_clones +20000278 B resources +080036a4 T restore_core_regs +08002de4 t restore_non_core_regs +08003e28 T sbrk +08002cc4 t search_EIT_table +08002cb0 t selfrel_offset31 +20000280 B start +08003b5c T strcmp +08002e4c t unwind_phase2 +08002e88 t unwind_phase2_forced +20000114 D value diff --git a/symbol_dump.txt b/symbol_dump.txt new file mode 100644 index 0000000..13e3267 --- /dev/null +++ b/symbol_dump.txt @@ -0,0 +1,397 @@ +08000274 t _GLOBAL__sub_I__ZN10__cxxabiv119__terminate_handlerE +080000f0 t _GLOBAL__sub_I__ZNSt3pmr15memory_resourceD2Ev +08000134 t _GLOBAL__sub_I___cxa_get_globals_fast +0800382c T _Unwind_Backtrace +08002e48 t _Unwind_DebugHook +08003808 T _Unwind_ForcedUnwind +08003070 t _Unwind_GetGR +0800379c T _Unwind_RaiseException +080037c0 T _Unwind_Resume +080037e4 T _Unwind_Resume_or_Rethrow +080030bc t _Unwind_SetGR +08003040 T _Unwind_VRS_Get +08003404 T _Unwind_VRS_Pop +0800308c T _Unwind_VRS_Set +08002e3c t _Unwind_decode_typeinfo_ptr.constprop.0 +080014a8 T _Z11applicationR13resource_list +080014e4 T _Z17terminate_handlerv +08001508 T _Z19initialize_platformv +08001454 T _Z3foov +08000210 t _Z41__static_initialization_and_destruction_0ii +0800263c T _ZGTtNKSt9exception4whatEv +20000290 b _ZGVZ19initialize_platformvE16dwt_steady_clock +08001db0 T _ZN10__cxxabiv111__terminateEPFvvE +08001d04 T _ZN10__cxxabiv117__class_type_infoD0Ev +08001cf0 T _ZN10__cxxabiv117__class_type_infoD1Ev +08001cf0 T _ZN10__cxxabiv117__class_type_infoD2Ev +2000010c D _ZN10__cxxabiv119__terminate_handlerE +08000284 W _ZN10__cxxabiv119__terminate_handlerMUlvE_4_FUNEv +08001e6c T _ZN10__cxxabiv120__si_class_type_infoD0Ev +08001e58 T _ZN10__cxxabiv120__si_class_type_infoD1Ev +08001e58 T _ZN10__cxxabiv120__si_class_type_infoD2Ev +08001fbc T _ZN10__cxxabiv121__vmi_class_type_infoD0Ev +08001fa8 T _ZN10__cxxabiv121__vmi_class_type_infoD1Ev +08001fa8 T _ZN10__cxxabiv121__vmi_class_type_infoD2Ev +200002b0 b _ZN12_GLOBAL__N_110eh_globalsE +200002bc b _ZN12_GLOBAL__N_113__new_handlerE +080026cc t _ZN12_GLOBAL__N_113constant_initD1Ev +080026cc t _ZN12_GLOBAL__N_113constant_initD2Ev +2000016c b _ZN2ke12_GLOBAL__N_116active_exceptionE +20000170 b _ZN2ke12_GLOBAL__N_116exception_bufferE +08001138 W _ZN2ke12parse_headerEPPKh +08000346 T _ZN2ke12unwind_frameERKNS_14instructions_tERNS_12cortex_m_cpuE +08000bf6 W _ZN2ke14action_decoder19get_next_catch_typeEv +08000bce W _ZN2ke14action_decoder33get_current_type_info_from_filterEv +0800121a W _ZN2ke14enter_functionERNS_16exception_objectE +0800085a T _ZN2ke15get_index_entryEm +08000ae8 W _ZN2ke15index_less_thanclEmRKNS_13index_entry_tE +08000f7e W _ZN2ke15parse_call_siteILNS_13lsda_encodingE10EEENS_14call_site_infoEPPKhmS4_ +08000ff0 W _ZN2ke15parse_call_siteILNS_13lsda_encodingE11EEENS_14call_site_infoEPPKhmS4_ +0800105e W _ZN2ke15parse_call_siteILNS_13lsda_encodingE12EEENS_14call_site_infoEPPKhmS4_ +08000ea4 W _ZN2ke15parse_call_siteILNS_13lsda_encodingE2EEENS_14call_site_infoEPPKhmS4_ +08000f10 W _ZN2ke15parse_call_siteILNS_13lsda_encodingE3EEENS_14call_site_infoEPPKhmS4_ +080011ac W _ZN2ke15parse_call_siteILNS_13lsda_encodingE4EEENS_14call_site_infoEPPKhmS4_ +08000c94 W _ZN2ke15parse_call_siteILNS_13lsda_encodingE9EEENS_14call_site_infoEPPKhmS4_ +08000884 T _ZN2ke15raise_exceptionERNS_16exception_objectE +080010ce W _ZN2ke15skip_dwarf_infoEPPKh +080002fc T _ZN2ke17current_exceptionEv +08000b40 W _ZN2ke18multi_read_uleb128ILj4EEENS_17decoded_uleb128_tIXT_EEEPKh +08000e82 W _ZN2ke18pop_register_rangeILj1ELNS_6pop_lrE1EEEPKmS3_RNS_12cortex_m_cpuE +08000e64 W _ZN2ke18pop_register_rangeILj2ELNS_6pop_lrE1EEEPKmS3_RNS_12cortex_m_cpuE +08000e46 W _ZN2ke18pop_register_rangeILj3ELNS_6pop_lrE1EEEPKmS3_RNS_12cortex_m_cpuE +08000e28 W _ZN2ke18pop_register_rangeILj4ELNS_6pop_lrE1EEEPKmS3_RNS_12cortex_m_cpuE +08000e0a W _ZN2ke18pop_register_rangeILj5ELNS_6pop_lrE1EEEPKmS3_RNS_12cortex_m_cpuE +08000dec W _ZN2ke18pop_register_rangeILj6ELNS_6pop_lrE1EEEPKmS3_RNS_12cortex_m_cpuE +08000dce W _ZN2ke18pop_register_rangeILj7ELNS_6pop_lrE1EEEPKmS3_RNS_12cortex_m_cpuE +08000308 T _ZN2ke23get_arm_exception_indexEv +08000b86 W _ZN2ke23parse_uleb128_call_siteEPKhmS1_ +0800084e T _ZN2ke29get_type_info_from_class_typeEPKv +08000ea0 W _ZN2ke2asIKjEEPKT_PKv +08000bcc W _ZN2ke2asIPKjEEPKT_PKv +08000fee W _ZN2ke2asIlEEPKT_PKv +08000f0e W _ZN2ke2asImEEPKT_PKv +08000f7c W _ZN2ke2asIsEEPKT_PKv +08000ea2 W _ZN2ke2asItEEPKT_PKv +0800105c W _ZN2ke2asIxEEPKT_PKv +080010cc W _ZN2ke2asIyEEPKT_PKv +080002fa T _ZN2ke6get_luEPv +08000afc W _ZN2ke7to_lsdaERNS_16exception_objectE +080002f8 T _ZN2ke8get_su16EPv +08000250 T _ZN3hal13get_terminateEv +0800023c T _ZN3hal13set_terminateEPFvvE +20000004 D _ZN3hal18_default_allocatorE +20000110 D _ZN3hal20_exception_allocatorE +08000268 T _ZN3hal23get_exception_allocatorEv +0800025c T _ZN3hal23set_exception_allocatorEPNSt3pmr15memory_resourceE +08000286 W _ZN3hal26single_exception_allocatorILj256EE11do_allocateEjj +080002ae W _ZN3hal26single_exception_allocatorILj256EE13do_deallocateEPvjj +080002d8 W _ZN3hal26single_exception_allocatorILj256EED0Ev +080002c4 W _ZN3hal26single_exception_allocatorILj256EED1Ev +080002c4 W _ZN3hal26single_exception_allocatorILj256EED2Ev +20000134 d _ZN3hal7stm32f112_GLOBAL__N_114adc_clock_rateE +20000120 d _ZN3hal7stm32f112_GLOBAL__N_114ahb_clock_rateE +200002a4 b _ZN3hal7stm32f112_GLOBAL__N_114pll_clock_rateE +200002a8 b _ZN3hal7stm32f112_GLOBAL__N_114rtc_clock_rateE +200002ac b _ZN3hal7stm32f112_GLOBAL__N_114usb_clock_rateE +20000124 d _ZN3hal7stm32f112_GLOBAL__N_115apb1_clock_rateE +20000128 d _ZN3hal7stm32f112_GLOBAL__N_115apb2_clock_rateE +2000012c d _ZN3hal7stm32f112_GLOBAL__N_121timer_apb1_clock_rateE +20000130 d _ZN3hal7stm32f112_GLOBAL__N_121timer_apb2_clock_rateE +080043d0 V _ZN3hal7stm32f112rtc_register19backup_domain_resetE +080043c8 V _ZN3hal7stm32f112rtc_register20low_speed_osc_enableE +080043e0 V _ZN3hal7stm32f113clock_control10pll_enableE +080043d8 V _ZN3hal7stm32f113clock_control19external_osc_enableE +08001600 T _ZN3hal7stm32f116configure_clocksENS0_10clock_treeE +08001c7c T _ZN3hal7stm32f139maximum_speed_using_internal_oscillatorEv +20000138 V _ZN3hal7stm32f13rccE +2000013c V _ZN3hal7stm32f15flashE +08001bb0 T _ZN3hal7stm32f19frequencyENS0_10peripheralE +0800159c T _ZN3hal8cortex_m11dwt_counter13driver_uptimeEv +080015bc T _ZN3hal8cortex_m11dwt_counter16driver_frequencyEv +080015fc T _ZN3hal8cortex_m11dwt_counter22register_cpu_frequencyEf +080015c0 T _ZN3hal8cortex_m11dwt_counterC1Ef +080015c0 T _ZN3hal8cortex_m11dwt_counterC2Ef +0800157c W _ZN3hal8cortex_m11dwt_counterD0Ev +08001568 W _ZN3hal8cortex_m11dwt_counterD1Ev +08001568 W _ZN3hal8cortex_m11dwt_counterD2Ev +2000011c V _ZN3hal8cortex_m3dwtE +20000118 V _ZN3hal8cortex_m4coreE +08001e4c T _ZN9__gnu_cxx20recursive_init_errorC1Ev +08001e4c T _ZN9__gnu_cxx20recursive_init_errorC2Ev +08001e30 T _ZN9__gnu_cxx20recursive_init_errorD0Ev +08001e1c T _ZN9__gnu_cxx20recursive_init_errorD1Ev +08001e1c T _ZN9__gnu_cxx20recursive_init_errorD2Ev +08001d80 T _ZNK10__cxxabiv117__class_type_info10__do_catchEPKSt9type_infoPPvj +08001d64 T _ZNK10__cxxabiv117__class_type_info11__do_upcastEPKS0_PKvRNS0_15__upcast_resultE +08001cb0 T _ZNK10__cxxabiv117__class_type_info11__do_upcastEPKS0_PPv +08001d20 T _ZNK10__cxxabiv117__class_type_info12__do_dyncastEiNS0_10__sub_kindEPKS0_PKvS3_S5_RNS0_16__dyncast_resultE +08001ce4 T _ZNK10__cxxabiv117__class_type_info20__do_find_public_srcEiPKvPKS0_S2_ +08001f48 T _ZNK10__cxxabiv120__si_class_type_info11__do_upcastEPKNS_17__class_type_infoEPKvRNS1_15__upcast_resultE +08001ec4 T _ZNK10__cxxabiv120__si_class_type_info12__do_dyncastEiNS_17__class_type_info10__sub_kindEPKS1_PKvS4_S6_RNS1_16__dyncast_resultE +08001e88 T _ZNK10__cxxabiv120__si_class_type_info20__do_find_public_srcEiPKvPKNS_17__class_type_infoES2_ +0800248c T _ZNK10__cxxabiv121__vmi_class_type_info11__do_upcastEPKNS_17__class_type_infoEPKvRNS1_15__upcast_resultE +08002060 T _ZNK10__cxxabiv121__vmi_class_type_info12__do_dyncastEiNS_17__class_type_info10__sub_kindEPKS1_PKvS4_S6_RNS1_16__dyncast_resultE +08001fd8 T _ZNK10__cxxabiv121__vmi_class_type_info20__do_find_public_srcEiPKvPKNS_17__class_type_infoES2_ +080002a4 W _ZNK3hal26single_exception_allocatorILj256EE11do_is_equalERKNSt3pmr15memory_resourceE +080025c8 t _ZNKSt3pmr12_GLOBAL__N_110null_res_t11do_is_equalERKNS_15memory_resourceE +080025c8 t _ZNKSt3pmr12_GLOBAL__N_112newdel_res_t11do_is_equalERKNS_15memory_resourceE +08002690 T _ZNKSt9bad_alloc4whatEv +0800263c T _ZNKSt9exception4whatEv +08001f78 T _ZNKSt9type_info14__is_pointer_pEv +08001f78 T _ZNKSt9type_info15__is_function_pEv +08001f7c T _ZNKSt9type_info7__equalERKS_ +08001f7c T _ZNKSt9type_infoeqERKS_ +20000148 d _ZNSt3pmr12_GLOBAL__N_110newdel_resE +08002620 t _ZNSt3pmr12_GLOBAL__N_110null_res_t11do_allocateEjj +080025d4 t _ZNSt3pmr12_GLOBAL__N_110null_res_t13do_deallocateEPvjj +080025fc t _ZNSt3pmr12_GLOBAL__N_110null_res_tD0Ev +080025d8 t _ZNSt3pmr12_GLOBAL__N_110null_res_tD1Ev +080025d8 t _ZNSt3pmr12_GLOBAL__N_110null_res_tD2Ev +20000140 d _ZNSt3pmr12_GLOBAL__N_111default_resE +08002618 t _ZNSt3pmr12_GLOBAL__N_112newdel_res_t11do_allocateEjj +0800260c t _ZNSt3pmr12_GLOBAL__N_112newdel_res_t13do_deallocateEPvjj +080025ec t _ZNSt3pmr12_GLOBAL__N_112newdel_res_tD0Ev +080025dc t _ZNSt3pmr12_GLOBAL__N_112newdel_res_tD1Ev +080025dc t _ZNSt3pmr12_GLOBAL__N_112newdel_res_tD2Ev +080025e4 t _ZNSt3pmr12_GLOBAL__N_113constant_initINS0_10null_res_tEED1Ev +080025e4 t _ZNSt3pmr12_GLOBAL__N_113constant_initINS0_10null_res_tEED2Ev +080025e0 t _ZNSt3pmr12_GLOBAL__N_113constant_initINS0_12newdel_res_tEED1Ev +080025e0 t _ZNSt3pmr12_GLOBAL__N_113constant_initINS0_12newdel_res_tEED2Ev +080025e8 t _ZNSt3pmr12_GLOBAL__N_113constant_initISt6atomicIPNS_15memory_resourceEEED1Ev +080025e8 t _ZNSt3pmr12_GLOBAL__N_113constant_initISt6atomicIPNS_15memory_resourceEEED2Ev +20000144 d _ZNSt3pmr12_GLOBAL__N_18null_resE +08002628 T _ZNSt3pmr15memory_resourceD1Ev +08002628 T _ZNSt3pmr15memory_resourceD2Ev +080026ac T _ZNSt9bad_allocD0Ev +08002698 T _ZNSt9bad_allocD1Ev +08002698 T _ZNSt9bad_allocD2Ev +08002638 T _ZNSt9exceptionD1Ev +08002638 T _ZNSt9exceptionD2Ev +08001f74 T _ZNSt9type_infoD1Ev +08001f74 T _ZNSt9type_infoD2Ev +080013ee W _ZSt13__upper_boundIN9__gnu_cxx17__normal_iteratorIPKN2ke13index_entry_tESt4spanIS4_Lj4294967295EEEEmNS0_5__ops14_Val_comp_iterINS2_15index_less_thanEEEET_SD_SD_RKT0_T1_ +080026d0 T _ZSt15get_new_handlerv +080000c0 T _ZSt17__throw_bad_allocv +080013e4 W _ZSt9__advanceIN9__gnu_cxx17__normal_iteratorIPKN2ke13index_entry_tESt4spanIS4_Lj4294967295EEEEiEvRT_T0_St26random_access_iterator_tag +08001434 W _ZSt9__fill_a1IhEN9__gnu_cxx11__enable_ifIXsrSt9__is_byteIT_E7__valueEvE6__typeEPS3_S7_RKS3_ +08001dc0 T _ZSt9terminatev +08004358 V _ZTI1S +0800434c V _ZTI1T +08004390 V _ZTI1V +08004380 V _ZTI5error +08004420 T _ZTIN10__cxxabiv117__class_type_infoE +080044c4 T _ZTIN10__cxxabiv120__si_class_type_infoE +0800453c T _ZTIN10__cxxabiv121__vmi_class_type_infoE +0800447c T _ZTIN9__gnu_cxx20recursive_init_errorE +080045cc t _ZTINSt3pmr12_GLOBAL__N_110null_res_tE +08004598 t _ZTINSt3pmr12_GLOBAL__N_112newdel_res_tE +08004590 T _ZTINSt3pmr15memory_resourceE +0800467c T _ZTISt9bad_alloc +08004654 T _ZTISt9exception +0800450c T _ZTISt9type_info +08004354 V _ZTS1S +08004348 V _ZTS1T +0800438c V _ZTS1V +08004378 V _ZTS5error +080043fc T _ZTSN10__cxxabiv117__class_type_infoE +0800449c T _ZTSN10__cxxabiv120__si_class_type_infoE +08004514 T _ZTSN10__cxxabiv121__vmi_class_type_infoE +08004458 T _ZTSN9__gnu_cxx20recursive_init_errorE +080045d8 t _ZTSNSt3pmr12_GLOBAL__N_110null_res_tE +080045a4 t _ZTSNSt3pmr12_GLOBAL__N_112newdel_res_tE +08004574 T _ZTSNSt3pmr15memory_resourceE +0800466c T _ZTSSt9bad_alloc +08004644 T _ZTSSt9exception +080044fc T _ZTSSt9type_info +0800442c T _ZTVN10__cxxabiv117__class_type_infoE +080044d0 T _ZTVN10__cxxabiv120__si_class_type_infoE +08004548 T _ZTVN10__cxxabiv121__vmi_class_type_infoE +08004398 V _ZTVN3hal12steady_clockE +08003f14 V _ZTVN3hal26single_exception_allocatorILj256EEE +080043b0 T _ZTVN3hal8cortex_m11dwt_counterE +08004488 T _ZTVN9__gnu_cxx20recursive_init_errorE +08004618 t _ZTVNSt3pmr12_GLOBAL__N_110null_res_tE +080045fc t _ZTVNSt3pmr12_GLOBAL__N_112newdel_res_tE +08004688 T _ZTVSt9bad_alloc +20000294 b _ZZ19initialize_platformvE16dwt_steady_clock +08003f38 t _ZZN2ke12unwind_frameERKNS_14instructions_tERNS_12cortex_m_cpuEE10jump_table +0800262c T _ZdlPv +080026c8 T _ZdlPvSt11align_val_t +08001dac T _ZdlPvj +08002630 T _ZdlPvjSt11align_val_t +08002644 T _ZnwjSt11align_val_t +080046b4 r __EH_FRAME_BEGIN__ +080046dc r __FRAME_END__ +20000150 D __TMC_END__ +0800382c T ___Unwind_Backtrace +08003808 T ___Unwind_ForcedUnwind +0800379c T ___Unwind_RaiseException +080037c0 T ___Unwind_Resume +080037e4 T ___Unwind_Resume_or_Rethrow +080026ec T __addsf3 +08001ca4 T __aeabi_atexit +08002c14 T __aeabi_cfcmpeq +08002c14 T __aeabi_cfcmple +08002c0c T __aeabi_cfrcmple +080026ec T __aeabi_fadd +08002c24 T __aeabi_fcmpeq +08002c60 T __aeabi_fcmpge +08002c74 T __aeabi_fcmpgt +08002c4c T __aeabi_fcmple +08002c38 T __aeabi_fcmplt +08002a64 T __aeabi_fdiv +080028fc T __aeabi_fmul +080026e0 T __aeabi_frsub +080026e8 T __aeabi_fsub +08002854 T __aeabi_i2f +08002880 T __aeabi_l2f +08003b70 T __aeabi_memcpy +08003b70 T __aeabi_memcpy4 +08003b70 T __aeabi_memcpy8 +0800284c T __aeabi_ui2f +08002870 T __aeabi_ul2f +080033ec T __aeabi_unwind_cpp_pr0 +080033f4 W __aeabi_unwind_cpp_pr1 +080033fc W __aeabi_unwind_cpp_pr2 +200004d8 B __bss_end +200004d8 B __bss_end__ +00000388 A __bss_size +20000150 D __bss_start +08002bac T __cmpsf2 +08003e1c T __cxa_atexit +08001e0c T __cxa_guard_abort +08001dd4 T __cxa_guard_acquire +08001e14 T __cxa_guard_release +20000150 D __data_end +00000150 A __data_size +08004898 A __data_source +20000000 D __data_start +08002a64 T __divsf3 +080001c4 t __do_global_dtors_aux +080046b0 t __do_global_dtors_aux_fini_array_entry +20000000 D __dso_handle +200004d8 B __end +08002bac T __eqsf2 +08004898 R __exidx_end +08004758 R __exidx_start +08000000 A __flash +00010000 A __flash_size +08002880 T __floatdisf +08002854 T __floatsisf +08002870 T __floatundisf +0800284c T __floatunsisf +080046a0 t __frame_dummy_init_array_entry +08002b9c T __gesf2 +080030d4 T __gnu_Unwind_Backtrace +08002fd0 T __gnu_Unwind_ForcedUnwind +08002f68 T __gnu_Unwind_RaiseException +080036bc T __gnu_Unwind_Restore_VFP +080036cc T __gnu_Unwind_Restore_VFP_D +080036dc T __gnu_Unwind_Restore_VFP_D_16_to_31 +08003774 T __gnu_Unwind_Restore_WMMXC +080036ec T __gnu_Unwind_Restore_WMMXD +08002fe8 T __gnu_Unwind_Resume +08003028 T __gnu_Unwind_Resume_or_Rethrow +080036c4 T __gnu_Unwind_Save_VFP +080036d4 T __gnu_Unwind_Save_VFP_D +080036e4 T __gnu_Unwind_Save_VFP_D_16_to_31 +08003788 T __gnu_Unwind_Save_WMMXC +08003730 T __gnu_Unwind_Save_WMMXD +08003888 T __gnu_unwind_execute +08002d28 t __gnu_unwind_get_pr_addr +08003154 t __gnu_unwind_pr_common +08002b9c T __gtsf2 +20002400 A __heap_end +200004d8 B __heap_start +080046b0 t __init_array_end +080046a0 t __init_array_start +08000080 V __interrupt_vector +08002ba4 T __lesf2 +08003dc8 T __libc_init_array +200002d0 B __lock___libc_recursive_mutex +08002ba4 T __ltsf2 +08003b9c T __malloc_free +200002c8 B __malloc_free_list +08003c58 T __malloc_grow_chunk +08003c98 T __malloc_malloc +08003c10 T __malloc_sbrk_aligned +200002c4 B __malloc_sbrk_start +200002c0 B __malloc_sbrk_top +080028fc T __mulsf3 +08002bac T __nesf2 +08002c88 T __popcountsi2 +080046a0 t __preinit_array_end +080046a0 t __preinit_array_start +20000000 A __ram +00002800 A __ram_size +080036a4 T __restore_core_regs +08003e18 T __retarget_lock_acquire_recursive +08003e1a T __retarget_lock_release_recursive +20002800 D __stack +00000400 A __stack_size +080026e8 T __subsf3 +00000000 A __tbss_size +08003f14 T __text_end +08000080 D __weak_interrupt_vector +08001448 T __wrap___aeabi_unwind_cpp_pr0 +08000326 T __wrap___cxa_allocate_exception +08000342 T __wrap___cxa_begin_catch +0800033c T __wrap___cxa_call_unexpected +08000ac8 T __wrap___cxa_end_catch +08000a08 T __wrap___cxa_end_cleanup +08000aa4 T __wrap___cxa_free_exception +08000a20 T __wrap___cxa_rethrow +08000a60 T __wrap___cxa_throw +08001446 T __wrap___gnu_unwind_pr_common +0800144c T __wrap___gxx_personality_v0 +0800144a T __wrap__sig_func +0800144e T __wrap_deregister_tm_clones +08001450 T __wrap_register_tm_clones +08000320 T _exit +08003ec8 T _on_exit +200002d4 b _sig_func +0800014c T _start +080000e0 T abort +08003d30 T aligned_alloc +08003e68 W arm_busfault_isr +08003e6a W arm_debugmon_isr +08003e68 T arm_halt_isr +08003e68 W arm_hardfault_isr +08003e6a T arm_ignore_isr +08003e68 W arm_memmanage_isr +08003e6a W arm_nmi_isr +08003e6a W arm_pendsv_isr +08003e6a W arm_svc_isr +08003e6a W arm_systick_isr +08003e68 W arm_usagefault_isr +2000014c d brk +20000270 B cached_type_info +08003b9c T cfree +20000150 b completed.1 +08000184 t deregister_tm_clones +20000288 B end +200002cc B errno +080001ec t frame_dummy +08003b9c T free +08002d50 t get_eit_entry +080014e6 T main +08003c98 T malloc +08003d30 T memalign +08003b70 T memcpy +08003b8c T memset +08003850 t next_unwind_byte +20000154 b object.0 +20000354 b on_exits +08003e6c T raise +080001a0 t register_tm_clones +20000278 B resources +080036a4 T restore_core_regs +08002de4 t restore_non_core_regs +08003e28 T sbrk +08002cc4 t search_EIT_table +08002cb0 t selfrel_offset31 +20000280 B start +08003b5c T strcmp +08002e4c t unwind_phase2 +08002e88 t unwind_phase2_forced +20000114 D value diff --git a/test_package/main.cpp b/test_package/main.cpp index 08853d0..5066c4b 100644 --- a/test_package/main.cpp +++ b/test_package/main.cpp @@ -20,7 +20,81 @@ std::uint64_t __extab_start = 0; std::uint64_t __extab_end = 0; +struct V +{ + int inner_detail_v = 0; +}; + +struct R1 +{ + int inner_detail_r1 = 0; +}; + +struct R2 +{ + int inner_detail_r2 = 0; +}; + +struct R3 +{ + int inner_detail_r3 = 0; +}; + +struct R4 +{ + int inner_detail_r4 = 0; +}; + +struct R5 +{ + int inner_detail_r5 = 0; +}; + +struct R6 +{ + int inner_detail_r6 = 0; +}; + +struct R + : public R1 + , public R2 + , public R3 + , public R5 + , public R6 +{ + int inner_detail_r = 0; +}; + +struct T : public R +{ + int inner_detail_t = 0; +}; + +struct S + : public V + , public T +{ + int detail_s = 0; +}; + +struct error : public S +{ + int data = 0; +}; + +void foo() +{ + throw error{}; +} + int main() { + [[maybe_unused]] static constexpr auto error_size = sizeof(error); hal::set_terminate(+[]() { puts("terminating application!"); }); + + try { + foo(); + } catch (error const&) { + // ... + } }