[PATCH] D63104: Add GSYM utility files along with unit tests.

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 10 15:59:49 PDT 2019


clayborg created this revision.
clayborg added reviewers: echristo, jakehehrlich, markmentovai, JDevlieghere, lemo, phosek.
Herald added a subscriber: mgorny.
Herald added a project: LLVM.

The full GSYM patch started with: https://reviews.llvm.org/D53379

In that patch we wanted to split up getting GSYM into the LLVM code base so we are not committing too much code at once.

This is a first in a series of patches where I only add the foundation classes along with complete unit tests. They provide the foundation for encoding and decoding a GSYM file.

File entries are defined in llvm::gsym::FileEntry. This class splits the file up into a directory and filename represented by uniqued string table offsets. This allows all files that are referred to in a GSYM file to be encoded as 1 based indexes into a global file table in the GSYM file.

Function information in stored in llvm::gsym::FunctionInfo. This object represents a contiguous address range that has a name and range with an optional line table and inline call stack information.

Line table entries are defined in llvm::gsym::LineEntry. They store only address, file and line information to keep the line tables simple and allows the information to be efficiently encoded in a subsequent patch.

Inline information is defined in llvm::gsym::InlineInfo. These structs store the name of the inline function, along with one or more address ranges, and the file and line that called this function. They also contain any child inline information.

There are also utility classes for address ranges in llvm::gsym::AddressRange, and string table support in llvm::gsym::StringTable which are simple classes.

The unit tests test all the APIs on these simple classes so they will be ready for the next patches where we will create GSYM files and parse GSYM files.


Repository:
  rL LLVM

https://reviews.llvm.org/D63104

Files:
  include/llvm/DebugInfo/GSYM/FileEntry.h
  include/llvm/DebugInfo/GSYM/FunctionInfo.h
  include/llvm/DebugInfo/GSYM/InlineInfo.h
  include/llvm/DebugInfo/GSYM/LineEntry.h
  include/llvm/DebugInfo/GSYM/Range.h
  include/llvm/DebugInfo/GSYM/StringTable.h
  lib/DebugInfo/CMakeLists.txt
  lib/DebugInfo/GSYM/CMakeLists.txt
  lib/DebugInfo/GSYM/FunctionInfo.cpp
  lib/DebugInfo/GSYM/InlineInfo.cpp
  lib/DebugInfo/GSYM/Range.cpp
  unittests/DebugInfo/CMakeLists.txt
  unittests/DebugInfo/GSYM/CMakeLists.txt
  unittests/DebugInfo/GSYM/GSYMTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63104.203920.patch
Type: text/x-patch
Size: 37258 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190610/81222768/attachment.bin>


More information about the llvm-commits mailing list