示例#1
0
Error DebugCrossModuleExportsSubsectionRef::initialize(
    BinaryStreamReader Reader) {
  if (Reader.bytesRemaining() % sizeof(CrossModuleExport) != 0)
    return make_error<CodeViewError>(
        cv_error_code::corrupt_record,
        "Cross Scope Exports section is an invalid size!");

  uint32_t Size = Reader.bytesRemaining() / sizeof(CrossModuleExport);
  return Reader.readArray(References, Size);
}
示例#2
0
static Error loadSectionContribs(FixedStreamArray<ContribType> &Output,
                                 BinaryStreamReader &Reader) {
  if (Reader.bytesRemaining() % sizeof(ContribType) != 0)
    return make_error<RawError>(
        raw_error_code::corrupt_file,
        "Invalid number of bytes of section contributions");

  uint32_t Count = Reader.bytesRemaining() / sizeof(ContribType);
  if (auto EC = Reader.readArray(Output, Count))
    return EC;
  return Error::success();
}
Error DebugSymbolRVASubsectionRef::initialize(BinaryStreamReader &Reader) {
  return Reader.readArray(RVAs, Reader.bytesRemaining() / sizeof(uint32_t));
}