[PATCH] D14961: LLVM CodeView library
Dave Bartolomeo via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 24 10:52:46 PST 2015
DaveBartolomeo created this revision.
DaveBartolomeo added a reviewer: majnemer.
DaveBartolomeo added a subscriber: llvm-commits.
This diff is the initial implementation of the LLVM CodeView library. There is much more work to be done, namely a CodeView dumper and tests. This patch should help others make progress on the LLVM->CodeView debug info emission while I continue with the implementation of the dumper and tests.
This library implements support for emitting debug info in the CodeView format. This phase of the implementation only includes support for CodeView type records. Clients that need to emit type records will use a class derived from TypeTableBuilder. TypeTableBuilder provides member functions for writing each kind of type record; each of these functions eventually calls the writeRecord virtual function to emit the actual bits of the record. Derived classes override writeRecord to implement the folding of duplicate records and the actual emission to the appropriate destination. LLVMCodeView provides MemoryTypeTableBuilder, which creates the table in memory. In the future, other classes derived from TypeTableBuilder will write to other destinations, such as the type stream in a PDB.
The rest of the types in LLVMCodeView define the actual CodeView type records and all of the supporting enums and other types used in the type records. The TypeIndex class is of particular interest, because it is used by clients as a handle to a type in the type table.
The library provides a relatively low-level interface based on the actual on-disk format of CodeView. For example, type records refer to other type records by TypeIndex, rather than by an actual pointer to the referent record. This allows clients to emit type records one at a time, rather than having to keep the entire transitive closure of type records in memory until everything has been emitted. At some point, having a higher-level interface layered on top of this one may be useful for debuggers and other tools that want a more holistic view of the debug info. The lower-level interface should be sufficient for compilers and linkers to do the debug info manipulation that they need to do efficiently.
http://reviews.llvm.org/D14961
Files:
include/llvm/CodeView/CodeView.h
include/llvm/CodeView/CodeViewOStream.h
include/llvm/CodeView/FieldListRecordBuilder.h
include/llvm/CodeView/FunctionId.h
include/llvm/CodeView/Line.h
include/llvm/CodeView/ListRecordBuilder.h
include/llvm/CodeView/MemoryTypeTableBuilder.h
include/llvm/CodeView/MethodListRecordBuilder.h
include/llvm/CodeView/TypeIndex.h
include/llvm/CodeView/TypeRecord.h
include/llvm/CodeView/TypeRecordBuilder.h
include/llvm/CodeView/TypeSymbolEmitter.h
include/llvm/CodeView/TypeTableBuilder.h
lib/CMakeLists.txt
lib/CodeView/CMakeLists.txt
lib/CodeView/CodeViewOStream.cpp
lib/CodeView/FieldListRecordBuilder.cpp
lib/CodeView/FunctionId.cpp
lib/CodeView/LLVMBuild.txt
lib/CodeView/Line.cpp
lib/CodeView/ListRecordBuilder.cpp
lib/CodeView/MemoryTypeTableBuilder.cpp
lib/CodeView/MethodListRecordBuilder.cpp
lib/CodeView/TypeIndex.cpp
lib/CodeView/TypeRecordBuilder.cpp
lib/CodeView/TypeTableBuilder.cpp
lib/LLVMBuild.txt
lib/Makefile
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14961.41063.patch
Type: text/x-patch
Size: 67825 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151124/b60919ae/attachment-0001.bin>
More information about the llvm-commits
mailing list