1
0
Fork 0

Fix formatting vaddps ymm0,ymm0,ymm0; Fix goto index 0 in trace

This commit is contained in:
torusrxxx 2020-06-03 16:01:44 +08:00 committed by Duncan Ogilvie
parent 4f46db22a9
commit 5589c7e769
4 changed files with 6 additions and 4 deletions

View File

@ -102,6 +102,7 @@ static QString formatSSEOperand(const QByteArray & data, uint8_t vectorType)
if(data.size() == 32)
{
hex = composeRegTextYMM(data.constData(), 1);
isXMMdecoded = true;
}
else if(data.size() == 16)
{

View File

@ -341,7 +341,7 @@ NotDebuggingLabel:
unsigned char opcodes[16];
int opcodeSize = 0;
mTraceFile->OpCode(index, opcodes, &opcodeSize);
Instruction_t inst = mDisasm->DisassembleAt(opcodes, opcodeSize, 0, mTraceFile->Registers(index).regcontext.cip, false);
Instruction_t inst = mDisasm->DisassembleAt(opcodes, opcodeSize, 0, cur_addr, false);
RichTextPainter::paintRichText(painter, x, y, getColumnWidth(col), getRowHeight(), 4, getRichBytes(inst), mFontMetrics);
return "";
}
@ -353,7 +353,7 @@ NotDebuggingLabel:
int opcodeSize = 0;
mTraceFile->OpCode(index, opcodes, &opcodeSize);
Instruction_t inst = mDisasm->DisassembleAt(opcodes, opcodeSize, 0, mTraceFile->Registers(index).regcontext.cip, false);
Instruction_t inst = mDisasm->DisassembleAt(opcodes, opcodeSize, 0, cur_addr, false);
if(mHighlightToken.text.length())
ZydisTokenizer::TokenToRichText(inst.tokens, richText, &mHighlightToken);
@ -1117,7 +1117,7 @@ void TraceBrowser::gotoSlot()
if(gotoDlg.exec() == QDialog::Accepted)
{
auto val = DbgValFromString(gotoDlg.expressionText.toUtf8().constData());
if(val > 0 && val < mTraceFile->Length())
if(val >= 0 && val < mTraceFile->Length())
{
setSingleSelection(val);
makeVisible(val);

View File

@ -145,6 +145,7 @@ void TraceFileReader::OpCode(unsigned long long index, unsigned char* buffer, in
if(page == nullptr)
{
memset(buffer, 0, 16);
*opcodeSize = 0;
return;
}
else

View File

@ -172,7 +172,7 @@ QString composeRegTextXMM(const char* value, int mode)
QString composeRegTextYMM(const char* value, int mode)
{
bool bFpuRegistersLittleEndian = ConfigBool("Gui", "FpuRegistersLittleEndian");
if(ConfigUint("Gui", "SIMDRegistersDisplayMode") == 0)
if(mode == 0)
return fillValue(value, 32, bFpuRegistersLittleEndian);
else if(bFpuRegistersLittleEndian)
return composeRegTextXMM(value, mode) + ' ' + composeRegTextXMM(value + 16, mode);