16 #ifndef __CPUI_CODEDATA__ 17 #define __CPUI_CODEDATA__ 19 #include "ifacedecomp.hh" 61 vector<Address> jumpaddr;
62 set<uintb> targetoffsets;
71 void addTarget(
const Address &addr) { targetoffsets.insert( addr.
getOffset() ); }
80 bool operator<(
const TargetHit &op2)
const {
return (funcstart < op2.funcstart); }
93 bool operator<(
const AddrLink &op2)
const {
94 if (a != op2.a)
return (a < op2.a);
105 map<Address,CodeUnit> codeunit;
106 map<AddrLink,uint4> fromto_crossref;
107 map<AddrLink,uint4> tofrom_crossref;
108 list<map<Address,CodeUnit>::iterator> taintlist;
109 list<Address> unlinkedstarts;
110 list<TargetHit> targethits;
111 map<Address,TargetFeature> targets;
114 void pushTaintAddress(
const Address &addr);
115 void processTaint(
void);
116 Address commitCodeVec(
const Address &addr,vector<CodeUnit> &codevec,map<AddrLink,uint4> &fromto_vec);
117 void clearHitBy(
void);
120 void addTarget(
const string &nm,
const Address &addr,uint4 mask);
121 int4 getNumTargets(
void)
const {
return targets.size(); }
123 void disassembleRange(
const Range &range);
124 void disassembleRangeList(
const RangeList &rangelist);
125 void findNotCodeUnits(
void);
126 void markFallthruHits(
void);
127 void markCrossHits(
void);
128 void addTargetHit(
const Address &codeaddr,uintb targethit);
129 void resolveThunkHit(
const Address &codeaddr,uintb targethit);
130 void findUnlinked(
void);
131 bool checkErrantStart(map<Address,CodeUnit>::iterator iter);
132 bool repairJump(
const Address &addr,int4 max);
133 void findOffCut(
void);
135 const list<TargetHit> &getTargetHits(
void)
const {
return targethits; }
136 void dumpModelHits(ostream &s)
const;
137 void dumpCrossRefs(ostream &s)
const;
138 void dumpFunctionStarts(ostream &s)
const;
139 void dumpUnlinked(ostream &s)
const;
140 void dumpTargetHits(ostream &s)
const;
151 virtual string getModule(
void)
const {
return "codedata"; }
157 virtual void execute(istream &s);
162 virtual void execute(istream &s);
167 virtual void execute(istream &s);
172 virtual void execute(istream &s);
177 virtual void execute(istream &s);
182 virtual void execute(istream &s);
187 virtual void execute(istream &s);
192 virtual void execute(istream &s);
Definition: interface.hh:62
Definition: codedata.hh:59
OpCode
The op-code defining a specific p-code operation (PcodeOp)
Definition: opcodes.hh:35
Abstract class for emitting pcode to an application.
Definition: translate.hh:76
Definition: codedata.hh:74
Definition: codedata.hh:32
A contiguous range of bytes in some address space.
Definition: address.hh:161
A disjoint set of Ranges, possibly across multiple address spaces.
Definition: address.hh:203
Definition: codedata.hh:160
Definition: codedata.hh:88
Definition: codedata.hh:21
Definition: ifacedecomp.hh:39
Definition: codedata.hh:144
A low-level machine address for labelling bytes and data.
Definition: address.hh:46
Definition: codedata.hh:50
Definition: codedata.hh:190
Definition: codedata.hh:165
The interface to a translation engine for a processor.
Definition: translate.hh:293
Manager for all the major decompiler subsystems.
Definition: architecture.hh:117
Definition: codedata.hh:180
Definition: codedata.hh:170
uintb getOffset(void) const
Get the address offset.
Definition: address.hh:300
Definition: interface.hh:108
Definition: codedata.hh:99
Definition: interface.hh:67
Definition: interface.hh:96
Definition: codedata.hh:175
Definition: codedata.hh:155
Definition: codedata.hh:83
Definition: codedata.hh:185
Data defining a specific memory location.
Definition: pcoderaw.hh:33