DBG: resolved issue #204
This commit is contained in:
parent
43554d4db6
commit
10ef4a841f
|
@ -274,8 +274,12 @@ extern "C" DLL_EXPORT const char* _dbg_dbginit()
|
|||
strcpy_s(dbbasepath, dir); //debug directory
|
||||
strcat_s(dbbasepath, "\\db");
|
||||
CreateDirectoryW(StringUtils::Utf8ToUtf16(dbbasepath).c_str(), 0); //create database directory
|
||||
strcpy_s(szSymbolCachePath, dir);
|
||||
strcat_s(szSymbolCachePath, "\\symbols");
|
||||
if(!BridgeSettingGet("Symbols", "CachePath", szSymbolCachePath))
|
||||
{
|
||||
strcpy_s(szSymbolCachePath, dir);
|
||||
strcat_s(szSymbolCachePath, "\\symbols");
|
||||
BridgeSettingSet("Symbols", "CachePath", szSymbolCachePath);
|
||||
}
|
||||
SetCurrentDirectoryW(StringUtils::Utf8ToUtf16(dir).c_str());
|
||||
dputs("Allocating message stack...");
|
||||
gMsgStack = MsgAllocStack();
|
||||
|
|
|
@ -211,9 +211,22 @@ void SettingsDialog::LoadSettings()
|
|||
{
|
||||
ui->chkSetJIT->setDisabled(true);
|
||||
ui->chkConfirmBeforeAtt->setDisabled(true);
|
||||
ui->lbladminwarning->setText(QString("Warning: Run the debugger as Admin to enable JIT."));
|
||||
ui->lblAdminWarning->setText(QString("<font color=\"red\"><b>Warning</b></font>: Run the debugger as Admin to enable JIT."));
|
||||
}
|
||||
else
|
||||
ui->lblAdminWarning->setText("");
|
||||
}
|
||||
char setting[MAX_SETTING_SIZE] = "";
|
||||
if(BridgeSettingGet("Symbols", "DefaultStore", setting))
|
||||
ui->editSymbolStore->setText(QString(setting));
|
||||
else
|
||||
{
|
||||
QString defaultStore = "http://msdl.microsoft.com/download/symbols";
|
||||
ui->editSymbolStore->setText(defaultStore);
|
||||
BridgeSettingSet("Symbols", "DefaultStore", defaultStore.toUtf8().constData());
|
||||
}
|
||||
if(BridgeSettingGet("Symbols", "CachePath", setting))
|
||||
ui->editSymbolCache->setText(QString(setting));
|
||||
|
||||
bJitOld = settings.miscSetJIT;
|
||||
bJitAutoOld = settings.miscSetJITAuto;
|
||||
|
@ -279,6 +292,10 @@ void SettingsDialog::SaveSettings()
|
|||
DbgCmdExecDirect("setjitauto off");
|
||||
}
|
||||
}
|
||||
if(settings.miscSymbolStore)
|
||||
BridgeSettingSet("Symbols", "DefaultStore", ui->editSymbolStore->text().toUtf8().constData());
|
||||
if(settings.miscSymbolCache)
|
||||
BridgeSettingSet("Symbols", "CachePath", ui->editSymbolCache->text().toUtf8().constData());
|
||||
|
||||
Config()->load();
|
||||
DbgSettingsUpdated();
|
||||
|
@ -594,3 +611,13 @@ void SettingsDialog::on_chkTabBetweenMnemonicAndArguments_stateChanged(int arg1)
|
|||
{
|
||||
settings.disasmTabBetweenMnemonicAndArguments = arg1 == Qt::Checked;
|
||||
}
|
||||
|
||||
void SettingsDialog::on_editSymbolStore_textEdited(const QString & arg1)
|
||||
{
|
||||
settings.miscSymbolStore = true;
|
||||
}
|
||||
|
||||
void SettingsDialog::on_editSymbolCache_textEdited(const QString & arg1)
|
||||
{
|
||||
settings.miscSymbolCache = true;
|
||||
}
|
||||
|
|
|
@ -59,6 +59,8 @@ private slots:
|
|||
//Misc tab
|
||||
void on_chkSetJIT_stateChanged(int arg1);
|
||||
void on_chkConfirmBeforeAtt_stateChanged(int arg1);
|
||||
void on_editSymbolStore_textEdited(const QString & arg1);
|
||||
void on_editSymbolCache_textEdited(const QString & arg1);
|
||||
|
||||
private:
|
||||
//enums
|
||||
|
@ -123,6 +125,8 @@ private:
|
|||
//Misc Tab
|
||||
bool miscSetJIT;
|
||||
bool miscSetJITAuto;
|
||||
bool miscSymbolStore;
|
||||
bool miscSymbolCache;
|
||||
};
|
||||
|
||||
//variables
|
||||
|
|
|
@ -426,60 +426,89 @@
|
|||
<attribute name="title">
|
||||
<string>Misc</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkSetJIT">
|
||||
<property name="text">
|
||||
<string>Set x64dbg as Just In Time Debugger</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>JIT:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="editJIT">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkConfirmBeforeAtt">
|
||||
<property name="text">
|
||||
<string>Confirm before attaching</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lbladminwarning">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>11</x>
|
||||
<y>13</y>
|
||||
<width>341</width>
|
||||
<height>145</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Symbol Store:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Symbol Path:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="editSymbolStore"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="editSymbolCache"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkSetJIT">
|
||||
<property name="text">
|
||||
<string>Set x64dbg as Just In Time Debugger</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>JIT:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="editJIT">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkConfirmBeforeAtt">
|
||||
<property name="text">
|
||||
<string>Confirm before attaching</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lblAdminWarning">
|
||||
<property name="text">
|
||||
<string><font color="red">DIE SCUM!</font></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "StatusLabel.h"
|
||||
#include <QTextDocument>
|
||||
|
||||
StatusLabel::StatusLabel(QStatusBar* parent) : QLabel(parent)
|
||||
{
|
||||
|
@ -55,8 +56,8 @@ void StatusLabel::logUpdate(QString message)
|
|||
//only show the last line in the status label
|
||||
QStringList lineList = labelText.split(QChar('\n'), QString::SkipEmptyParts);
|
||||
if(lineList.size())
|
||||
setText(lineList[lineList.length() - 1]);
|
||||
setText(Qt::convertFromPlainText(lineList[lineList.length() - 1]));
|
||||
else
|
||||
setText(labelText);
|
||||
setText(Qt::convertFromPlainText(labelText));
|
||||
this->repaint();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue