fix windows CI (disable gdb stub)
This commit is contained in:
@@ -61,28 +61,10 @@ file(REMOVE
|
|||||||
${PROJECT_BINARY_DIR}/resources/shader.frag
|
${PROJECT_BINARY_DIR}/resources/shader.frag
|
||||||
${PROJECT_BINARY_DIR}/resources/shader.vert)
|
${PROJECT_BINARY_DIR}/resources/shader.vert)
|
||||||
|
|
||||||
|
target_link_libraries(gadolinium PUBLIC frontend frontend-imgui
|
||||||
|
discord-rpc imgui nfd parallel-rdp backend fmt::fmt nlohmann_json::nlohmann_json core dynarec registers interpreter mmio rsp SDL2::SDL2main SDL2::SDL2)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_compile_definitions(gadolinium PUBLIC NOMINMAX _CRT_SECURE_NO_WARNINGS)
|
target_compile_definitions(gadolinium PUBLIC NOMINMAX _CRT_SECURE_NO_WARNINGS)
|
||||||
target_compile_options(gadolinium PUBLIC /EHa)
|
target_compile_options(gadolinium PUBLIC /EHa)
|
||||||
target_link_libraries(gadolinium PUBLIC ws2_32)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${CMAKE_BUILD_TYPE} MATCHES Release)
|
|
||||||
set_property(TARGET gadolinium PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
|
|
||||||
if(WIN32)
|
|
||||||
target_compile_options(gadolinium PRIVATE /O2)
|
|
||||||
else()
|
|
||||||
target_compile_options(gadolinium PRIVATE -O3)
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
if(WIN32)
|
|
||||||
target_compile_options(gadolinium PRIVATE /Od)
|
|
||||||
else()
|
|
||||||
#target_compile_options(gadolinium PRIVATE -fsanitize=address)
|
|
||||||
#target_link_options(gadolinium PRIVATE -fsanitize=address)
|
|
||||||
target_compile_options(gadolinium PRIVATE -g)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_link_libraries(gadolinium PUBLIC SDL2::SDL2main SDL2::SDL2 frontend frontend-imgui
|
|
||||||
discord-rpc imgui nfd parallel-rdp backend fmt::fmt nlohmann_json::nlohmann_json core dynarec registers interpreter mmio rsp)
|
|
||||||
@@ -2,3 +2,7 @@ file(GLOB SOURCES *.cpp)
|
|||||||
file(GLOB HEADERS *.hpp)
|
file(GLOB HEADERS *.hpp)
|
||||||
|
|
||||||
add_library(backend ${SOURCES} ${HEADERS})
|
add_library(backend ${SOURCES} ${HEADERS})
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
target_compile_definitions(backend PUBLIC DISABLE_GDB_STUB)
|
||||||
|
endif()
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
#include <backend/core/Dynarec.hpp>
|
#include <backend/core/Dynarec.hpp>
|
||||||
#include <backend/core/registers/Registers.hpp>
|
#include <backend/core/registers/Registers.hpp>
|
||||||
#include <Debugger.hpp>
|
#include <Debugger.hpp>
|
||||||
#include <SDL_timer.h>
|
#include <SDL2/SDL_timer.h>
|
||||||
|
|
||||||
struct Window;
|
struct Window;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
#include <Debugger.hpp>
|
#include <Debugger.hpp>
|
||||||
|
|
||||||
|
#ifndef DISABLE_GDB_STUB
|
||||||
#define GDBSTUB_IMPLEMENTATION
|
#define GDBSTUB_IMPLEMENTATION
|
||||||
#include <gdbstub.h>
|
#include <gdbstub.h>
|
||||||
#include <log.hpp>
|
#include <log.hpp>
|
||||||
@@ -254,7 +256,7 @@ Debugger::Debugger(n64::Core& core) : core(core) {
|
|||||||
|
|
||||||
gdb = gdbstub_init(config);
|
gdb = gdbstub_init(config);
|
||||||
if (!gdb) {
|
if (!gdb) {
|
||||||
Util::panic("Failed to initialize GDB stub!");
|
Util::panic("Failed to initialize GDB stub!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -272,3 +274,20 @@ void Debugger::breakpointHit() {
|
|||||||
broken = true;
|
broken = true;
|
||||||
gdbstub_breakpoint_hit(gdb);
|
gdbstub_breakpoint_hit(gdb);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
Debugger::Debugger(n64::Core& core) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Debugger::~Debugger() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Debugger::tick() const {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Debugger::breakpointHit() {
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -12,7 +12,9 @@ namespace n64 { struct Core; }
|
|||||||
struct Debugger {
|
struct Debugger {
|
||||||
Debugger(n64::Core& core);
|
Debugger(n64::Core& core);
|
||||||
~Debugger();
|
~Debugger();
|
||||||
bool broken = false, enabled = true;
|
|
||||||
|
bool broken = false, enabled = true;
|
||||||
|
#ifndef DISABLE_GDB_STUB
|
||||||
int steps = 0;
|
int steps = 0;
|
||||||
gdbstub_t* gdb;
|
gdbstub_t* gdb;
|
||||||
Breakpoint* breakpoints = nullptr;
|
Breakpoint* breakpoints = nullptr;
|
||||||
@@ -28,7 +30,9 @@ struct Debugger {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
inline bool checkBreakpoint(u32 address) const { return false; }
|
||||||
|
#endif
|
||||||
void tick() const;
|
void tick() const;
|
||||||
void breakpointHit();
|
void breakpointHit();
|
||||||
};
|
};
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#include <Audio.hpp>
|
#include <Audio.hpp>
|
||||||
#include <SDL_audio.h>
|
#include <SDL2/SDL_audio.h>
|
||||||
#include <log.hpp>
|
#include <log.hpp>
|
||||||
|
|
||||||
namespace n64 {
|
namespace n64 {
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
#include <nfd.hpp>
|
#include <nfd.hpp>
|
||||||
#include <Core.hpp>
|
#include <Core.hpp>
|
||||||
#include <Audio.hpp>
|
#include <Audio.hpp>
|
||||||
#include <SDL.h>
|
#define SDL_MAIN_HANDLED
|
||||||
|
#include <SDL2/SDL.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <Discord.hpp>
|
#include <Discord.hpp>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#define SDL_MAIN_HANDLED
|
|
||||||
#include <ParallelRDPWrapper.hpp>
|
#include <ParallelRDPWrapper.hpp>
|
||||||
#include <imgui.h>
|
#include <imgui.h>
|
||||||
#include <imgui_impl_sdl.h>
|
#include <imgui_impl_sdl.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user