2017-03-29 10:18:37 +00:00
|
|
|
#ifndef ANALTHREAD_H
|
|
|
|
#define ANALTHREAD_H
|
|
|
|
|
2018-05-26 18:09:20 +00:00
|
|
|
#include "utils/AsyncTask.h"
|
2018-05-27 16:03:29 +00:00
|
|
|
#include "Cutter.h"
|
2017-03-29 10:18:37 +00:00
|
|
|
|
2017-09-25 12:55:41 +00:00
|
|
|
class CutterCore;
|
2017-09-28 22:04:57 +00:00
|
|
|
class MainWindow;
|
|
|
|
class OptionsDialog;
|
2017-03-29 10:18:37 +00:00
|
|
|
|
2018-05-27 16:03:29 +00:00
|
|
|
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;
|
2018-05-27 16:03:29 +00:00
|
|
|
};
|
|
|
|
|
2018-05-26 18:09:20 +00:00
|
|
|
class AnalTask : public AsyncTask
|
2017-03-29 10:18:37 +00:00
|
|
|
{
|
2017-04-09 19:55:06 +00:00
|
|
|
Q_OBJECT
|
2018-05-26 18:09:20 +00:00
|
|
|
|
2017-03-29 10:18:37 +00:00
|
|
|
public:
|
2018-05-27 16:03:29 +00:00
|
|
|
explicit AnalTask(QObject *parent = nullptr);
|
2018-05-26 18:09:20 +00:00
|
|
|
~AnalTask();
|
2017-03-31 22:43:12 +00:00
|
|
|
|
2018-05-27 16:03:29 +00:00
|
|
|
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;
|
2018-03-09 12:57:57 +00:00
|
|
|
|
2017-03-31 22:43:12 +00:00
|
|
|
protected:
|
2018-05-26 18:49:57 +00:00
|
|
|
void runTask() override;
|
2017-03-29 10:18:37 +00:00
|
|
|
|
2017-09-28 22:04:57 +00:00
|
|
|
signals:
|
2018-05-08 20:44:53 +00:00
|
|
|
void openFileFailed();
|
2017-09-28 22:04:57 +00:00
|
|
|
|
2017-03-31 22:43:12 +00:00
|
|
|
private:
|
2018-05-27 16:03:29 +00:00
|
|
|
InitialOptions options;
|
2017-03-29 10:18:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ANALTHREAD_H
|