Stackdb
Stackdb is a stackable, multi-target and -level source debugger and memory forensics library.
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
include
object.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2014 The University of Utah
3
*
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License as
6
* published by the Free Software Foundation; either version 2 of
7
* the License, or (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
17
*/
18
19
#ifndef __OBJECT_H__
20
#define __OBJECT_H__
21
43
typedef
enum
{
48
OBJ_VALID
= 1 << 0,
52
OBJ_DIRTY
= 1 << 1,
56
OBJ_LIVE
= 1 << 2,
60
OBJ_NEW
= 1 << 3,
64
OBJ_MOD
= 1 << 4,
70
OBJ_DEL
= 1 << 5,
71
}
obj_flags_t
;
72
76
#define OBJVALID(obj) ((obj)->obj_flags & OBJ_VALID)
77
80
#define OBJDIRTY(obj) ((obj)->obj_flags & OBJ_DIRTY)
81
84
#define OBJLIVE(obj) ((obj)->obj_flags & OBJ_LIVE)
85
88
#define OBJNEW(obj) ((obj)->obj_flags & OBJ_NEW)
89
92
#define OBJMOD(obj) ((obj)->obj_flags & OBJ_MOD)
93
96
#define OBJDEL(obj) ((obj)->obj_flags & OBJ_DEL)
97
101
#define OBJSVALID(obj) \
102
((obj)->obj_flags |= OBJ_VALID)
103
106
#define OBJSINVALID(obj) \
107
(obj)->obj_flags &= ~OBJ_VALID
108
111
#define OBJSDIRTY(obj) \
112
((obj)->obj_flags |= OBJ_DIRTY)
113
116
#define OBJSCLEAN(obj) \
117
(obj)->obj_flags &= ~OBJ_DIRTY
118
121
#define OBJSLIVE(obj,type) \
122
(obj)->obj_flags |= OBJ_LIVE ; type ## _obj_flags_propagate(obj,OBJ_LIVE,0)
123
127
#define OBJSDEAD(obj,type) \
128
(obj)->obj_flags &= ~(OBJ_LIVE | OBJ_NEW | OBJ_MOD) ; type ## _obj_flags_propagate(obj,0,OBJ_DEL)
129
133
#define OBJSNEW(obj) ((obj)->obj_flags |= (OBJ_NEW | OBJ_LIVE))
134
137
#define OBJSMOD(obj) ((obj)->obj_flags |= (OBJ_MOD | OBJ_LIVE))
138
141
#define OBJSDEL(obj) ((obj)->obj_flags |= OBJ_DEL)
142
146
#define OBJSCLEAR(obj) ((obj)->obj_flags &= OBJ_LIVE)
147
148
#endif
/* __OBJECT_H__ */
OBJ_MOD
Definition:
object.h:64
OBJ_DEL
Definition:
object.h:70
OBJ_NEW
Definition:
object.h:60
OBJ_LIVE
Definition:
object.h:56
OBJ_VALID
Definition:
object.h:48
obj_flags_t
obj_flags_t
Definition:
object.h:43
OBJ_DIRTY
Definition:
object.h:52
Generated on Thu Jul 27 2017 20:47:31 for Stackdb by
1.8.8