Add GsymCreator and GsymReader.
authorGreg Clayton <clayborg@gmail.com>
Thu, 10 Oct 2019 17:10:11 +0000 (17:10 +0000)
committerGreg Clayton <clayborg@gmail.com>
Thu, 10 Oct 2019 17:10:11 +0000 (17:10 +0000)
commit4b6c9de868cd8135717377f56cb1c27d1ebcffb5
treeb7c27111e1d0dd2b61100530c88c2b2325e7038a
parent644abcf09d6be542983ff127041b6ae9235ada46
Add GsymCreator and GsymReader.

This patch adds the ability to create GSYM files with GsymCreator, and read them with GsymReader. Full testing has been added for both new classes.

This patch differs from the original patch https://reviews.llvm.org/D53379 in that is uses a StringTableBuilder class from llvm instead of a custom version. Support for big and little endian files has been added. If the endianness matches the current host, we use efficient extraction for the header, address table and address info offset tables.

Differential Revision: https://reviews.llvm.org/D68744

llvm-svn: 374381
llvm/include/llvm/DebugInfo/GSYM/FileWriter.h
llvm/include/llvm/DebugInfo/GSYM/GsymCreator.h [new file with mode: 0644]
llvm/include/llvm/DebugInfo/GSYM/GsymReader.h [new file with mode: 0644]
llvm/include/llvm/DebugInfo/GSYM/Header.h
llvm/lib/DebugInfo/GSYM/CMakeLists.txt
llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp
llvm/lib/DebugInfo/GSYM/GsymCreator.cpp [new file with mode: 0644]
llvm/lib/DebugInfo/GSYM/GsymReader.cpp [new file with mode: 0644]
llvm/lib/DebugInfo/GSYM/Header.cpp
llvm/unittests/DebugInfo/GSYM/CMakeLists.txt
llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp