diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-07-02 18:07:37 +0200 |
---|---|---|
committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-07-02 18:07:37 +0200 |
commit | 7262d30e9e689aaacd7926c90d953ab86cd9cfa7 (patch) | |
tree | d2d7fb3515cb548a876f6214d143715a4a9142ff /qtmips_machine | |
parent | 040c1998500d3b0b50b3ddef4fe93216563343a8 (diff) | |
download | qtmips-7262d30e9e689aaacd7926c90d953ab86cd9cfa7.tar.gz qtmips-7262d30e9e689aaacd7926c90d953ab86cd9cfa7.tar.bz2 qtmips-7262d30e9e689aaacd7926c90d953ab86cd9cfa7.zip |
Implement load of sources in emscripten build and minor fixes.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_machine')
-rw-r--r-- | qtmips_machine/qtmipsmachine.cpp | 4 | ||||
-rw-r--r-- | qtmips_machine/qtmipsmachine.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/qtmips_machine/qtmipsmachine.cpp b/qtmips_machine/qtmipsmachine.cpp index 68eeeca..e838429 100644 --- a/qtmips_machine/qtmipsmachine.cpp +++ b/qtmips_machine/qtmipsmachine.cpp @@ -214,7 +214,9 @@ LcdDisplay *QtMipsMachine::peripheral_lcd_display() { return perip_lcd_display; } -const SymbolTable *QtMipsMachine::symbol_table() { +const SymbolTable *QtMipsMachine::symbol_table(bool create) { + if (create && (symtab == nullptr)) + symtab = new SymbolTable; return symtab; } diff --git a/qtmips_machine/qtmipsmachine.h b/qtmips_machine/qtmipsmachine.h index ef96e09..e5bbdb3 100644 --- a/qtmips_machine/qtmipsmachine.h +++ b/qtmips_machine/qtmipsmachine.h @@ -76,7 +76,7 @@ public: SerialPort *serial_port(); PeripSpiLed *peripheral_spi_led(); LcdDisplay *peripheral_lcd_display(); - const SymbolTable *symbol_table(); + const SymbolTable *symbol_table(bool create = false); void set_symbol(QString name, std::uint32_t value, std::uint32_t size, unsigned char info = 0, unsigned char other = 0); const Core *core(); |