bfunwind
include
registers.h
Go to the documentation of this file.
1
//
2
// Bareflank Unwind Library
3
//
4
// Copyright (C) 2015 Assured Information Security, Inc.
5
// Author: Rian Quinn <quinnr@ainfosec.com>
6
// Author: Brendan Kerrigan <kerriganb@ainfosec.com>
7
//
8
// This library is free software; you can redistribute it and/or
9
// modify it under the terms of the GNU Lesser General Public
10
// License as published by the Free Software Foundation; either
11
// version 2.1 of the License, or (at your option) any later version.
12
//
13
// This library is distributed in the hope that it will be useful,
14
// but WITHOUT ANY WARRANTY; without even the implied warranty of
15
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
// Lesser General Public License for more details.
17
//
18
// You should have received a copy of the GNU Lesser General Public
19
// License along with this library; if not, write to the Free Software
20
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
22
#ifndef REGISTERS_H
23
#define REGISTERS_H
24
25
#include <stdint.h>
26
27
#define MAX_NUM_REGISTERS 32
28
43
class
register_state
44
{
45
public
:
46
49
register_state
() =
default
;
50
53
virtual
~register_state
() =
default
;
54
57
register_state
(
register_state
&&)
noexcept
=
default
;
58
61
register_state
(
const
register_state
&) =
default
;
62
65
register_state
&
operator=
(
register_state
&&)
noexcept
=
default
;
66
69
register_state
&
operator=
(
const
register_state
&) =
default
;
70
75
virtual
uint64_t
get_ip
()
const
76
{
return
0; }
77
86
virtual
register_state
&
set_ip
(uint64_t value)
87
{ (void) value;
return
*
this
; }
88
94
virtual
uint64_t
get
(uint64_t
index
)
const
95
{ (void)
index
;
return
0; }
96
106
virtual
register_state
&
set
(uint64_t
index
, uint64_t value)
107
{ (void) index; (void) value;
return
*
this
; }
108
113
virtual
void
commit
()
114
{ }
115
123
virtual
void
commit
(uint64_t cfa)
124
{ (void) cfa; }
125
130
virtual
void
resume
()
131
{ }
132
138
virtual
uint64_t
max_num_registers
()
const
139
{
return
0; }
140
146
virtual
const
char
*
name
(uint64_t index)
const
147
{ (void) index;
return
"forgot to overload name"
; }
148
154
virtual
void
dump
()
const
155
{ }
156
};
157
158
#endif
register_state::~register_state
virtual ~register_state()=default
register_state::resume
virtual void resume()
Definition:
registers.h:130
register_state::operator=
register_state & operator=(register_state &&) noexcept=default
register_state
Definition:
registers.h:43
register_state::set_ip
virtual register_state & set_ip(uint64_t value)
Definition:
registers.h:86
register_state::register_state
register_state()=default
register_state::dump
virtual void dump() const
Definition:
registers.h:154
register_state::commit
virtual void commit(uint64_t cfa)
Definition:
registers.h:123
register_state::max_num_registers
virtual uint64_t max_num_registers() const
Definition:
registers.h:138
noexcept
void uint64_t uint64_t uint64_t *rdx noexcept
Definition:
cpuid_x64_mock.cpp:58
x64::page_table::index
auto index(const T virt, const F from)
Definition:
page_table_entry_x64.h:40
register_state::commit
virtual void commit()
Definition:
registers.h:113
register_state::get_ip
virtual uint64_t get_ip() const
Definition:
registers.h:75
register_state::name
virtual const char * name(uint64_t index) const
Definition:
registers.h:146
Generated on Fri Apr 28 2017 22:11:38 by
1.8.14