cutter/src/AnalTask.h

73 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;
2018-05-27 19:38:19 +00:00
QList<QString> analCmd;
QString shellcode;
};
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:
2018-05-28 14:19:04 +00:00
explicit AnalTask();
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;
bool getOpenFileFailed() { return openFailed; }
protected:
2018-05-26 18:49:57 +00:00
void runTask() override;
signals:
void openFileFailed();
private:
InitialOptions options;
bool openFailed = false;
};
#endif // ANALTHREAD_H