diff --git a/CMakeLists.txt b/CMakeLists.txt index bdb83e8..70291a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,8 +6,8 @@ cmake_minimum_required(VERSION 3.9) add_compile_options(-Wall -pedantic -Wextra) -#add_compile_options(-fsanitize=address) -#add_link_options(-fsanitize=address) +#add_compile_options(-fsanitize=undefined) +#add_link_options(-fsanitize=undefined) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED True) diff --git a/ESP32/platformio.ini b/ESP32/platformio.ini index 6fb61ee..903dbdf 100644 --- a/ESP32/platformio.ini +++ b/ESP32/platformio.ini @@ -17,7 +17,7 @@ board_build.filesystem = littlefs lib_deps = greiman/SdFat@^2.1.2 adafruit/Adafruit NeoPixel bblanchon/ArduinoJson@^6.19.4 -build_flags = -std=gnu++2a -DESP32=1 -ggdb3 -D_GLIBCXX_USE_C99 +build_flags = -std=gnu++2a -DESP32=1 -ggdb3 -D_GLIBCXX_USE_C99 -Wall build_unflags = -std=gnu++11 -std=gnu++17 extra_scripts = pre:prepare.py diff --git a/breakpoint_register.cpp b/breakpoint_register.cpp index 9a94f63..832aef0 100644 --- a/breakpoint_register.cpp +++ b/breakpoint_register.cpp @@ -101,12 +101,12 @@ std::pair > breakpoint_registe else if (key == "PC" || key == "pc") { return { new breakpoint_register(b, 7, values), { } }; } - else if (key.substr(0, 3) == "MMR" or key.substr(0, 3) == "mmr") { + else if (key.substr(0, 3) == "MMR" || key.substr(0, 3) == "mmr") { int which = key[3] - '0'; return { new breakpoint_register(b, hr_mmr0 + which, values), { } }; } - else if (key.substr(0, 3) == "PSW" or key.substr(0, 3) == "psw") { + else if (key.substr(0, 3) == "PSW" || key.substr(0, 3) == "psw") { return { new breakpoint_register(b, hr_psw, values), { } }; } diff --git a/mmu.cpp b/mmu.cpp index 5e42949..17abfe5 100644 --- a/mmu.cpp +++ b/mmu.cpp @@ -9,6 +9,7 @@ mmu::mmu() { + reset(); } mmu::~mmu()