Otawa  0.10
gliss.h
Go to the documentation of this file.
1 /*
2  * Info interface
3  *
4  * This file is part of OTAWA
5  * Copyright (c) 2012, IRIT UPS <casse@irit.fr>
6  *
7  * OTAWA is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * OTAWA is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with OTAWA; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 #ifndef OTAWA_LOADER_GLISS_H
22 #define OTAWA_LOADER_GLISS_H
23 
24 #include <otawa/prop/Identifier.h>
25 #include <otawa/proc/Feature.h>
26 
27 namespace otawa {
28 
29 class Inst;
30 
31 namespace gliss {
32 
33 class Info {
34 public:
35  virtual bool check(t::uint32 checksum) = 0;
36  virtual void *decode(Inst *inst) = 0;
37  virtual void free(void *desc) = 0;
38  template <class T> inline void decode(Inst *inst, T *&desc)
39  { desc = static_cast<T *>(decode(inst)); }
40 protected:
41  virtual ~Info(void);
42 };
43 
46 
47 } } // otawa::gliss
48 
49 #endif // OTAWA_LOADER_GLISS_H
50 
struct otawa::sem::inst inst
Identifier< Info * > INFO
This identifier allows to get the gliss::Info object from loader supporting it from a process generat...
Feature< NoProcessor > INFO_FEATURE
This feature that the current process has been built by a loader based on the GLISS tool...
virtual void free(void *desc)=0
void decode(Inst *inst, T *&desc)
void Info::free(void *desc); Free a GLISS instruction descriptor previously allocated by Info::decode...
Definition: gliss.h:38
virtual ~Info(void)
Definition: Loader.cpp:174
This class represents identifier with a typed associated value.
Definition: Identifier.h:51
virtual bool check(t::uint32 checksum)=0
As the validity of the data used in Gliss is strongly coupled with the data of an analysis using this...
This class represents assembly instruction of a piece of code.
Definition: Inst.h:62
uint32_t uint32
A feature is a set of facilities, usually provided using properties, available on a framework...
Definition: Feature.h:46
virtual void * decode(Inst *inst)=0
Decode an instruction and return its descriptor.
This class provides access to the stay-behind GLISS data structures and code provided by the GLISS v2...
Definition: gliss.h:33