#ifndef VITA_COREDUMP_PARSER_H #define VITA_COREDUMP_PARSER_H #include #include #include #include #include #include #include //#include "elfio/elfio.hpp" #include "info_corefileinfo.hpp" #include "info_hwinfo.hpp" #include "info_buildverinfo.hpp" #include "info_systeminfo.hpp" #include "info_ttyinfo.hpp" #include "info_screenshotinfo.hpp" #include "info_sysdeviceinfo.hpp" #include "info_appinfo.hpp" #include "info_processinfo.hpp" #include "info_deviceinfo.hpp" #include "info_extnlprocessinfo.hpp" #include "info_fileinfo.hpp" #include "info_applistinfo.hpp" #include "info_stackinfo.hpp" #include "info_moduleinfo.hpp" #include "info_memblockinfo.hpp" #include "info_budgetinfo.hpp" #include "info_libraryinfo.hpp" #include "info_eventloginfo.hpp" #include "info_semaphoreinfo.hpp" #include "info_eventflaginfo.hpp" #include "info_mutexinfo.hpp" #include "info_lwmutexinfo.hpp" #include "info_msgpipeinfo.hpp" #include "info_callbackinfo.hpp" #include "info_timerinfo.hpp" #include "info_rwlockinfo.hpp" #include "info_condvarinfo.hpp" #include "info_lwcondvarinfo.hpp" #include "info_simpleeventinfo.hpp" #include "info_ultinfo.hpp" #include "info_ultsemaphoreinfo.hpp" #include "info_ultcondvarinfo.hpp" #include "info_ultmutexinfo.hpp" #include "info_ultrwlockinfo.hpp" #include "info_ultwqpoolinfo.hpp" #include "info_ultqpoolinfo.hpp" #include "info_ultqueueinfo.hpp" #include "info_fiberinfo.hpp" #include "info_threadinfo.hpp" #include "info_threadreginfo.hpp" #include "info_gpuinfo.hpp" namespace elf { enum class note; }; namespace ELFIO { class elfio; } namespace vita { namespace coredump { class parser { public: parser(std::string& filename); parser(const char* filename); ~parser(); bool parse(); std::unique_ptr getCorefileInfo(); std::unique_ptr getHwInfo(); std::unique_ptr getBuildVerInfo(); std::unique_ptr getSystemInfo(); std::unique_ptr getTTYInfo(); std::unique_ptr getTTYInfo2(); std::unique_ptr getScreenshotInfo(); std::unique_ptr getSysDeviceInfo(); std::unique_ptr getAppInfo(); std::unique_ptr getProcessInfo(); std::unique_ptr getDeviceInfo(); std::unique_ptr getExtnlProcessInfo(); std::unique_ptr getFileInfo(); std::unique_ptr getAppListInfo(); std::unique_ptr getStackInfo(); std::unique_ptr getModuleInfo(); std::unique_ptr getMemblockInfo(); std::unique_ptr getBudgetInfo(); std::unique_ptr getLibraryInfo(); std::unique_ptr getEventLogInfo(); std::unique_ptr getSemaphoreInfo(); std::unique_ptr getEventflagInfo(); std::unique_ptr getMutexInfo(); std::unique_ptr getLwMutexInfo(); std::unique_ptr getMsgpipeInfo(); std::unique_ptr getCallbackInfo(); std::unique_ptr getTimerInfo(); std::unique_ptr getRwlockInfo(); std::unique_ptr getCondvarInfo(); std::unique_ptr getLwCondvarInfo(); std::unique_ptr getSimpleEventInfo(); std::unique_ptr getUltInfo(); std::unique_ptr getUltSemaphoreInfo(); std::unique_ptr getUltCondvarInfo(); std::unique_ptr getUltMutexInfo(); std::unique_ptr getUltRwlockInfo(); std::unique_ptr getUltWqpoolInfo(); std::unique_ptr getUltQpoolInfo(); std::unique_ptr getUltQueueInfo(); std::unique_ptr getFiberInfo(); std::unique_ptr getThreadInfo(); std::unique_ptr getThreadRegInfo(); std::unique_ptr getGpuInfo(); private: ::ELFIO::elfio *_reader; std::string _filename; std::unordered_map> _notes; std::pair& _getNoteIdx(elf::note type); std::pair _getNoteData(elf::note note_type); }; // parser }; // coredump }; // vita #endif