diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2022-01-20 16:02:21 -0500 |
|---|---|---|
| committer | Rusty Wagner <rusty.wagner@gmail.com> | 2022-01-20 16:02:21 -0500 |
| commit | a0181651c332a9f9fa586dfb10f628eea16a8428 (patch) | |
| tree | 03a281aabd1bacae5365963703106830759c0ecb /python | |
| parent | 5e98f8607c6d8ccd17601d00a479c8ce3dc35890 (diff) | |
Move generator fake architecture into core
Diffstat (limited to 'python')
| -rw-r--r-- | python/generator.cpp | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/python/generator.cpp b/python/generator.cpp index 2f277cd8..135bc958 100644 --- a/python/generator.cpp +++ b/python/generator.cpp @@ -26,35 +26,6 @@ using namespace BinaryNinja; using namespace std; -class GeneratorArchitecture: public Architecture -{ -public: - GeneratorArchitecture(): Architecture("generator") - { - } - - virtual bool GetInstructionInfo(const uint8_t*, uint64_t, size_t, InstructionInfo&) override - { - return false; - } - - virtual bool GetInstructionText(const uint8_t*, uint64_t, size_t&, vector<InstructionTextToken>&) override - { - return false; - } - - virtual BNEndianness GetEndianness() const override - { - return LittleEndian; - } - - virtual size_t GetAddressSize() const override - { - return 8; - } -}; - - map<string, string> g_pythonKeywordReplacements = { {"False", "False_"}, {"True", "True_"}, @@ -264,18 +235,10 @@ int main(int argc, char* argv[]) return 1; } - Architecture::Register(new GeneratorArchitecture()); - // Parse API header to get type and function information map<QualifiedName, Ref<Type>> types, vars, funcs; string errors; - auto arch = Architecture::GetByName("generator"); - if (!arch) - { - printf("ERROR: License file validation failed (most likely)\n"); - return 1; - } - + auto arch = new CoreArchitecture(BNGetNativeTypeParserArchitecture()); bool ok = arch->GetStandalonePlatform()->ParseTypesFromSourceFile(argv[1], types, vars, funcs, errors); fprintf(stderr, "Errors: %s\n", errors.c_str()); if (!ok) |
