1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/unittests/DebugInfo
Greg Clayton d12f0adda0 Add FileWriter to GSYM and encode/decode functions to AddressRange and AddressRanges
The full GSYM patch started with: https://reviews.llvm.org/D53379

This patch add the ability to encode data using the new llvm::gsym::FileWriter class.

FileWriter is a simplified binary data writer class that doesn't require targets, target definitions, architectures, or require any other optional compile time libraries to be enabled via the build process. This class needs the ability to seek to different spots in the binary data that it produces to fix up offsets and sizes in GSYM data. It currently uses std::ostream over llvm::raw_ostream because llvm::raw_ostream doesn't support seeking which is required when encoding and decoding GSYM data.

AddressRange objects are encoded and decoded to be relative to a base address. This will be the FunctionInfo's start address if the AddressRange is directly contained in a FunctionInfo, or a base address of the containing parent AddressRange or AddressRanges. This allows address ranges to be efficiently encoded using ULEB128 encodings as we encode the offset and size of each range instead of full addresses. This also makes encoded addresses easy to relocate as we just need to relocate one base address.

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

llvm-svn: 369587
2019-08-21 21:48:11 +00:00
..
CodeView [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
DWARF [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
GSYM Add FileWriter to GSYM and encode/decode functions to AddressRange and AddressRanges 2019-08-21 21:48:11 +00:00
MSF Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDB [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
CMakeLists.txt Add GSYM utility files along with unit tests. 2019-06-26 14:09:09 +00:00