1
0
Fork 0

GUI: formatting + fixed a warning

This commit is contained in:
mrexodia 2017-09-01 14:19:45 +02:00
parent f3132e9315
commit 4104c0a004
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
5 changed files with 11 additions and 17 deletions

View File

@ -126,13 +126,13 @@ void RecursiveAnalysis::analyzeFunction(duint entryPoint)
//consider register/memory branches as terminal nodes
if(mCp[0].type != X86_OP_IMM)
{
//jmp ptr [index * sizeof(duint) + switchTable]
if(mCp[0].type == X86_OP_MEM && mCp[0].mem.base == X86_OP_INVALID && mCp[0].mem.index != X86_OP_INVALID
&& mCp[0].mem.scale == sizeof(duint) && MemIsValidReadPtr(mCp[0].mem.disp))
&& mCp[0].mem.scale == sizeof(duint) && MemIsValidReadPtr(duint(mCp[0].mem.disp)))
{
Memory<duint*> switchTable(512 * sizeof(duint));
duint actualSize;
int index;
MemRead(mCp[0].mem.disp, switchTable(), 512 * sizeof(duint), &actualSize);
duint actualSize, index;
MemRead(duint(mCp[0].mem.disp), switchTable(), 512 * sizeof(duint), &actualSize);
actualSize /= sizeof(duint);
for(index = 0; index < actualSize; index++)
if(MemIsCodePage(switchTable()[index], false) == false)

View File

@ -192,7 +192,7 @@ void BreakpointsView::updateBreakpointsSlot()
{
mExceptionMap.insert({exceptions[i].value, exceptions[i].name});
mExceptionList.append(QString(exceptions[i].name));
mExceptionMaxLength = std::max<int>(mExceptionMaxLength, strlen(exceptions[i].name));
mExceptionMaxLength = std::max(mExceptionMaxLength, int(strlen(exceptions[i].name)));
}
mExceptionList.sort();

View File

@ -12,7 +12,6 @@
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <algorithm>
#include <QMutex>
#include "Bridge.h"
#include "RichTextPainter.h"

View File

@ -212,14 +212,6 @@
</layout>
</item>
</layout>
<zorder>layoutWidget</zorder>
<zorder>paddingLayoutWidget</zorder>
<zorder>layoutWidget</zorder>
<zorder>pagetableWidget</zorder>
<zorder>label</zorder>
<zorder>chkPageguard</zorder>
<zorder>horizontalSpacer</zorder>
<zorder>horizontalSpacer_2</zorder>
</widget>
<tabstops>
<tabstop>pagetableWidget</tabstop>

View File

@ -5,8 +5,6 @@
class VaHistory
{
public:
VaHistory() : mCurrentVa(-1) {}
void addVaToHistory(duint parVa)
{
//truncate everything right from the current VA
@ -20,14 +18,17 @@ public:
mVaHistory.push_back(parVa);
}
}
bool historyHasPrev()
{
return !(!mCurrentVa || !mVaHistory.size()); //we are at the earliest history entry
}
bool historyHasNext()
{
return !(!mVaHistory.size() || mCurrentVa >= mVaHistory.size() - 1); //we are at the newest history entry
}
duint historyPrev()
{
if(!historyHasPrev())
@ -35,6 +36,7 @@ public:
mCurrentVa--;
return mVaHistory.at(mCurrentVa);
}
duint historyNext()
{
if(!historyHasNext())
@ -42,6 +44,7 @@ public:
mCurrentVa++;
return mVaHistory.at(mCurrentVa);
}
void historyClear()
{
mCurrentVa = -1;
@ -50,7 +53,7 @@ public:
private:
std::vector<duint> mVaHistory;
int mCurrentVa;
size_t mCurrentVa = -1;
};
#endif //VAHISTORY_H