#include <byteinfo.h>
Public Types | |
enum | TPriority { priNone, priCheckOnly, priFiller, priConstant, priApi, priHeuristics, priExport, priSafeHeuristics, priSafeExport, priEntryPoint, priMax = priEntryPoint } |
How sure is program about this byte. More... | |
enum | TType { typeNone, typeInstruction = typeNone, typeLoader, typeInteger, typePointer, typeASCIIZ, typeMax = typeASCIIZ } |
Type of byte (contained in an instruction, a string, etc). More... | |
Public Methods | |
ByteInfo () | |
void | Reset () |
Delete all info for this byte. More... | |
void | SetPriority (enum TPriority pri) |
enum TPriority | GetPriority () const |
void | SetType (enum TType typ) |
enum TType | GetType () const |
void | SetIsPrevInstruction () |
Mark this istruction have another instruction before (and is not a unconditional jump). More... | |
int | IsPrevInstruction () const |
void | SetIsLabel () |
This byte if target of a jump or a data referenced from an instruction/constant. More... | |
int | IsLabel () const |
void | SetContinue () |
Used to handle long data. More... | |
int | Continue () const |
Public Attributes | |
uchar | len |
len of istruction/data, for long data (>32) use ByteInfos::GetLen. More... | |
Private Attributes | |
uchar | priority |
uchar | flag |
uchar | type |
Definition at line 36 of file byteinfo.h.
|
How sure is program about this byte.
Definition at line 42 of file byteinfo.h. Referenced by CodeParser::AddExportTempFlow(), CodeParser::AddTempFlow(), CodeParser::CheckCode(), CodeParser::CheckCodeRecursively(), CodeParser::CheckForAddress(), CodeParser::ExecuteComplexReferenceMemory(), GetPriority(), THeuristicMotor::Process(), CodeParser::ScanCode(), CodeParser::SetCodeRange(), SetPriority(), CodeParser::WriteCode(), and WritePriority().
00043 { 00044 priNone, /**< not code */ 00045 priCheckOnly, /**< internal use */ 00046 priFiller, /**< what's this? */ 00047 priConstant, /**< a constant in code reference this */ 00048 priApi, /**< code exported */ 00049 priHeuristics, /**< discovered by heuristic, not very safe */ 00050 priExport, /**< code exported */ 00051 priSafeHeuristics, /**< discovered by heuristic, safe */ 00052 priSafeExport, /**< code exported, surely code */ 00053 priEntryPoint, /**< executed starting from entry-point */ 00054 priMax = priEntryPoint 00055 }; |
|
Type of byte (contained in an instruction, a string, etc).
Definition at line 59 of file byteinfo.h. Referenced by GetType(), and SetType().
00060 { 00061 typeNone, 00062 typeInstruction = typeNone, /**< instruction */ 00063 typeLoader, /**< used by loader, resource or other */ 00064 typeInteger, /**< part of an integer */ 00065 typePointer, /**< a pointer */ 00066 typeASCIIZ, /**< asciiz string */ 00067 typeMax = typeASCIIZ 00068 }; |
|
Definition at line 72 of file byteinfo.h. References flag, len, priNone, priority, type, and typeNone.
|
|
Definition at line 103 of file byteinfo.h. References flag. Referenced by ByteInfos::GetLen().
00103 { return flag&4; }; |
|
Definition at line 81 of file byteinfo.h. References TPriority. Referenced by CodeParser::CheckForAddress(), CodeParser::ExecuteComplexReferenceMemory(), CodeParser::ResetCodeRange(), and CodeParser::ScanCode().
00082 { return static_cast<enum TPriority>(priority); }; |
|
Definition at line 85 of file byteinfo.h. References TType. Referenced by IsCodePointer(), CodeParser::ScanCode(), and CodeParser::WriteCode().
00085 { return static_cast<enum TType>(type); }; |
|
Definition at line 98 of file byteinfo.h. References flag.
00098 { return flag&2; }; |
|
Definition at line 93 of file byteinfo.h. References flag.
00093 { return flag&1; }; |
|
Delete all info for this byte.
Definition at line 76 of file byteinfo.h. References flag, len, priNone, priority, type, and typeNone. Referenced by CodeParser::ResetCodeRange().
|
|
Used to handle long data.
Definition at line 102 of file byteinfo.h. References flag. Referenced by ByteInfos::SetLen().
00102 { flag |= 4; }; |
|
This byte if target of a jump or a data referenced from an instruction/constant.
Definition at line 97 of file byteinfo.h. References flag. Referenced by CodeParser::CheckForAddress(), and CodeParser::ScanCode().
00097 { flag |= 2; }; |
|
Mark this istruction have another instruction before (and is not a unconditional jump).
Definition at line 92 of file byteinfo.h. References flag. Referenced by CodeParser::ScanCode().
00092 { flag |= 1; }; |
|
Definition at line 79 of file byteinfo.h. References _PRG_ASSERT, priMax, priority, and TPriority. Referenced by CodeParser::CheckForAddress(), CodeParser::ExcludeFileRange(), CodeParser::ExecuteComplexReferenceMemory(), CodeParser::Parse(), and CodeParser::ScanCode().
00080 { _PRG_ASSERT(pri>=0 && pri<=priMax); priority = static_cast<uchar>(pri); }; |
|
Definition at line 83 of file byteinfo.h. References _PRG_ASSERT, TType, type, and typeMax. Referenced by CodeParser::CheckForAddress(), CodeParser::ExcludeFileRange(), CodeParser::ExecuteComplexReferenceMemory(), and CodeParser::Parse().
00084 { _PRG_ASSERT(typ>=0 && typ<=typeMax); type = static_cast<uchar>(typ); }; |
|
Definition at line 106 of file byteinfo.h. Referenced by ByteInfo(), Continue(), IsLabel(), IsPrevInstruction(), Reset(), SetContinue(), SetIsLabel(), and SetIsPrevInstruction(). |
|
len of istruction/data, for long data (>32) use ByteInfos::GetLen.
Definition at line 69 of file byteinfo.h. Referenced by ByteInfo(), CodeParser::CheckForAddress(), CodeParser::ExecuteComplexReferenceMemory(), ByteInfos::GetLen(), IsCodePointer(), CodeParser::Parse(), Reset(), CodeParser::ResetCodeRange(), CodeParser::ScanCode(), and ByteInfos::SetLen(). |
|
Definition at line 105 of file byteinfo.h. Referenced by ByteInfo(), Reset(), and SetPriority(). |
|
Definition at line 107 of file byteinfo.h. |