mirror of
https://github.com/x64dbg/x64dbg.git
synced 2025-02-25 15:42:29 +00:00
Allow go to while not debugging in trace
This commit is contained in:
parent
5dda6eb13a
commit
79830fd093
@ -6,11 +6,12 @@
|
||||
#include "QCompleter"
|
||||
#include "SymbolAutoCompleteModel.h"
|
||||
|
||||
GotoDialog::GotoDialog(QWidget* parent, bool allowInvalidExpression, bool allowInvalidAddress)
|
||||
GotoDialog::GotoDialog(QWidget* parent, bool allowInvalidExpression, bool allowInvalidAddress, bool allowNotDebugging)
|
||||
: QDialog(parent),
|
||||
ui(new Ui::GotoDialog),
|
||||
allowInvalidExpression(allowInvalidExpression),
|
||||
allowInvalidAddress(allowInvalidAddress || allowInvalidExpression)
|
||||
allowInvalidAddress(allowInvalidAddress || allowInvalidExpression),
|
||||
allowNotDebugging(allowNotDebugging)
|
||||
{
|
||||
//setup UI first
|
||||
ui->setupUi(this);
|
||||
@ -18,7 +19,7 @@ GotoDialog::GotoDialog(QWidget* parent, bool allowInvalidExpression, bool allowI
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
|
||||
|
||||
//initialize stuff
|
||||
if(!DbgIsDebugging()) //not debugging
|
||||
if(!allowNotDebugging && !DbgIsDebugging()) //not debugging
|
||||
ui->labelError->setText(tr("<font color='red'><b>Not debugging...</b></font>"));
|
||||
else
|
||||
ui->labelError->setText(tr("<font color='red'><b>Invalid expression...</b></font>"));
|
||||
@ -105,7 +106,7 @@ void GotoDialog::expressionChanged(bool validExpression, bool validPointer, dsin
|
||||
}
|
||||
if(expressionText == expression)
|
||||
return;
|
||||
if(!DbgIsDebugging()) //not debugging
|
||||
if(!allowNotDebugging && !DbgIsDebugging()) //not debugging
|
||||
{
|
||||
ui->labelError->setText(tr("<font color='red'><b>Not debugging...</b></font>"));
|
||||
setOkEnabled(false);
|
||||
|
@ -16,7 +16,7 @@ class GotoDialog : public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit GotoDialog(QWidget* parent = 0, bool allowInvalidExpression = false, bool allowInvalidAddress = false);
|
||||
explicit GotoDialog(QWidget* parent = 0, bool allowInvalidExpression = false, bool allowInvalidAddress = false, bool allowNotDebugging = false);
|
||||
~GotoDialog();
|
||||
QString expressionText;
|
||||
duint validRangeStart;
|
||||
@ -25,6 +25,7 @@ public:
|
||||
QString modName;
|
||||
bool allowInvalidExpression;
|
||||
bool allowInvalidAddress;
|
||||
bool allowNotDebugging;
|
||||
void showEvent(QShowEvent* event);
|
||||
void hideEvent(QHideEvent* event);
|
||||
void validateExpression(QString expression);
|
||||
|
@ -1411,7 +1411,7 @@ void TraceBrowser::gotoSlot()
|
||||
{
|
||||
if(mTraceFile == nullptr || mTraceFile->Progress() < 100)
|
||||
return;
|
||||
GotoDialog gotoDlg(this, false, true); // TODO: Cannot use when not debugging
|
||||
GotoDialog gotoDlg(this, false, true, true);
|
||||
if(gotoDlg.exec() == QDialog::Accepted)
|
||||
{
|
||||
auto val = DbgValFromString(gotoDlg.expressionText.toUtf8().constData());
|
||||
|
Loading…
x
Reference in New Issue
Block a user