1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/include/llvm/DebugInfo/PDB/PDBSymbolExe.h
Zachary Turner 8a8f84f312 [llvm-pdbdump] More advanced class definition dumping.
Previously the dumping of class definitions was very primitive,
and it made it hard to do more than the most trivial of output
formats when dumping.  As such, we would only dump one line for
each field, and then dump non-layout items like nested types
and enums.

With this patch, we do a complete analysis of the object
hierarchy including aggregate types, bases, virtual bases,
vftable analysis, etc.  The only immediately visible effects
of this are that a) we can now dump a line for the vfptr where
before we would treat that as padding, and b) we now don't
treat virtual bases that come at the end of a class as padding
since we have a more detailed analysis of the class's storage
usage.

In subsequent patches, we should be able to use this analysis
to display a complete graphical view of a class's layout including
recursing arbitrarily deep into an object's base class / aggregate
member hierarchy.

llvm-svn: 300133
2017-04-12 23:18:21 +00:00

50 lines
1.3 KiB
C++

//===- PDBSymbolExe.h - Accessors for querying executables in a PDB ----*-===//
//
// 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_PDBSYMBOLEXE_H
#define LLVM_DEBUGINFO_PDB_PDBSYMBOLEXE_H
#include "PDBSymbol.h"
#include "PDBTypes.h"
namespace llvm {
class raw_ostream;
namespace pdb {
class PDBSymbolExe : public PDBSymbol {
public:
PDBSymbolExe(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> ExeSymbol);
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Exe)
void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getAge)
FORWARD_SYMBOL_METHOD(getGuid)
FORWARD_SYMBOL_METHOD(hasCTypes)
FORWARD_SYMBOL_METHOD(hasPrivateSymbols)
FORWARD_SYMBOL_METHOD(getMachineType)
FORWARD_SYMBOL_METHOD(getName)
FORWARD_SYMBOL_METHOD(getSignature)
FORWARD_SYMBOL_METHOD(getSymbolsFileName)
uint32_t getPointerByteSize() const;
private:
void dumpChildren(raw_ostream &OS, StringRef Label, PDB_SymType ChildType,
int Indent) const;
};
} // namespace llvm
}
#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLEXE_H