fix functions that return double in decompiler

This commit is contained in:
kkots 2024-07-12 22:58:43 +03:00
parent dec414e11b
commit adc6008ea9
3 changed files with 20 additions and 3 deletions

View File

@ -156,4 +156,16 @@ void GhidraTranslate::decode(Decoder &decoder)
decoder.closeElement(elemId);
}
void GhidraTranslate::renormalizeJoinAddress(Address &addr,int4 size) {
glb->renormalizeJoinAddress(addr,size);
}
JoinRecord* GhidraTranslate::findAddJoin(const vector<VarnodeData> &pieces,uint4 logicalsize) {
return glb->findAddJoin(pieces,logicalsize);
}
JoinRecord* GhidraTranslate::findJoin(uintb offset) const {
return glb->findJoin(offset);
}
} // End namespace ghidra

View File

@ -53,6 +53,11 @@ public:
throw LowlevelError("Cannot currently get instruction length through this interface"); }
virtual int4 printAssembly(AssemblyEmit &emit,const Address &baseaddr) const {
throw LowlevelError("Cannot dump assembly through this interface"); }
virtual JoinRecord *findAddJoin(const vector<VarnodeData> &pieces,uint4 logicalsize); ///< Get (or create) JoinRecord for \e pieces
virtual JoinRecord *findJoin(uintb offset) const; ///< Find JoinRecord for \e offset in the join space
/// \brief Make sure a possibly offset \e join address has a proper JoinRecord
virtual void renormalizeJoinAddress(Address &addr,int4 size);
};
} // End namespace ghidra

View File

@ -266,8 +266,8 @@ public:
int4 numSpaces(void) const; ///< Get the number of address spaces for this processor
AddrSpace *getSpace(int4 i) const; ///< Get an address space via its index
AddrSpace *getNextSpaceInOrder(AddrSpace *spc) const; ///< Get the next \e contiguous address space
JoinRecord *findAddJoin(const vector<VarnodeData> &pieces,uint4 logicalsize); ///< Get (or create) JoinRecord for \e pieces
JoinRecord *findJoin(uintb offset) const; ///< Find JoinRecord for \e offset in the join space
virtual JoinRecord *findAddJoin(const vector<VarnodeData> &pieces,uint4 logicalsize); ///< Get (or create) JoinRecord for \e pieces
virtual JoinRecord *findJoin(uintb offset) const; ///< Find JoinRecord for \e offset in the join space
void setDeadcodeDelay(AddrSpace *spc,int4 delaydelta); ///< Set the deadcodedelay for a specific space
void truncateSpace(const TruncationTag &tag); ///< Mark a space as truncated from its original size
@ -278,7 +278,7 @@ public:
Address constructJoinAddress(const Translate *translate,const Address &hiaddr,int4 hisz,const Address &loaddr,int4 losz);
/// \brief Make sure a possibly offset \e join address has a proper JoinRecord
void renormalizeJoinAddress(Address &addr,int4 size);
virtual void renormalizeJoinAddress(Address &addr,int4 size);
/// \brief Parse a string with just an \e address \e space name and a hex offset
Address parseAddressSimple(const string &val);