1
0
Fork 0

BRIDGE+DBG: renamed ADDRINFO to BRIDGE_ADDRINFO

This commit is contained in:
mrexodia 2017-05-04 15:33:24 +02:00
parent f96cb7dd9d
commit 67b5c40370
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
8 changed files with 23 additions and 26 deletions

View File

@ -25,8 +25,8 @@ typedef void (*DBGDBGEXITSIGNAL)();
typedef bool (*DBGVALFROMSTRING)(const char* string, duint* value);
typedef bool (*DBGISDEBUGGING)();
typedef bool (*DBGISJUMPGOINGTOEXECUTE)(duint addr);
typedef bool (*DBGADDRINFOGET)(duint addr, SEGMENTREG segment, ADDRINFO* addrinfo);
typedef bool (*DBGADDRINFOSET)(duint addr, ADDRINFO* addrinfo);
typedef bool (*DBGADDRINFOGET)(duint addr, SEGMENTREG segment, BRIDGE_ADDRINFO* addrinfo);
typedef bool (*DBGADDRINFOSET)(duint addr, BRIDGE_ADDRINFO* addrinfo);
typedef bool(*DBGENCODETYPESET)(duint addr, duint size, ENCODETYPE type);
typedef BPXTYPE(*DBGBPGETTYPEAT)(duint addr);
typedef bool (*DBGGETREGDUMP)(REGDUMP* regdump);

View File

@ -330,7 +330,7 @@ BRIDGE_IMPEXP bool DbgGetLabelAt(duint addr, SEGMENTREG segment, char* text) //(
{
if(!text || !addr)
return false;
ADDRINFO info;
BRIDGE_ADDRINFO info;
memset(&info, 0, sizeof(info));
info.flags = flaglabel | flagNoFuncOffset;
if(!_dbg_addrinfoget(addr, segment, &info))
@ -339,7 +339,7 @@ BRIDGE_IMPEXP bool DbgGetLabelAt(duint addr, SEGMENTREG segment, char* text) //(
if(!DbgMemIsValidReadPtr(addr))
return false;
DbgMemRead(addr, (unsigned char*)&addr_, sizeof(duint));
ADDRINFO ptrinfo = info;
BRIDGE_ADDRINFO ptrinfo = info;
if(!_dbg_addrinfoget(addr_, SEG_DEFAULT, &ptrinfo))
return false;
sprintf_s(info.label, "&%s", ptrinfo.label);
@ -352,7 +352,7 @@ BRIDGE_IMPEXP bool DbgSetLabelAt(duint addr, const char* text)
{
if(!text || strlen(text) >= MAX_LABEL_SIZE || !addr)
return false;
ADDRINFO info;
BRIDGE_ADDRINFO info;
memset(&info, 0, sizeof(info));
info.flags = flaglabel;
strcpy_s(info.label, text);
@ -371,7 +371,7 @@ BRIDGE_IMPEXP bool DbgGetCommentAt(duint addr, char* text) //comment (not live)
{
if(!text || !addr)
return false;
ADDRINFO info;
BRIDGE_ADDRINFO info;
memset(&info, 0, sizeof(info));
info.flags = flagcomment;
if(!_dbg_addrinfoget(addr, SEG_DEFAULT, &info))
@ -384,7 +384,7 @@ BRIDGE_IMPEXP bool DbgSetCommentAt(duint addr, const char* text)
{
if(!text || strlen(text) >= MAX_COMMENT_SIZE || !addr)
return false;
ADDRINFO info;
BRIDGE_ADDRINFO info;
memset(&info, 0, sizeof(info));
info.flags = flagcomment;
strcpy_s(info.comment, MAX_COMMENT_SIZE, text);
@ -403,7 +403,7 @@ BRIDGE_IMPEXP bool DbgGetModuleAt(duint addr, char* text)
{
if(!text || !addr)
return false;
ADDRINFO info;
BRIDGE_ADDRINFO info;
memset(&info, 0, sizeof(info));
info.flags = flagmodule;
if(!_dbg_addrinfoget(addr, SEG_DEFAULT, &info))
@ -416,7 +416,7 @@ BRIDGE_IMPEXP bool DbgGetBookmarkAt(duint addr)
{
if(!addr)
return false;
ADDRINFO info;
BRIDGE_ADDRINFO info;
memset(&info, 0, sizeof(info));
info.flags = flagbookmark;
if(!_dbg_addrinfoget(addr, SEG_DEFAULT, &info))
@ -428,7 +428,7 @@ BRIDGE_IMPEXP bool DbgSetBookmarkAt(duint addr, bool isbookmark)
{
if(!addr)
return false;
ADDRINFO info;
BRIDGE_ADDRINFO info;
memset(&info, 0, sizeof(info));
info.flags = flagbookmark;
info.isbookmark = isbookmark;
@ -493,7 +493,7 @@ BRIDGE_IMPEXP bool DbgCmdExecDirect(const char* cmd)
BRIDGE_IMPEXP FUNCTYPE DbgGetFunctionTypeAt(duint addr)
{
ADDRINFO info;
BRIDGE_ADDRINFO info;
memset(&info, 0, sizeof(info));
info.flags = flagfunction;
if(!_dbg_addrinfoget(addr, SEG_DEFAULT, &info))
@ -512,7 +512,7 @@ BRIDGE_IMPEXP FUNCTYPE DbgGetFunctionTypeAt(duint addr)
// FIXME depth
BRIDGE_IMPEXP LOOPTYPE DbgGetLoopTypeAt(duint addr, int depth)
{
ADDRINFO info;
BRIDGE_ADDRINFO info;
memset(&info, 0, sizeof(info));
info.flags = flagloop;
info.loop.depth = depth;
@ -940,7 +940,7 @@ BRIDGE_IMPEXP duint DbgGetTimeWastedCounter()
BRIDGE_IMPEXP ARGTYPE DbgGetArgTypeAt(duint addr)
{
ADDRINFO info;
BRIDGE_ADDRINFO info;
memset(&info, 0, sizeof(info));
info.flags = flagargs;
if(!_dbg_addrinfoget(addr, SEG_DEFAULT, &info))

View File

@ -461,7 +461,6 @@ typedef struct
duint instrcount; //OUT
} LOOP;
#ifndef _NO_ADDRINFO
typedef struct
{
int flags; //ADDRINFOFLAGS (IN)
@ -472,8 +471,7 @@ typedef struct
FUNCTION function;
LOOP loop;
FUNCTION args;
} ADDRINFO;
#endif
} BRIDGE_ADDRINFO;
struct SYMBOLINFO_
{

View File

@ -269,7 +269,7 @@ static bool getLabel(duint addr, char* label, bool noFuncOffset)
return retval;
}
extern "C" DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, ADDRINFO* addrinfo)
extern "C" DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, BRIDGE_ADDRINFO* addrinfo)
{
if(!DbgIsDebugging())
return false;
@ -331,7 +331,7 @@ extern "C" DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, ADDR
DISASM_INSTR instr;
String temp_string;
ADDRINFO newinfo;
BRIDGE_ADDRINFO newinfo;
char string_text[MAX_STRING_SIZE] = "";
Capstone cp;
@ -347,7 +347,7 @@ extern "C" DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, ADDR
for(int i = 0; i < instr.argcount; i++)
{
memset(&newinfo, 0, sizeof(ADDRINFO));
memset(&newinfo, 0, sizeof(BRIDGE_ADDRINFO));
newinfo.flags = flaglabel;
STRING_TYPE strtype = str_none;
@ -442,7 +442,7 @@ extern "C" DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, ADDR
return info.retval;
}
extern "C" DLL_EXPORT bool _dbg_addrinfoset(duint addr, ADDRINFO* addrinfo)
extern "C" DLL_EXPORT bool _dbg_addrinfoset(duint addr, BRIDGE_ADDRINFO* addrinfo)
{
bool retval = false;
if(addrinfo->flags & flaglabel) //set label

View File

@ -16,8 +16,8 @@ DLL_EXPORT bool _dbg_memisvalidreadptr(duint addr);
DLL_EXPORT bool _dbg_valfromstring(const char* string, duint* value);
DLL_EXPORT bool _dbg_isdebugging();
DLL_EXPORT bool _dbg_isjumpgoingtoexecute(duint addr);
DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, ADDRINFO* addrinfo);
DLL_EXPORT bool _dbg_addrinfoset(duint addr, ADDRINFO* addrinfo);
DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, BRIDGE_ADDRINFO* addrinfo);
DLL_EXPORT bool _dbg_addrinfoset(duint addr, BRIDGE_ADDRINFO* addrinfo);
DLL_EXPORT bool _dbg_encodetypeset(duint addr, duint size, ENCODETYPE type);
DLL_EXPORT int _dbg_bpgettypeat(duint addr);
DLL_EXPORT bool _dbg_getregdump(REGDUMP* regdump);

View File

@ -202,7 +202,7 @@ typedef struct
typedef struct
{
duint addr;
ADDRINFO* addrinfo;
BRIDGE_ADDRINFO* addrinfo;
bool retval;
} PLUG_CB_ADDRINFO;

View File

@ -46,7 +46,7 @@ void stackupdateseh()
template<size_t _Count>
static void getSymAddrName(duint addr, char(& str)[_Count])
{
ADDRINFO addrinfo;
BRIDGE_ADDRINFO addrinfo;
if(addr == 0)
{
memcpy(str, "???", 4);
@ -113,7 +113,7 @@ bool stackcommentget(duint addr, STACK_COMMENT* comment)
//label
char label[MAX_LABEL_SIZE] = "";
ADDRINFO addrinfo;
BRIDGE_ADDRINFO addrinfo;
addrinfo.flags = flaglabel;
if(_dbg_addrinfoget(data, SEG_DEFAULT, &addrinfo))
strcpy_s(label, addrinfo.label);

View File

@ -1,4 +1,3 @@
#define _NO_ADDRINFO
#include <WS2tcpip.h>
#undef _WIN32_WINNT
#undef WINVER