forked from kweatherman/IDA_ClassInformer_PlugIn
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.h
More file actions
50 lines (40 loc) · 1.59 KB
/
Main.h
File metadata and controls
50 lines (40 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Class Informer
#pragma once
extern BOOL getVerifyEa(ea_t ea, ea_t &rValue);
extern BOOL hasAnteriorComment(ea_t ea);
extern void addTableEntry(UINT32 flags, ea_t vft, int methodCount, LPCSTR format, ...);
extern BOOL getPlainTypeName(__in LPCSTR mangled, __out_bcount(MAXSTR) LPSTR outStr);
extern void fixDword(ea_t ea);
extern void fixEa(ea_t ea);
extern void fixFunction(ea_t eaFunc);
extern void setName(ea_t ea, __in LPCSTR name);
extern void setComment(ea_t ea, LPCSTR comment, BOOL rptble);
extern void setAnteriorComment(ea_t ea, const char *format, ...);
inline void setUnknown(ea_t ea, int size) { del_items(ea, DELIT_EXPAND, size); }
// Return TRUE if there is a name at address that is not a dumbly name
inline BOOL hasName(ea_t ea) { return has_name(get_flags(ea)); }
// Return TRUE if there is a comment at address
inline BOOL hasComment(ea_t ea) { return has_cmt(get_flags(ea)); }
// Get IDA 32 bit value with IDB existence verification
template <class T> BOOL getVerify32(ea_t eaPtr, T& rValue)
{
// Location valid?
if (IS_VALID_ADDR(eaPtr))
{
// Get 32bit value
rValue = (T) get_32bit(eaPtr);
return TRUE;
}
return FALSE;
}
// Segment cache container
const UINT32 _CODE_SEG = (1 << 0);
const UINT32 _DATA_SEG = (1 << 1);
struct SEGMENT
{
ea_t start, end; // Start and end VA of the segment
UINT32 type; // Either SEG_CODE, SEG_DATA, or both for the corner case of a IDB with just one segment.
char name[8 + 1]; // PE header format is 8 max
};
extern const SEGMENT *FindCachedSegment(ea_t addr);
extern BOOL g_optionPlaceStructs;