Ghidra Decompiler Analysis Engine
architecture.hh
Go to the documentation of this file.
1 /* ###
2  * IP: GHIDRA
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  */
18 #ifndef __CPUI_ARCHITECTURE__
19 #define __CPUI_ARCHITECTURE__
20 
21 #include "capability.hh"
22 #include "varmap.hh"
23 #include "action.hh"
24 #include "database.hh"
25 #include "pcodeinject.hh"
26 #include "fspec.hh"
27 #include "translate.hh"
28 #include "loadimage.hh"
29 #include "globalcontext.hh"
30 #include "comment.hh"
31 #include "stringmanage.hh"
32 #include "userop.hh"
33 #include "options.hh"
34 #include "transform.hh"
35 #include "prefersplit.hh"
36 
37 #ifdef CPUI_STATISTICS
38 class Statistics {
43  uintb numfunc;
44  uintb numvar;
45  uintb coversum;
46  uintb coversumsq;
47  uintb lastcastcount;
48  uintb castcount;
49  uintb castcountsq;
50  //void process_cover(const Funcdata &data);
51  void process_cast(const Funcdata &data);
52 public:
53  Statistics(void);
54  ~Statistics(void);
55  void countCast(void) { castcount += 1; }
56  void process(const Funcdata &fd);
57  void printResults(ostream &s);
58 };
59 
60 #endif
61 
62 class Architecture;
63 
72  static const uint4 majorversion;
73  static const uint4 minorversion;
74  static vector<ArchitectureCapability *> thelist;
75 protected:
76  string name;
77 public:
78  const string &getName(void) const { return name; }
79  virtual void initialize(void);
80 
89  virtual Architecture *buildArchitecture(const string &filename,const string &target,ostream *estream)=0;
90 
95  virtual bool isFileMatch(const string &filename) const=0;
96 
103  virtual bool isXmlMatch(Document *doc) const=0;
104 
105  static ArchitectureCapability *findCapability(const string &filename);
107  static ArchitectureCapability *getCapability(const string &name);
108  static void sortCapabilities(void);
109  static uint4 getMajorVersion(void) { return majorversion; }
110  static uint4 getMinorVersion(void) { return minorversion; }
111 };
112 
120 public:
121  string archid;
122 
123  // Configuration data
133  vector<AddrSpace *> inferPtrSpaces;
135  uint4 flowoptions;
138  vector<Rule *> extra_pool_rules;
139 
142  map<string,ProtoModel *> protoModels;
156  vector<PrintLanguage *> printlist;
158  vector<TypeOp *> inst;
160  vector<PreferSplitRecord> splitrecords;
161  vector<LanedRegister> lanerecords;
164 #ifdef CPUI_STATISTICS
165  Statistics *stats;
166 #endif
167 #ifdef OPACTION_DEBUG
168  ostream *debugstream;
169 #endif
170  Architecture(void);
171  void init(DocumentStorage &store);
172  void resetDefaultsInternal(void);
173  void resetDefaults(void);
174  ProtoModel *getModel(const string &nm) const;
175  bool hasModel(const string &nm) const;
176  bool highPtrPossible(const Address &loc,int4 size) const;
177  AddrSpace *getSpaceBySpacebase(const Address &loc,int4 size) const;
178  const LanedRegister *getLanedRegister(const Address &loc,int4 size) const;
179  int4 getMinimumLanedRegisterSize(void) const;
180  void setDefaultModel(const string &nm);
181  void clearAnalysis(Funcdata *fd);
182  void readLoaderSymbols(const string &delim);
183  void collectBehaviors(vector<OpBehavior *> &behave) const;
184  SegmentOp *getSegmentOp(AddrSpace *spc) const;
185  void setPrototype(const PrototypePieces &pieces);
186  void setPrintLanguage(const string &nm);
187  void globalify(void);
188  void restoreFlowOverride(const Element *el);
189  virtual ~Architecture(void);
190 
191  virtual string getDescription(void) const { return archid; }
192 
197  virtual void printMessage(const string &message) const=0;
198  virtual void saveXml(ostream &s) const;
199  virtual void restoreXml(DocumentStorage &store);
200  virtual void nameFunction(const Address &addr,string &name) const;
201 #ifdef OPACTION_DEBUG
202  void setDebugStream(ostream *s) { debugstream = s; }
203  void printDebug(const string &message) const { *debugstream << message << endl; }
204 #endif
205 protected:
206  void addSpacebase(AddrSpace *basespace,const string &nm,const VarnodeData &ptrdata,
207  int4 truncSize,bool isreversejustified,bool stackGrowth);
208  void addNoHighPtr(const Range &rng);
209 
210  // Factory routines for building this architecture
211  virtual Scope *buildDatabase(DocumentStorage &store);
212 
219  virtual Translate *buildTranslator(DocumentStorage &store)=0;
220 
224  virtual void buildLoader(DocumentStorage &store)=0;
225 
231 
232  virtual void buildTypegrp(DocumentStorage &store);
233  virtual void buildCommentDB(DocumentStorage &store);
234  virtual void buildStringManager(DocumentStorage &store);
235  virtual void buildConstantPool(DocumentStorage &store);
236  virtual void buildInstructions(DocumentStorage &store);
237  virtual void buildAction(DocumentStorage &store);
238  virtual void buildContext(DocumentStorage &store);
239 
244  virtual void buildSpecFile(DocumentStorage &store)=0;
245 
251  virtual void modifySpaces(Translate *trans)=0;
252 
253  virtual void postSpecFile(void);
254 
255  virtual void resolveArchitecture(void)=0;
256 
257  void restoreFromSpec(DocumentStorage &store);
258  void fillinReadOnlyFromLoader(void);
259  void initializeSegments();
260  void cacheAddrSpaceProperties(void);
261 
263  void parseCompilerConfig(DocumentStorage &store);
264  void parseExtraRules(DocumentStorage &store);
265 
266  void parseDynamicRule(const Element *el);
267  ProtoModel *parseProto(const Element *el);
268  void parseProtoEval(const Element *el);
269  void parseDefaultProto(const Element *el);
270  void parseGlobal(const Element *el);
271  void addOtherSpace(void);
272  void parseReadOnly(const Element *el);
273  void parseVolatile(const Element *el);
274  void parseReturnAddress(const Element *el);
275  void parseIncidentalCopy(const Element *el);
276  void parseLaneSizes(const Element *el);
277  void parseStackPointer(const Element *el);
278  void parseDeadcodeDelay(const Element *el);
279  void parseInferPtrBounds(const Element *el);
280  void parseFuncPtrAlign(const Element *el);
281  void parseSpacebase(const Element *el);
282  void parseNoHighPtr(const Element *el);
283  void parsePreferSplit(const Element *el);
284  void parseAggressiveTrim(const Element *el);
285 };
286 
293  Architecture *glb;
294  AddrSpace *spc;
295  SegmentOp *segop;
296 public:
301  SegmentedResolver(Architecture *g,AddrSpace *sp,SegmentOp *sop) { glb=g; spc=sp; segop=sop; }
302  virtual Address resolve(uintb val,int4 sz,const Address &point,uintb &fullEncoding);
303 };
304 
313 inline bool Architecture::highPtrPossible(const Address &loc,int4 size) const {
314  if (loc.getSpace()->getType() == IPTR_INTERNAL) return false;
315  return !nohighptr.inRange(loc,size);
316 }
317 
318 #endif
Architecture::infer_pointers
bool infer_pointers
True if we should infer pointers from constants that are likely addresses.
Definition: architecture.hh:131
Architecture::trim_recurse_max
int4 trim_recurse_max
How many levels to let parameter trims recurse.
Definition: architecture.hh:124
comment.hh
A database interface for high-level language comments.
transform.hh
Classes for building large scale transforms of function data-flow.
Architecture::resetDefaults
void resetDefaults(void)
Reset defaults values for options owned by this.
Definition: architecture.cc:1325
Architecture::buildDatabase
virtual Scope * buildDatabase(DocumentStorage &store)
Build the database and global scope for this executable.
Definition: architecture.cc:550
Architecture::getModel
ProtoModel * getModel(const string &nm) const
Get a specific PrototypeModel.
Definition: architecture.cc:184
PrintLanguage
The base class API for emitting a high-level language.
Definition: printlanguage.hh:134
Architecture::buildPcodeInjectLibrary
virtual PcodeInjectLibrary * buildPcodeInjectLibrary(void)=0
Build the injection library.
Architecture::parseDefaultProto
void parseDefaultProto(const Element *el)
Apply default prototype model configuration.
Definition: architecture.cc:801
Architecture::getLanedRegister
const LanedRegister * getLanedRegister(const Address &loc, int4 size) const
Get LanedRegister associated with storage.
Definition: architecture.cc:241
AddrSpace
A region where processor data is stored.
Definition: space.hh:73
Architecture::postSpecFile
virtual void postSpecFile(void)
Let components initialize after Translate is built.
Definition: architecture.cc:632
Architecture::evalfp_current
ProtoModel * evalfp_current
Function proto to use when evaluating current function.
Definition: architecture.hh:145
ArchitectureCapability::getCapability
static ArchitectureCapability * getCapability(const string &name)
Get a capability by name.
Definition: architecture.cc:70
Architecture::parseDeadcodeDelay
void parseDeadcodeDelay(const Element *el)
Apply dead-code delay configuration.
Definition: architecture.cc:986
Architecture::resolveArchitecture
virtual void resolveArchitecture(void)=0
Figure out the processor and compiler of the target executable.
ArchitectureCapability::sortCapabilities
static void sortCapabilities(void)
Sort extensions.
Definition: architecture.cc:84
Architecture::options
OptionDatabase * options
Options that can be configured.
Definition: architecture.hh:157
Architecture::context
ContextDatabase * context
Map from addresses to context settings.
Definition: architecture.hh:141
translate.hh
Classes for disassembly and pcode generation.
Architecture::highPtrPossible
bool highPtrPossible(const Address &loc, int4 size) const
Are pointers possible to the given location?
Definition: architecture.hh:313
Architecture::nohighptr
RangeList nohighptr
Ranges for which high-level pointers are not possible.
Definition: architecture.hh:151
Architecture::parseCompilerConfig
void parseCompilerConfig(DocumentStorage &store)
Apply compiler specific configuration.
Definition: architecture.cc:1161
ArchitectureCapability::buildArchitecture
virtual Architecture * buildArchitecture(const string &filename, const string &target, ostream *estream)=0
Build an Architecture given a raw file or data.
Architecture::max_term_duplication
int4 max_term_duplication
Max terms duplicated without a new variable.
Definition: architecture.hh:126
Architecture::init
void init(DocumentStorage &store)
Load the image and configure architecture.
Definition: architecture.cc:1285
varmap.hh
Classes for keeping track of local variables and reconstructing stack layout.
RangeList::inRange
bool inRange(const Address &addr, int4 size) const
Check containment an address range.
Definition: address.cc:402
Architecture::collectBehaviors
void collectBehaviors(vector< OpBehavior * > &behave) const
Provide a list of OpBehavior objects.
Definition: architecture.cc:313
Architecture::getSpaceBySpacebase
AddrSpace * getSpaceBySpacebase(const Address &loc, int4 size) const
Get space associated with a spacebase register.
Definition: architecture.cc:214
Architecture::funcptr_align
int4 funcptr_align
How many bits of alignment a function ptr has.
Definition: architecture.hh:134
pcodeinject.hh
Classes for managing p-code injection.
loadimage.hh
Classes and API for accessing a binary load image.
Architecture::buildContext
virtual void buildContext(DocumentStorage &store)
Build the Context database.
Definition: architecture.cc:540
Architecture::buildConstantPool
virtual void buildConstantPool(DocumentStorage &store)
Build the constant pool.
Definition: architecture.cc:617
Architecture::parseInferPtrBounds
void parseInferPtrBounds(const Element *el)
Apply pointer inference bounds.
Definition: architecture.cc:1003
Architecture::extra_pool_rules
vector< Rule * > extra_pool_rules
Extra rules that go in the main pool (cpu specific, experimental)
Definition: architecture.hh:138
ArchitectureCapability::initialize
virtual void initialize(void)
Do specialized initialization.
Definition: architecture.cc:33
IPTR_INTERNAL
@ IPTR_INTERNAL
Internally managed temporary space.
Definition: space.hh:32
Architecture::restoreFlowOverride
void restoreFlowOverride(const Element *el)
Set flow overrides from XML.
Definition: architecture.cc:402
Architecture::buildAction
virtual void buildAction(DocumentStorage &store)
Build the Action framework.
Definition: architecture.cc:529
Architecture::printMessage
virtual void printMessage(const string &message) const =0
Print an error message to console.
ConstantPool
An interface to the pool of constant objects for byte-code languages.
Definition: cpool.hh:92
Architecture::restoreXml
virtual void restoreXml(DocumentStorage &store)
Restore the Architecture state from an XML stream.
Definition: architecture.cc:442
Document
A complete in-memory XML document.
Definition: xml.hh:206
Architecture::parseStackPointer
void parseStackPointer(const Element *el)
Apply stack pointer configuration.
Definition: architecture.cc:955
AddrSpace::getType
spacetype getType(void) const
Get the type of space.
Definition: space.hh:291
Architecture::inst
vector< TypeOp * > inst
Registered p-code instructions.
Definition: architecture.hh:158
PcodeInjectLibrary
A collection of p-code injection payloads.
Definition: pcodeinject.hh:162
Scope
A collection of Symbol objects within a single (namespace or functional) scope.
Definition: database.hh:402
Architecture::allacts
ActionDatabase allacts
Actions that can be applied in this architecture.
Definition: architecture.hh:162
userop.hh
Classes for more detailed definitions of user defined p-code operations.
Architecture::readLoaderSymbols
void readLoaderSymbols(const string &delim)
Read any symbols from loader into database.
Definition: architecture.cc:295
Architecture::parseProcessorConfig
void parseProcessorConfig(DocumentStorage &store)
Apply processor specific configuration.
Definition: architecture.cc:1108
Architecture::parseExtraRules
void parseExtraRules(DocumentStorage &store)
Apply any Rule tags.
Definition: architecture.cc:1249
Architecture::parseNoHighPtr
void parseNoHighPtr(const Element *el)
Apply memory alias configuration.
Definition: architecture.cc:1057
options.hh
Classes for processing architecture configuration options.
ActionDatabase
Database of root Action objects that can be used to transform a function.
Definition: action.hh:298
Architecture::defaultReturnAddr
VarnodeData defaultReturnAddr
Default storage location of return address (for current function)
Definition: architecture.hh:144
Element
An XML element. A node in the DOM tree.
Definition: xml.hh:150
Architecture::buildCommentDB
virtual void buildCommentDB(DocumentStorage &store)
Build the comment database.
Definition: architecture.cc:600
Architecture::addSpacebase
void addSpacebase(AddrSpace *basespace, const string &nm, const VarnodeData &ptrdata, int4 truncSize, bool isreversejustified, bool stackGrowth)
Create a new space and associated pointer.
Definition: architecture.cc:503
SegmentedResolver::resolve
virtual Address resolve(uintb val, int4 sz, const Address &point, uintb &fullEncoding)
Virtual destructor
Definition: architecture.cc:1334
AddressResolver
Abstract class for converting native constants to addresses.
Definition: translate.hh:140
Architecture::setPrototype
void setPrototype(const PrototypePieces &pieces)
Set the prototype for a particular function.
Definition: architecture.cc:341
Architecture
Manager for all the major decompiler subsystems.
Definition: architecture.hh:119
Architecture::flowoptions
uint4 flowoptions
options passed to flow following engine
Definition: architecture.hh:135
Architecture::print
PrintLanguage * print
Current high-level language printer.
Definition: architecture.hh:155
LoadImage
An interface into a particular binary executable image.
Definition: loadimage.hh:71
UserOpManage
Manager/container for description objects (UserPcodeOp) of user defined p-code ops.
Definition: userop.hh:250
Architecture::buildTranslator
virtual Translate * buildTranslator(DocumentStorage &store)=0
Build the Translator object.
Architecture::getMinimumLanedRegisterSize
int4 getMinimumLanedRegisterSize(void) const
Get the minimum size of a laned register in bytes.
Definition: architecture.cc:263
ProtoModel
A prototype model: a model for passing parameters between functions.
Definition: fspec.hh:622
Architecture::parseProtoEval
void parseProtoEval(const Element *el)
Apply prototype evaluation configuration.
Definition: architecture.cc:778
Architecture::clearAnalysis
void clearAnalysis(Funcdata *fd)
Clear analysis specific to a function.
Definition: architecture.cc:283
SegmentedResolver::SegmentedResolver
SegmentedResolver(Architecture *g, AddrSpace *sp, SegmentOp *sop)
Definition: architecture.hh:301
Architecture::parseIncidentalCopy
void parseIncidentalCopy(const Element *el)
Apply incidental copy configuration.
Definition: architecture.cc:913
capability.hh
Infrastructure for discovering code extensions to the decompiler.
Architecture::parseProto
ProtoModel * parseProto(const Element *el)
Build a proto-type model from an XML tag.
Definition: architecture.cc:752
Architecture::defaultfp
ProtoModel * defaultfp
Parsed form of default prototype.
Definition: architecture.hh:143
RangeList
A disjoint set of Ranges, possibly across multiple address spaces.
Definition: address.hh:203
ArchitectureCapability::findCapability
static ArchitectureCapability * findCapability(const string &filename)
Find an extension to process a file.
Definition: architecture.cc:42
LanedRegister
Describes a (register) storage location and the ways it might be split into lanes.
Definition: transform.hh:88
Architecture::globalify
void globalify(void)
Mark all spaces as global.
Definition: architecture.cc:386
Architecture::stringManager
StringManager * stringManager
Manager of decoded strings.
Definition: architecture.hh:153
Architecture::commentdb
CommentDatabase * commentdb
Comments for this architecture.
Definition: architecture.hh:152
Architecture::cacheAddrSpaceProperties
void cacheAddrSpaceProperties(void)
Calculate some frequently used space properties and cache them.
Definition: architecture.cc:682
Architecture::translate
const Translate * translate
Translation method for this binary.
Definition: architecture.hh:148
Architecture::types
TypeFactory * types
List of types for this binary.
Definition: architecture.hh:147
Architecture::readonlypropagate
bool readonlypropagate
true if readonly values should be treated as constants
Definition: architecture.hh:130
Architecture::setDefaultModel
void setDefaultModel(const string &nm)
Set the default PrototypeModel.
Definition: architecture.cc:274
Address::getSpace
AddrSpace * getSpace(void) const
Get the address space.
Definition: address.hh:294
ArchitectureCapability::isFileMatch
virtual bool isFileMatch(const string &filename) const =0
Determine if this extension can handle this file.
Address
A low-level machine address for labelling bytes and data.
Definition: address.hh:46
PrototypePieces
Raw components of a function prototype (obtained from parsing source code)
Definition: fspec.hh:1144
Architecture::buildLoader
virtual void buildLoader(DocumentStorage &store)=0
Build the LoadImage object and load the executable image.
Funcdata
Container for data structures associated with a single function.
Definition: funcdata.hh:45
Architecture::buildStringManager
virtual void buildStringManager(DocumentStorage &store)
Build the string manager.
Definition: architecture.cc:608
TypeFactory
Container class for all Datatype objects in an Architecture.
Definition: type.hh:396
Architecture::lanerecords
vector< LanedRegister > lanerecords
Vector registers that have preferred lane sizes.
Definition: architecture.hh:161
Architecture::min_funcsymbol_size
int4 min_funcsymbol_size
Minimum size of a function symbol.
Definition: architecture.hh:128
stringmanage.hh
Classes for decoding and storing string data.
ContextDatabase
An interface to a database of disassembly/decompiler context information.
Definition: globalcontext.hh:108
Database
A manager for symbol scopes for a whole executable.
Definition: database.hh:844
Architecture::Architecture
Architecture(void)
Construct an uninitialized Architecture.
Definition: architecture.cc:100
Architecture::protoModels
map< string, ProtoModel * > protoModels
Parsed forms of possible prototypes.
Definition: architecture.hh:142
Architecture::hasModel
bool hasModel(const string &nm) const
Does this Architecture have a specific PrototypeModel.
Definition: architecture.cc:197
CapabilityPoint
Class for automatically registering extension points to the decompiler.
Definition: capability.hh:36
Architecture::userops
UserOpManage userops
Specifically registered user-defined p-code ops.
Definition: architecture.hh:159
Architecture::aggressive_ext_trim
bool aggressive_ext_trim
Aggressively trim inputs that look like they are sign extended.
Definition: architecture.hh:129
database.hh
Symbol and Scope objects for the decompiler.
Architecture::archid
string archid
ID string uniquely describing this architecture.
Definition: architecture.hh:121
Translate
The interface to a translation engine for a processor.
Definition: translate.hh:294
Architecture::parseDynamicRule
void parseDynamicRule(const Element *el)
Apply details of a dynamic Rule object.
Definition: architecture.cc:722
Architecture::buildSpecFile
virtual void buildSpecFile(DocumentStorage &store)=0
Load any relevant specification files.
Architecture::max_implied_ref
int4 max_implied_ref
Maximum number of references to an implied var.
Definition: architecture.hh:125
Architecture::parseReadOnly
void parseReadOnly(const Element *el)
Apply read-only region configuration.
Definition: architecture.cc:864
fspec.hh
Definitions for specifying functions prototypes.
Range
A contiguous range of bytes in some address space.
Definition: address.hh:161
globalcontext.hh
Utilities for getting address-based context to the disassembler and decompiler.
Architecture::parseVolatile
void parseVolatile(const Element *el)
Apply volatile region configuration.
Definition: architecture.cc:880
Architecture::getSegmentOp
SegmentOp * getSegmentOp(AddrSpace *spc) const
Retrieve the segment op for the given space if any.
Definition: architecture.cc:328
Architecture::resetDefaultsInternal
void resetDefaultsInternal(void)
Reset default values for options specific to Architecture.
Definition: architecture.cc:1308
SegmentedResolver
A resolver for segmented architectures.
Definition: architecture.hh:292
Architecture::inferPtrSpaces
vector< AddrSpace * > inferPtrSpaces
Set of address spaces in which a pointer constant is inferable.
Definition: architecture.hh:133
Architecture::alias_block_level
int4 alias_block_level
Aliases blocked by 0=none, 1=struct, 2=array, 3=all.
Definition: architecture.hh:137
Architecture::parseLaneSizes
void parseLaneSizes(const Element *el)
Apply lane size configuration.
Definition: architecture.cc:930
Architecture::initializeSegments
void initializeSegments()
Set up segment resolvers.
Definition: architecture.cc:665
Architecture::~Architecture
virtual ~Architecture(void)
Destructor.
Definition: architecture.cc:134
action.hh
Action, Rule, and other associates classes supporting transformations on function data-flow.
Architecture::parseGlobal
void parseGlobal(const Element *el)
Apply global space configuration.
Definition: architecture.cc:817
Architecture::pcodeinjectlib
PcodeInjectLibrary * pcodeinjectlib
Pcode injection manager.
Definition: architecture.hh:150
Architecture::buildInstructions
virtual void buildInstructions(DocumentStorage &store)
Register the p-code operations.
Definition: architecture.cc:626
Architecture::parseSpacebase
void parseSpacebase(const Element *el)
Create an additional indexed space.
Definition: architecture.cc:1043
VarnodeData
Data defining a specific memory location.
Definition: pcoderaw.hh:33
Architecture::fillinReadOnlyFromLoader
void fillinReadOnlyFromLoader(void)
Load info about read-only sections.
Definition: architecture.cc:1265
Architecture::modifySpaces
virtual void modifySpaces(Translate *trans)=0
Modify address spaces as required by this Architecture.
Architecture::saveXml
virtual void saveXml(ostream &s) const
Serialize this architecture to XML.
Definition: architecture.cc:423
ArchitectureCapability::name
string name
Identifier for this capability.
Definition: architecture.hh:76
ArchitectureCapability::isXmlMatch
virtual bool isXmlMatch(Document *doc) const =0
Determine is this extension can handle this XML document.
Architecture::parseFuncPtrAlign
void parseFuncPtrAlign(const Element *el)
Apply function pointer alignment configuration.
Definition: architecture.cc:1020
DocumentStorage
A container for parsed XML documents.
Definition: xml.hh:249
Architecture::parseReturnAddress
void parseReturnAddress(const Element *el)
Apply return address configuration.
Definition: architecture.cc:897
CommentDatabase
An interface to a container of comments.
Definition: comment.hh:86
AddrSpaceManager
A manager for different address spaces.
Definition: translate.hh:218
Architecture::evalfp_called
ProtoModel * evalfp_called
Function proto to use when evaluating called functions.
Definition: architecture.hh:146
Architecture::buildTypegrp
virtual void buildTypegrp(DocumentStorage &store)
Build the data-type factory/container.
Definition: architecture.cc:563
Architecture::addOtherSpace
void addOtherSpace(void)
Add OTHER space and all of its overlays to the symboltab.
Definition: architecture.cc:844
Architecture::loader
LoadImage * loader
Method for loading portions of binary.
Definition: architecture.hh:149
Architecture::max_basetype_size
int4 max_basetype_size
Maximum size of an "integer" type before creating an array type.
Definition: architecture.hh:127
Architecture::cpool
ConstantPool * cpool
Deferred constant values.
Definition: architecture.hh:154
Architecture::analyze_for_loops
bool analyze_for_loops
True if we should attempt conversion of whiledo loops to for loops.
Definition: architecture.hh:132
Architecture::loadersymbols_parsed
bool loadersymbols_parsed
True if loader symbols have been read.
Definition: architecture.hh:163
Architecture::restoreFromSpec
void restoreFromSpec(DocumentStorage &store)
Fully initialize the Translate object.
Definition: architecture.cc:641
Architecture::symboltab
Database * symboltab
Memory map of global variables and functions.
Definition: architecture.hh:140
Architecture::printlist
vector< PrintLanguage * > printlist
List of high-level language printers supported.
Definition: architecture.hh:156
Architecture::nameFunction
virtual void nameFunction(const Address &addr, string &name) const
Pick a default name for a function.
Definition: architecture.cc:485
Architecture::addNoHighPtr
void addNoHighPtr(const Range &rng)
Add a new region where pointers do not exist.
Definition: architecture.cc:520
Architecture::max_instructions
uint4 max_instructions
Maximum instructions that can be processed in one function.
Definition: architecture.hh:136
Architecture::parsePreferSplit
void parsePreferSplit(const Element *el)
Designate registers to be split.
Definition: architecture.cc:1073
Architecture::parseAggressiveTrim
void parseAggressiveTrim(const Element *el)
Designate how to trim extension p-code ops.
Definition: architecture.cc:1093
SegmentOp
The segmented address operator.
Definition: userop.hh:199
StringManager
Storage for decoding and storing strings associated with an address.
Definition: stringmanage.hh:31
OptionDatabase
A Dispatcher for possible ArchOption commands.
Definition: options.hh:63
Architecture::splitrecords
vector< PreferSplitRecord > splitrecords
registers that we would prefer to see split for this processor
Definition: architecture.hh:160
Architecture::setPrintLanguage
void setPrintLanguage(const string &nm)
Establish a particular output language.
Definition: architecture.cc:360
ArchitectureCapability
Abstract extension point for building Architecture objects.
Definition: architecture.hh:71