libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
PE.hh
Go to the documentation of this file.
1/*
2 * Copyright 2021 Assured Information Security, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#pragma once
17
18#include <introvirt/fwd.hh>
19#include <mspdb/PDB.hh>
20
21#include <vector>
22
23namespace introvirt {
24namespace windows {
25namespace pe {
26
30class PE {
31 public:
35 virtual const DOS_HEADER& dos_header() const = 0;
36
40 virtual const IMAGE_FILE_HEADER& file_header() const = 0;
41
45 virtual const IMAGE_OPTIONAL_HEADER& optional_header() const = 0;
46
50 virtual const IMAGE_EXPORT_DIRECTORY* export_directory() const = 0;
51
57 virtual const std::vector<std::unique_ptr<const IMAGE_SECTION_HEADER>>& sections() const = 0;
58
64 virtual const mspdb::PDB& pdb() const = 0;
65
69 virtual guest_ptr<void> ptr() const = 0;
70
71 static std::unique_ptr<PE> make_unique(const guest_ptr<void>& ptr);
72
73 virtual ~PE() = default;
74};
75
76} /* namespace pe */
77} /* namespace windows */
78} /* namespace introvirt */
Definition guest_ptr.hh:88
Parser for the Windows DOS header.
Definition DOS_HEADER.hh:29
Definition IMAGE_EXPORT_DIRECTORY.hh:42
Also known as the COFF_HEADER.
Definition IMAGE_FILE_HEADER.hh:34
Definition IMAGE_OPTIONAL_HEADER.hh:31
Parser for Windows Portable Executable (PE) headers.
Definition PE.hh:30
virtual const IMAGE_EXPORT_DIRECTORY * export_directory() const =0
virtual const IMAGE_OPTIONAL_HEADER & optional_header() const =0
virtual const DOS_HEADER & dos_header() const =0
virtual const std::vector< std::unique_ptr< const IMAGE_SECTION_HEADER > > & sections() const =0
Get the sections in this PE.
virtual ~PE()=default
virtual const mspdb::PDB & pdb() const =0
Get the debug symbols for this PE.
static std::unique_ptr< PE > make_unique(const guest_ptr< void > &ptr)
virtual guest_ptr< void > ptr() const =0
virtual const IMAGE_FILE_HEADER & file_header() const =0
Core IntroVirt classes.
Definition Cr0.hh:20