DBG: call DbgGetStringAt instead of disasmgetstringatwrapper
This commit is contained in:
parent
c02a192fda
commit
60382ae119
|
@ -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.append(StringUtils::Escape((unsigned char)constant));
|
||||||
temp_string.push_back('\'');
|
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.assign(instr.arg[i].mnemonic);
|
||||||
temp_string.push_back(':');
|
temp_string.push_back(':');
|
||||||
temp_string.append(string_text);
|
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)
|
if(*string_text)
|
||||||
{
|
{
|
||||||
|
@ -395,7 +395,7 @@ extern "C" DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, BRID
|
||||||
temp_string.append(newinfo.label);
|
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
|
if(instr.type != instr_normal) //stack/jumps (eg add esp, 4 or jmp 401110) cannot directly point to strings
|
||||||
{
|
{
|
||||||
|
|
|
@ -486,12 +486,12 @@ static bool cbRefStr(Capstone* disasm, BASIC_INSTRUCTION_INFO* basicinfo, REFINF
|
||||||
};
|
};
|
||||||
if((basicinfo->type & TYPE_VALUE) == TYPE_VALUE)
|
if((basicinfo->type & TYPE_VALUE) == TYPE_VALUE)
|
||||||
{
|
{
|
||||||
if(disasmgetstringatwrapper(basicinfo->value.value, string))
|
if(DbgGetStringAt(basicinfo->value.value, string))
|
||||||
addRef();
|
addRef();
|
||||||
}
|
}
|
||||||
if((basicinfo->type & TYPE_MEMORY) == TYPE_MEMORY)
|
if((basicinfo->type & TYPE_MEMORY) == TYPE_MEMORY)
|
||||||
{
|
{
|
||||||
if(disasmgetstringatwrapper(basicinfo->memory.value, string))
|
if(DbgGetStringAt(basicinfo->memory.value, string))
|
||||||
addRef();
|
addRef();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -105,7 +105,7 @@ bool stackcommentget(duint addr, STACK_COMMENT* comment)
|
||||||
|
|
||||||
//string
|
//string
|
||||||
char string[MAX_STRING_SIZE] = "";
|
char string[MAX_STRING_SIZE] = "";
|
||||||
if(disasmgetstringatwrapper(data, string))
|
if(DbgGetStringAt(data, string))
|
||||||
{
|
{
|
||||||
strncpy_s(comment->comment, string, _TRUNCATE);
|
strncpy_s(comment->comment, string, _TRUNCATE);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue