[PATCH] D20384: Refactor 1 symbol record

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Wed May 18 14:13:57 PDT 2016


zturner created this revision.
zturner added a reviewer: rnk.
zturner added a subscriber: llvm-commits.

There are many more, but this just touches 1 record so we can see what the code is going to look like.

There is one potential problem with this patch which exposes a limitation in the underlying design we've chosen for the symbol and type records.  dumping symbol records relies on calling a function `printRelocatedField` which assumes that you have a pointer into the section data so that it can compute the section offset.  This isn't true anymore once we're copying bytes out of the input stream and into an in memory structure, so it makes it so we can't use `printRelocatedField`.  However, this particular symbol (`ProcSym`) does have another field which is the section offset.  So maybe we can use that.  But I haven't checked whether it's the same as what we think it is yet, nor have I confirmed that this will work for the general case of all other types of symbols.

http://reviews.llvm.org/D20384

Files:
  include/llvm/DebugInfo/CodeView/SymbolRecord.h
  tools/llvm-readobj/COFFDumper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20384.57677.patch
Type: text/x-patch
Size: 5613 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160518/1e0df444/attachment.bin>


More information about the llvm-commits mailing list