diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d096767b..b345e9596 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -324,9 +324,15 @@ endif() if(USE_CLI_DEBUGGER) list(APPEND FEATURES CLI_DEBUGGER) - list(APPEND DEBUGGER_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/debugger/cli-debugger.c) - list(APPEND DEBUGGER_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/debugger/parser.c) - list(APPEND DEBUGGER_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/gba/extra/cli.c) + list(APPEND FEATURE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/debugger/cli-debugger.c) + list(APPEND FEATURE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/debugger/parser.c) + if(M_CORE_GBA) + list(APPEND FEATURE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/arm/debugger/cli-debugger.c) + list(APPEND FEATURE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/gba/extra/cli.c) + endif() + if(M_CORE_GB) + list(APPEND FEATURE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/lr35902/debugger/cli-debugger.c) + endif() include_directories(AFTER ${LIBEDIT_INCLUDE_DIRS}) link_directories(${LIBEDIT_LIBRARY_DIRS}) set(DEBUGGER_LIB ${LIBEDIT_LIBRARIES}) @@ -337,9 +343,9 @@ endif() if(USE_GDB_STUB) list(APPEND FEATURES GDB_STUB) - list(APPEND DEBUGGER_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/debugger/gdb-stub.c) + list(APPEND FEATURE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/debugger/gdb-stub.c) endif() -source_group("ARM debugger" FILES ${DEBUGGER_SRC}) +source_group("Debugger" FILES ${DEBUGGER_SRC}) if(USE_FFMPEG) list(APPEND FEATURES FFMPEG) @@ -492,6 +498,7 @@ if(M_CORE_GB) add_definitions(-DM_CORE_GB) list(APPEND CORE_SRC ${LR35902_SRC} + ${CMAKE_CURRENT_SOURCE_DIR}/src/lr35902/debugger/debugger.c ${GB_SRC} ${GB_RENDERER_SRC}) endif() @@ -500,9 +507,10 @@ if(M_CORE_GBA) add_definitions(-DM_CORE_GBA) list(APPEND CORE_SRC ${ARM_SRC} + ${CMAKE_CURRENT_SOURCE_DIR}/src/arm/debugger/debugger.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/arm/debugger/memory-debugger.c ${GBA_SRC} ${GBA_CHEATS_SRC} - ${DEBUGGER_SRC} ${GBA_RENDERER_SRC}) if(NOT M_CORE_GB) list(APPEND CORE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/gb/audio.c) @@ -530,6 +538,7 @@ endif() list(APPEND CORE_SRC ${UTIL_SRC} ${CORE_VFS_SRC} + ${DEBUGGER_SRC} ${OS_SRC} ${THIRD_PARTY_SRC}) diff --git a/src/arm/cli-debugger.c b/src/arm/debugger/cli-debugger.c similarity index 99% rename from src/arm/cli-debugger.c rename to src/arm/debugger/cli-debugger.c index a3053be49..0d90893cb 100644 --- a/src/arm/cli-debugger.c +++ b/src/arm/debugger/cli-debugger.c @@ -6,7 +6,7 @@ #include "cli-debugger.h" #ifdef USE_CLI_DEBUGGER -#include "arm/memory-debugger.h" +#include "arm/debugger/memory-debugger.h" #include "arm/decoder.h" #include "core/core.h" #include "debugger/cli-debugger.h" diff --git a/src/arm/cli-debugger.h b/src/arm/debugger/cli-debugger.h similarity index 100% rename from src/arm/cli-debugger.h rename to src/arm/debugger/cli-debugger.h diff --git a/src/arm/debugger.c b/src/arm/debugger/debugger.c similarity index 99% rename from src/arm/debugger.c rename to src/arm/debugger/debugger.c index 616500018..8320ea05c 100644 --- a/src/arm/debugger.c +++ b/src/arm/debugger/debugger.c @@ -7,7 +7,7 @@ #include "arm/arm.h" #include "arm/isa-inlines.h" -#include "arm/memory-debugger.h" +#include "arm/debugger/memory-debugger.h" #include "core/core.h" DEFINE_VECTOR(ARMDebugBreakpointList, struct ARMDebugBreakpoint); diff --git a/src/arm/debugger.h b/src/arm/debugger/debugger.h similarity index 100% rename from src/arm/debugger.h rename to src/arm/debugger/debugger.h diff --git a/src/arm/memory-debugger.c b/src/arm/debugger/memory-debugger.c similarity index 99% rename from src/arm/memory-debugger.c rename to src/arm/debugger/memory-debugger.c index 5ce24b8bc..2844af5e6 100644 --- a/src/arm/memory-debugger.c +++ b/src/arm/debugger/memory-debugger.c @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "memory-debugger.h" -#include "arm/debugger.h" +#include "arm/debugger/debugger.h" #include "util/math.h" diff --git a/src/arm/memory-debugger.h b/src/arm/debugger/memory-debugger.h similarity index 100% rename from src/arm/memory-debugger.h rename to src/arm/debugger/memory-debugger.h diff --git a/src/gb/cli.c b/src/gb/cli.c index 38ffdca8a..1c3debbf7 100644 --- a/src/gb/cli.c +++ b/src/gb/cli.c @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "cli.h" -#include "lr35902/cli-debugger.h" +#include "lr35902/debugger/cli-debugger.h" #ifdef USE_CLI_DEBUGGER diff --git a/src/gb/core.c b/src/gb/core.c index 531408711..26f30eb7e 100644 --- a/src/gb/core.c +++ b/src/gb/core.c @@ -9,7 +9,7 @@ #include "gb/cli.h" #include "gb/gb.h" #include "gb/renderers/software.h" -#include "lr35902/debugger.h" +#include "lr35902/debugger/debugger.h" #include "util/memory.h" #include "util/patch.h" diff --git a/src/gba/extra/cli.c b/src/gba/extra/cli.c index 39b8f7f49..d4110f98b 100644 --- a/src/gba/extra/cli.c +++ b/src/gba/extra/cli.c @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "cli.h" -#include "arm/cli-debugger.h" +#include "arm/debugger/cli-debugger.h" #include "gba/io.h" #include "gba/serialize.h" diff --git a/src/gba/gba.c b/src/gba/gba.c index cde2144b9..bd50d3706 100644 --- a/src/gba/gba.c +++ b/src/gba/gba.c @@ -8,6 +8,7 @@ #include "core/thread.h" #include "arm/decoder.h" +#include "arm/debugger/debugger.h" #include "arm/isa-inlines.h" #include "gba/bios.h" diff --git a/src/gba/gba.h b/src/gba/gba.h index 6e856b80e..207bb11fb 100644 --- a/src/gba/gba.h +++ b/src/gba/gba.h @@ -9,7 +9,6 @@ #include "util/common.h" #include "arm/arm.h" -#include "arm/debugger.h" #include "core/log.h" #include "gba/interface.h" diff --git a/src/lr35902/cli-debugger.c b/src/lr35902/debugger/cli-debugger.c similarity index 100% rename from src/lr35902/cli-debugger.c rename to src/lr35902/debugger/cli-debugger.c diff --git a/src/lr35902/cli-debugger.h b/src/lr35902/debugger/cli-debugger.h similarity index 100% rename from src/lr35902/cli-debugger.h rename to src/lr35902/debugger/cli-debugger.h diff --git a/src/lr35902/debugger.c b/src/lr35902/debugger/debugger.c similarity index 100% rename from src/lr35902/debugger.c rename to src/lr35902/debugger/debugger.c diff --git a/src/lr35902/debugger.h b/src/lr35902/debugger/debugger.h similarity index 100% rename from src/lr35902/debugger.h rename to src/lr35902/debugger/debugger.h