1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/include/llvm/DebugInfo/PDB/IPDBSectionContrib.h
Aaron Smith 5bbe3c713d [DIA] Add IPDBSectionContrib interfaces and DIA implementation
To resolve symbol context at a particular address, we need to
determine the compiland for the address. We are able to determine
the parent compiland of PDBSymbolFunc, PDBSymbolTypeUDT,
PDBSymbolTypeEnum symbols indirectly through line information. 
However no such information is availabile for PDBSymbolData, 
i.e. variables.

The Section Contribution table from PDBs has information about
each compiland's contribution to sections by address. For example,
a piece of a contribution looks like,

  VA         RelativeVA  Sect No.  Offset    Length    Compiland
  14000087B0 000087B0    0001      000077B0  000000BB  exe_main.obj

So given an address, it's possible to determine its compiland with
this information.

llvm-svn: 328178
2018-03-22 04:08:15 +00:00

51 lines
1.7 KiB
C++

//==- IPDBSectionContrib.h - Interfaces for PDB SectionContribs --*- C++ -*-==//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_DEBUGINFO_PDB_IPDBSECTIONCONTRIB_H
#define LLVM_DEBUGINFO_PDB_IPDBSECTIONCONTRIB_H
#include "PDBTypes.h"
namespace llvm {
namespace pdb {
/// IPDBSectionContrib defines an interface used to represent section
/// contributions whose information are stored in the PDB.
class IPDBSectionContrib {
public:
virtual ~IPDBSectionContrib();
virtual std::unique_ptr<PDBSymbolCompiland> getCompiland() const = 0;
virtual uint32_t getAddressSection() const = 0;
virtual uint32_t getAddressOffset() const = 0;
virtual uint32_t getRelativeVirtualAddress() const = 0;
virtual uint64_t getVirtualAddress() const = 0;
virtual uint32_t getLength() const = 0;
virtual bool isNotPaged() const = 0;
virtual bool hasCode() const = 0;
virtual bool hasCode16Bit() const = 0;
virtual bool hasInitializedData() const = 0;
virtual bool hasUninitializedData() const = 0;
virtual bool isRemoved() const = 0;
virtual bool hasComdat() const = 0;
virtual bool isDiscardable() const = 0;
virtual bool isNotCached() const = 0;
virtual bool isShared() const = 0;
virtual bool isExecutable() const = 0;
virtual bool isReadable() const = 0;
virtual bool isWritable() const = 0;
virtual uint32_t getDataCrc32() const = 0;
virtual uint32_t getRelocationsCrc32() const = 0;
virtual uint32_t getCompilandId() const = 0;
};
}
}
#endif // LLVM_DEBUGINFO_PDB_IPDBSECTIONCONTRIB_H