all repos — mgba @ 0870c98c6c285fdafd43f1e5293c9b65972db7a7

mGBA Game Boy Advance Emulator

Debugger: Fix debug build on Windows
Jeffrey Pfau jeffrey@endrift.com
Mon, 31 Oct 2016 11:36:04 -0700
commit

0870c98c6c285fdafd43f1e5293c9b65972db7a7

parent

c549db69f1774b4b06edb3b555b53c682ec43a49

1 files changed, 5 insertions(+), 3 deletions(-)

jump to
M src/debugger/cli-debugger.csrc/debugger/cli-debugger.c

@@ -10,7 +10,9 @@ #include "core/version.h"

#include "debugger/parser.h" #include "util/string.h" +#if !defined(NDEBUG) && !defined(_WIN32) #include <signal.h> +#endif #ifdef USE_PTHREADS #include <pthread.h>

@@ -19,7 +21,7 @@

const char* ERROR_MISSING_ARGS = "Arguments missing"; // TODO: share const char* ERROR_OVERFLOW = "Arguments overflow"; -#ifndef NDEBUG +#if !defined(NDEBUG) && !defined(_WIN32) static void _breakInto(struct CLIDebugger*, struct CLIDebugVector*); #endif static void _continue(struct CLIDebugger*, struct CLIDebugVector*);

@@ -82,13 +84,13 @@ { "watch", _setWatchpoint, CLIDVParse, "Set a watchpoint" },

{ "x/1", _dumpByte, CLIDVParse, "Examine bytes at a specified offset" }, { "x/2", _dumpHalfword, CLIDVParse, "Examine halfwords at a specified offset" }, { "x/4", _dumpWord, CLIDVParse, "Examine words at a specified offset" }, -#ifndef NDEBUG +#if !defined(NDEBUG) && !defined(_WIN32) { "!", _breakInto, 0, "Break into attached debugger (for developers)" }, #endif { 0, 0, 0, 0 } }; -#ifndef NDEBUG +#if !defined(NDEBUG) && !defined(_WIN32) static void _handleDeath(int sig) { UNUSED(sig); printf("No debugger attached!\n");