cutter/src/AnalTask.h

69 lines
1.1 KiB
C
Raw Normal View History

#ifndef ANALTHREAD_H
#define ANALTHREAD_H
2018-05-26 18:09:20 +00:00
#include "utils/AsyncTask.h"
#include "Cutter.h"
2017-09-25 12:55:41 +00:00
class CutterCore;
class MainWindow;
class OptionsDialog;
struct InitialOptions
{
enum class Endianness { Auto, Little, Big };
QString filename;
bool useVA = true;
RVA binLoadAddr = RVA_INVALID;
RVA mapAddr = RVA_INVALID;
QString arch;
QString cpu;
int bits = 0;
QString os;
Endianness endian;
bool writeEnabled = false;
bool loadBinInfo = true;
QString forceBinPlugin;
bool demangle = true;
QString pdbFile;
QString script;
int bbsize = 0;
int analLevel = 1;
QList<QString> analAdvanced;
};
2018-05-26 18:09:20 +00:00
class AnalTask : public AsyncTask
{
2017-04-09 19:55:06 +00:00
Q_OBJECT
2018-05-26 18:09:20 +00:00
public:
explicit AnalTask(QObject *parent = nullptr);
2018-05-26 18:09:20 +00:00
~AnalTask();
QString getTitle() override { return tr("Initial Analysis"); }
void setOptions(const InitialOptions &options) { this->options = options; }
2018-05-26 18:09:20 +00:00
void interrupt() override;
void interruptAndWait();
protected:
2018-05-26 18:49:57 +00:00
void runTask() override;
signals:
void openFileFailed();
private:
InitialOptions options;
};
#endif // ANALTHREAD_H