parent
58de91b229
commit
30ce2fe778
|
@ -19,14 +19,14 @@ protected:
|
||||||
unsigned char* m_Data;
|
unsigned char* m_Data;
|
||||||
BBlockArray & m_MainBlocks;
|
BBlockArray & m_MainBlocks;
|
||||||
|
|
||||||
inline unsigned char* AnalysisPass::TranslateAddress(duint Address)
|
unsigned char* TranslateAddress(duint Address)
|
||||||
{
|
{
|
||||||
ASSERT_TRUE(ValidateAddress(Address));
|
ASSERT_TRUE(ValidateAddress(Address));
|
||||||
|
|
||||||
return &m_Data[Address - m_VirtualStart];
|
return &m_Data[Address - m_VirtualStart];
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool AnalysisPass::ValidateAddress(duint Address)
|
bool ValidateAddress(duint Address)
|
||||||
{
|
{
|
||||||
return (Address >= m_VirtualStart && Address < m_VirtualEnd);
|
return (Address >= m_VirtualStart && Address < m_VirtualEnd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ static bool cbDebugSetBPXTextCommon(BP_TYPE Type, int argc, char* argv[], const
|
||||||
BREAKPOINT bp;
|
BREAKPOINT bp;
|
||||||
if(IsArgumentsLessThan(argc, 2))
|
if(IsArgumentsLessThan(argc, 2))
|
||||||
return false;
|
return false;
|
||||||
char* value = "";
|
const char* value = "";
|
||||||
if(argc > 2)
|
if(argc > 2)
|
||||||
value = argv[2];
|
value = argv[2];
|
||||||
|
|
||||||
|
|
|
@ -310,7 +310,7 @@ bool cbInstrGpa(int argc, char* argv[])
|
||||||
bool cbDebugSetJIT(int argc, char* argv[])
|
bool cbDebugSetJIT(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
arch actual_arch = notfound;
|
arch actual_arch = notfound;
|
||||||
char* jit_debugger_cmd = "";
|
const char* jit_debugger_cmd = "";
|
||||||
Memory<char*> oldjit(MAX_SETTING_SIZE + 1);
|
Memory<char*> oldjit(MAX_SETTING_SIZE + 1);
|
||||||
char path[JIT_ENTRY_DEF_SIZE];
|
char path[JIT_ENTRY_DEF_SIZE];
|
||||||
if(!BridgeIsProcessElevated())
|
if(!BridgeIsProcessElevated())
|
||||||
|
@ -334,7 +334,7 @@ bool cbDebugSetJIT(int argc, char* argv[])
|
||||||
if(!_strcmpi(argv[1], "old"))
|
if(!_strcmpi(argv[1], "old"))
|
||||||
{
|
{
|
||||||
jit_debugger_cmd = oldjit();
|
jit_debugger_cmd = oldjit();
|
||||||
if(!BridgeSettingGet("JIT", "Old", jit_debugger_cmd))
|
if(!BridgeSettingGet("JIT", "Old", oldjit()))
|
||||||
{
|
{
|
||||||
dputs(QT_TRANSLATE_NOOP("DBG", "Error there is no old JIT entry stored."));
|
dputs(QT_TRANSLATE_NOOP("DBG", "Error there is no old JIT entry stored."));
|
||||||
return false;
|
return false;
|
||||||
|
@ -375,7 +375,7 @@ bool cbDebugSetJIT(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
jit_debugger_cmd = oldjit();
|
jit_debugger_cmd = oldjit();
|
||||||
|
|
||||||
if(!BridgeSettingGet("JIT", "Old", jit_debugger_cmd))
|
if(!BridgeSettingGet("JIT", "Old", oldjit()))
|
||||||
{
|
{
|
||||||
dputs(QT_TRANSLATE_NOOP("DBG", "Error there is no old JIT entry stored."));
|
dputs(QT_TRANSLATE_NOOP("DBG", "Error there is no old JIT entry stored."));
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -53,8 +53,8 @@ bool cbDebugTraceIntoBeyondTraceRecord(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
if(argc == 1)
|
if(argc == 1)
|
||||||
{
|
{
|
||||||
char* new_argv[] = { "tibt", "0" };
|
const char* new_argv[] = { "tibt", "0" };
|
||||||
return cbDebugConditionalTrace(cbTraceIntoBeyondTraceRecordStep, false, 2, new_argv);
|
return cbDebugConditionalTrace(cbTraceIntoBeyondTraceRecordStep, false, 2, (char**)new_argv);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return cbDebugConditionalTrace(cbTraceIntoBeyondTraceRecordStep, false, argc, argv);
|
return cbDebugConditionalTrace(cbTraceIntoBeyondTraceRecordStep, false, argc, argv);
|
||||||
|
@ -64,8 +64,8 @@ bool cbDebugTraceOverBeyondTraceRecord(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
if(argc == 1)
|
if(argc == 1)
|
||||||
{
|
{
|
||||||
char* new_argv[] = { "tobt", "0" };
|
const char* new_argv[] = { "tobt", "0" };
|
||||||
return cbDebugConditionalTrace(cbTraceOverBeyondTraceRecordStep, true, 2, new_argv);
|
return cbDebugConditionalTrace(cbTraceOverBeyondTraceRecordStep, true, 2, (char**)new_argv);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return cbDebugConditionalTrace(cbTraceOverBeyondTraceRecordStep, true, argc, argv);
|
return cbDebugConditionalTrace(cbTraceOverBeyondTraceRecordStep, true, argc, argv);
|
||||||
|
@ -75,8 +75,8 @@ bool cbDebugTraceIntoIntoTraceRecord(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
if(argc == 1)
|
if(argc == 1)
|
||||||
{
|
{
|
||||||
char* new_argv[] = { "tiit", "0" };
|
const char* new_argv[] = { "tiit", "0" };
|
||||||
return cbDebugConditionalTrace(cbTraceIntoIntoTraceRecordStep, false, 2, new_argv);
|
return cbDebugConditionalTrace(cbTraceIntoIntoTraceRecordStep, false, 2, (char**)new_argv);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return cbDebugConditionalTrace(cbTraceIntoIntoTraceRecordStep, false, argc, argv);
|
return cbDebugConditionalTrace(cbTraceIntoIntoTraceRecordStep, false, argc, argv);
|
||||||
|
@ -86,8 +86,8 @@ bool cbDebugTraceOverIntoTraceRecord(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
if(argc == 1)
|
if(argc == 1)
|
||||||
{
|
{
|
||||||
char* new_argv[] = { "toit", "0" };
|
const char* new_argv[] = { "toit", "0" };
|
||||||
return cbDebugConditionalTrace(cbTraceOverIntoTraceRecordStep, true, 2, new_argv);
|
return cbDebugConditionalTrace(cbTraceOverIntoTraceRecordStep, true, 2, (char**)new_argv);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return cbDebugConditionalTrace(cbTraceOverIntoTraceRecordStep, true, argc, argv);
|
return cbDebugConditionalTrace(cbTraceOverIntoTraceRecordStep, true, argc, argv);
|
||||||
|
@ -126,8 +126,8 @@ bool cbDebugRunToParty(int argc, char* argv[])
|
||||||
|
|
||||||
bool cbDebugRunToUserCode(int argc, char* argv[])
|
bool cbDebugRunToUserCode(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
char* newargv[] = { "RunToParty", "0" };
|
const char* newargv[] = { "RunToParty", "0" };
|
||||||
return cbDebugRunToParty(2, newargv);
|
return cbDebugRunToParty(2, (char**)newargv);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cbDebugTraceSetLog(int argc, char* argv[])
|
bool cbDebugTraceSetLog(int argc, char* argv[])
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "jit.h"
|
#include "jit.h"
|
||||||
|
|
||||||
static bool readwritejitkey(wchar_t* jit_key_value, DWORD* jit_key_vale_size, char* key, arch arch_in, arch* arch_out, readwritejitkey_error_t* error, bool write)
|
static bool readwritejitkey(const wchar_t* jit_key_value, DWORD* jit_key_vale_size, const char* key, arch arch_in, arch* arch_out, readwritejitkey_error_t* error, bool write)
|
||||||
{
|
{
|
||||||
DWORD key_flags;
|
DWORD key_flags;
|
||||||
DWORD lRv;
|
DWORD lRv;
|
||||||
|
@ -62,7 +62,7 @@ static bool readwritejitkey(wchar_t* jit_key_value, DWORD* jit_key_vale_size, ch
|
||||||
if(lRv != ERROR_SUCCESS)
|
if(lRv != ERROR_SUCCESS)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
lRv = RegSetValueExW(hKey, StringUtils::Utf8ToUtf16(key).c_str(), 0, REG_SZ, (BYTE*)jit_key_value, (DWORD)(*jit_key_vale_size) + 1);
|
lRv = RegSetValueExW(hKey, StringUtils::Utf8ToUtf16(key).c_str(), 0, REG_SZ, (const BYTE*)jit_key_value, (DWORD)(*jit_key_vale_size) + 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -161,7 +161,7 @@ bool dbggetdefjit(char* jit_entry)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool dbgsetjit(char* jit_cmd, arch arch_in, arch* arch_out, readwritejitkey_error_t* rw_error_out)
|
bool dbgsetjit(const char* jit_cmd, arch arch_in, arch* arch_out, readwritejitkey_error_t* rw_error_out)
|
||||||
{
|
{
|
||||||
DWORD jit_cmd_size = (DWORD)strlen(jit_cmd) * sizeof(wchar_t);
|
DWORD jit_cmd_size = (DWORD)strlen(jit_cmd) * sizeof(wchar_t);
|
||||||
readwritejitkey_error_t rw_error;
|
readwritejitkey_error_t rw_error;
|
||||||
|
|
|
@ -25,7 +25,7 @@ enum arch
|
||||||
};
|
};
|
||||||
|
|
||||||
bool dbggetjit(char jit_entry[JIT_ENTRY_MAX_SIZE], arch arch_in, arch* arch_out, readwritejitkey_error_t* rw_error_out);
|
bool dbggetjit(char jit_entry[JIT_ENTRY_MAX_SIZE], arch arch_in, arch* arch_out, readwritejitkey_error_t* rw_error_out);
|
||||||
bool dbgsetjit(char* jit_cmd, arch arch_in, arch* arch_out, readwritejitkey_error_t* rw_error_out);
|
bool dbgsetjit(const char* jit_cmd, arch arch_in, arch* arch_out, readwritejitkey_error_t* rw_error_out);
|
||||||
bool dbggetjitauto(bool* auto_on, arch arch_in, arch* arch_out, readwritejitkey_error_t* rw_error_out);
|
bool dbggetjitauto(bool* auto_on, arch arch_in, arch* arch_out, readwritejitkey_error_t* rw_error_out);
|
||||||
bool dbgsetjitauto(bool auto_on, arch arch_in, arch* arch_out, readwritejitkey_error_t* rw_error_out);
|
bool dbgsetjitauto(bool auto_on, arch arch_in, arch* arch_out, readwritejitkey_error_t* rw_error_out);
|
||||||
bool dbggetdefjit(char* jit_entry);
|
bool dbggetdefjit(char* jit_entry);
|
||||||
|
|
|
@ -211,8 +211,8 @@ bool SymbolSourceDIA::loadSymbolsAsync()
|
||||||
SymbolInfo & sym = _symData[addrIndex.index];
|
SymbolInfo & sym = _symData[addrIndex.index];
|
||||||
if(prev && sym.rva == prev->rva && sym.decoratedName == prev->decoratedName && sym.undecoratedName == prev->undecoratedName)
|
if(prev && sym.rva == prev->rva && sym.decoratedName == prev->decoratedName && sym.undecoratedName == prev->undecoratedName)
|
||||||
{
|
{
|
||||||
sym.decoratedName.swap(String());
|
String().swap(sym.decoratedName);
|
||||||
sym.undecoratedName.swap(String());
|
String().swap(sym.undecoratedName);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
prev = &sym;
|
prev = &sym;
|
||||||
|
@ -467,7 +467,7 @@ bool SymbolSourceDIA::findSymbolExactOrLower(duint rva, SymbolInfo & symInfo)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SymbolSourceDIA::enumSymbols(const CbEnumSymbol & cbEnum)
|
void SymbolSourceDIA::enumSymbols(const CbEnumSymbol & cbEnum)
|
||||||
|
|
|
@ -322,7 +322,7 @@ static bool isregister(const char* string)
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
char* name;
|
const char* name;
|
||||||
unsigned int flag;
|
unsigned int flag;
|
||||||
|
|
||||||
} FLAG_NAME_VALUE_TABLE_t;
|
} FLAG_NAME_VALUE_TABLE_t;
|
||||||
|
|
Loading…
Reference in New Issue