libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
SegmentDescriptorTable.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 "Segment.hh"
19
20#include <introvirt/core/fwd.hh>
22
23#include <cstdint>
24#include <memory>
25#include <vector>
26
27namespace introvirt {
28
29namespace x86 {
30
35 public:
42 Segment index(uint16_t idx) const;
43
51
57 size_t count() const;
58
65 SegmentDescriptorTable(const guest_ptr<void>& ptr, uint32_t limit);
66
67 private:
69 const uint32_t limit_;
70};
71
72} // namespace x86
73} // namespace introvirt
Definition guest_ptr.hh:88
Class to parse a segment descriptor table.
Definition SegmentDescriptorTable.hh:34
SegmentDescriptorTable(const guest_ptr< void > &ptr, uint32_t limit)
Construct a new Gdt object.
Segment index(uint16_t idx) const
Get an entry based on an index into the table.
Segment selector(SegmentSelector sel) const
Get an entry based on the selector.
size_t count() const
Get the number of entries.
Definition Segment.hh:26
Class to represent an x86 segment register.
Definition Segment.hh:66
Type-safe guest virtual address pointer and guest_ptr template.
Core IntroVirt classes.
Definition Cr0.hh:20