1
0
Fork 0

DBG: call DbgGetStringAt instead of disasmgetstringatwrapper

This commit is contained in:
mrexodia 2017-05-05 16:35:17 +02:00
parent c02a192fda
commit 60382ae119
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
3 changed files with 6 additions and 6 deletions

View File

@ -369,14 +369,14 @@ extern "C" DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, BRID
temp_string.append(StringUtils::Escape((unsigned char)constant));
temp_string.push_back('\'');
}
else if(disasmgetstringatwrapper(instr.arg[i].constant, string_text))
else if(DbgGetStringAt(instr.arg[i].constant, string_text))
{
temp_string.assign(instr.arg[i].mnemonic);
temp_string.push_back(':');
temp_string.append(string_text);
}
}
else if(instr.arg[i].memvalue && (disasmgetstringatwrapper(instr.arg[i].memvalue, string_text) || _dbg_addrinfoget(instr.arg[i].memvalue, instr.arg[i].segment, &newinfo)))
else if(instr.arg[i].memvalue && (DbgGetStringAt(instr.arg[i].memvalue, string_text) || _dbg_addrinfoget(instr.arg[i].memvalue, instr.arg[i].segment, &newinfo)))
{
if(*string_text)
{
@ -395,7 +395,7 @@ extern "C" DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, BRID
temp_string.append(newinfo.label);
}
}
else if(instr.arg[i].value && (disasmgetstringatwrapper(instr.arg[i].value, string_text) || _dbg_addrinfoget(instr.arg[i].value, instr.arg[i].segment, &newinfo)))
else if(instr.arg[i].value && (DbgGetStringAt(instr.arg[i].value, string_text) || _dbg_addrinfoget(instr.arg[i].value, instr.arg[i].segment, &newinfo)))
{
if(instr.type != instr_normal) //stack/jumps (eg add esp, 4 or jmp 401110) cannot directly point to strings
{

View File

@ -486,12 +486,12 @@ static bool cbRefStr(Capstone* disasm, BASIC_INSTRUCTION_INFO* basicinfo, REFINF
};
if((basicinfo->type & TYPE_VALUE) == TYPE_VALUE)
{
if(disasmgetstringatwrapper(basicinfo->value.value, string))
if(DbgGetStringAt(basicinfo->value.value, string))
addRef();
}
if((basicinfo->type & TYPE_MEMORY) == TYPE_MEMORY)
{
if(disasmgetstringatwrapper(basicinfo->memory.value, string))
if(DbgGetStringAt(basicinfo->memory.value, string))
addRef();
}
return false;

View File

@ -105,7 +105,7 @@ bool stackcommentget(duint addr, STACK_COMMENT* comment)
//string
char string[MAX_STRING_SIZE] = "";
if(disasmgetstringatwrapper(data, string))
if(DbgGetStringAt(data, string))
{
strncpy_s(comment->comment, string, _TRUNCATE);
return true;