#ifndef SYMBOLS_HPP #define SYMBOLS_HPP #include #include #include #include #include #include namespace cpptrace { namespace detail { using collated_vec = std::vector< std::pair, std::reference_wrapper> >; struct frame_with_inlines { stacktrace_frame frame; std::vector inlines; }; using collated_vec_with_inlines = std::vector< std::pair, std::reference_wrapper> >; // These two helpers create a map from a target object to a vector of frames to resolve std::unordered_map collate_frames( const std::vector& frames, std::vector& trace ); std::unordered_map collate_frames( const std::vector& frames, std::vector& trace ); #ifdef CPPTRACE_GET_SYMBOLS_WITH_LIBBACKTRACE namespace libbacktrace { std::vector resolve_frames(const std::vector& frames); } #endif #ifdef CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF namespace libdwarf { std::vector resolve_frames(const std::vector& frames); } #endif #ifdef CPPTRACE_GET_SYMBOLS_WITH_LIBDL namespace libdl { std::vector resolve_frames(const std::vector& frames); } #endif #ifdef CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE namespace addr2line { std::vector resolve_frames(const std::vector& frames); } #endif #ifdef CPPTRACE_GET_SYMBOLS_WITH_DBGHELP namespace dbghelp { std::vector resolve_frames(const std::vector& frames); } #endif #ifdef CPPTRACE_GET_SYMBOLS_WITH_NOTHING namespace nothing { std::vector resolve_frames(const std::vector& frames); std::vector resolve_frames(const std::vector& frames); } #endif std::vector resolve_frames(const std::vector& frames); std::vector resolve_frames(const std::vector& frames); } } #endif