blob: 9e15ebc411aafd27553a5f6b397276b6b90e7de5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
// Copyright 2011-2022, Molecular Matters GmbH <[email protected]>
// See LICENSE.txt for licensing details (2-clause BSD License: https://opensource.org/licenses/BSD-2-Clause)
#pragma once
#include "Foundation/PDB_Macros.h"
#include "PDB_Types.h"
#include "PDB_CoalescedMSFStream.h"
#include "PDB_NamesStream.h"
namespace PDB
{
class RawFile;
// PDB Info Stream
// https://llvm.org/docs/PDB/PdbStream.html
class PDB_NO_DISCARD InfoStream
{
public:
InfoStream(void) PDB_NO_EXCEPT;
explicit InfoStream(const RawFile& file) PDB_NO_EXCEPT;
PDB_DEFAULT_MOVE(InfoStream);
// Returns the header of the stream.
PDB_NO_DISCARD inline const Header* GetHeader(void) const PDB_NO_EXCEPT
{
return m_header;
}
// Returns whether the module has a names stream.
PDB_NO_DISCARD inline bool HasNamesStream(void) const PDB_NO_EXCEPT
{
return (m_namesStreamIndex != 0u);
}
// Returns whether the PDB file was linked using /DEBUG:FASTLINK.
PDB_NO_DISCARD inline bool UsesDebugFastLink(void) const PDB_NO_EXCEPT
{
return m_usesDebugFastlink;
}
// Returns whether the PDB file has an IPI stream.
PDB_NO_DISCARD inline bool HasIPIStream(void) const PDB_NO_EXCEPT
{
return m_hasIPIStream;
}
// Create names stream
PDB_NO_DISCARD NamesStream CreateNamesStream(const RawFile& file) const PDB_NO_EXCEPT;
private:
CoalescedMSFStream m_stream;
const Header* m_header;
uint32_t m_namesStreamIndex;
bool m_usesDebugFastlink;
bool m_hasIPIStream;
PDB_DISABLE_COPY(InfoStream);
};
}
|