Remove GDB because it was broken to begin with

This commit is contained in:
CrashOveride95
2021-04-18 12:29:43 -04:00
parent 4068afb39f
commit 69c5d0cbb1
7 changed files with 4 additions and 1586 deletions

View File

@@ -174,18 +174,6 @@ ifeq ($(UNF),1)
USE_DEBUG := 1
endif
# GDB - whether to use GDB + UNFLoader
# 1 - includes code in ROM
# 0 - does not
GDB ?= 0
$(eval $(call validate-option,GDB,0 1))
ifeq ($(GDB),1)
DEFINES += GDB=1
SRC_DIRS += src/gdb
USE_DEBUG := 1
endif
# ISVPRINT - whether to fake IS-Viewer presence,
# allowing for usage of CEN64 (and possibly Project64) to print messages to terminal.
# 1 - includes code in ROM

View File

@@ -129,7 +129,7 @@ SECTIONS
BUILD_DIR/src/gdb*.o(.text);
BUILD_DIR/src/usb*.o(.text);
BUILD_DIR/src/audio*.o(.text);
#if defined(ISVPRINT) || defined(UNF) || defined(GDB)
#if defined(ISVPRINT) || defined(UNF)
*/libultra_d.a:*.o(.text);
#else
*/libultra_rom.a:*.o(.text);
@@ -146,7 +146,7 @@ SECTIONS
BUILD_DIR/src/gdb*.o(.*data*);
BUILD_DIR/src/usb*.o(.*data*);
BUILD_DIR/src/audio*.o(.*data*);
#if defined(ISVPRINT) || defined(UNF) || defined(GDB)
#if defined(ISVPRINT) || defined(UNF)
*/libultra_d.a:*.o(.*data*);
#else
*/libultra_rom.a:*.o(.*data*);
@@ -162,7 +162,7 @@ SECTIONS
BUILD_DIR/src/gdb*.o(.*rodata*);
BUILD_DIR/src/usb*.o(.rodata*);
BUILD_DIR/src/audio*.o(.rodata*);
#if defined(ISVPRINT) || defined(UNF) || defined(GDB)
#if defined(ISVPRINT) || defined(UNF)
*/libultra_d.a:*.o(.*rodata*);
#else
*/libultra_rom.a:*.o(.*rodata*);
@@ -181,7 +181,7 @@ SECTIONS
BUILD_DIR/src/gdb*.o(.*bss*);
BUILD_DIR/src/usb*.o(.*bss*);
BUILD_DIR/src/audio*.o(.*bss*);
#if defined(ISVPRINT) || defined(UNF) || defined(GDB)
#if defined(ISVPRINT) || defined(UNF)
*/libultra_d.a:*.o(COMMON);
*/libultra_d.a:*.o(.scommon);
*/libultra_d.a:*.o(.*bss*);

View File

@@ -18,9 +18,6 @@
#include "usb/usb.h"
#include "usb/debug.h"
#endif
#ifdef GDB
#include "gdb/debugger.h"
#endif
// Message IDs
#define MESG_SP_COMPLETE 100
@@ -315,10 +312,6 @@ void handle_dp_complete(void) {
extern void crash_screen_init(void);
void thread3_main(UNUSED void *arg) {
#ifdef GDB
OSPiHandle *gdbpihandle;
gdbpihandle = osCartRomInit();
#endif
setup_mesg_queues();
alloc_pool();
load_engine_code_segment();
@@ -338,12 +331,6 @@ OSPiHandle *gdbpihandle;
create_thread(&gGameLoopThread, 5, thread5_game_loop, NULL, gThread5Stack + 0x2000, 10);
osStartThread(&gGameLoopThread);
#ifdef GDB
OSThread* threadPtr = &gMainThread;
gdbInitDebugger(gdbpihandle, &gDmaMesgQueue, &threadPtr, 1);
#endif
while (TRUE) {
OSMesg msg;

File diff suppressed because it is too large Load Diff

View File

@@ -1,60 +0,0 @@
#ifndef __DEBUGGER_H
#define __DEBUGGER_H
#include <ultra64.h>
#include "serial.h"
enum GDBBreakpointType {
GDBBreakpointTypeNone,
GDBBreakpointTypeTemporary,
GDBBreakpointTypeUser,
GDBBreakpointTypeUserUnapplied,
};
struct GDBBreakpoint {
u32 addr;
u32 prevValue;
enum GDBBreakpointType type;
};
#define GDB_MAX_BREAK_POINTS 32
/**
* Initializes the debugger
* @param handler Pi Handler used for DMA, this is return value
* of osCartRomInit
* @param dmaMessageQ The message queue used to coordinate use of
* the DMA. This should be the same message queue used for DMA
* actions in the rest of your program
* @param forThreads an array of threads you want the debugger to
* watch connect to. If a thread isn't included in this array
* it will be ignored by the debugger
* @param forThreadsLen the length of the forThreads array
*/
enum GDBError gdbInitDebugger(OSPiHandle* handler, OSMesgQueue* dmaMessageQ, OSThread** forThreads, u32 forThreadsLen);
enum GDBError gdbCheckForPacket();
/**
* A hard coded breakpoint you can include in compiled code
*/
void gdbBreak();
/**
* Gets the address of the current memory watch point
*/
void* getWatchPoint();
/**
* Sets a watch point. When a thread reads or writes to the given
* address. It will pause in the debugger
* @param addr The address to watch
* @param read a non zero value signals that a thread will break when addr is read
* @param write a non zero value signals that a thread will break when addr is written
*/
void gdbSetWatchPoint(void* addr, int read, int write);
/**
* Removes the current watch point this is the same as doing gdbSetWatchPoint(0, 0, 0)
*/
void gdbClearWatchPoint();
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,44 +0,0 @@
#ifndef __SERIAL_H
#define __SERIAL_H
#include <ultra64.h>
//#define USE_UNF_LOADER 1
enum GDBError {
GDBErrorNone,
GDBErrorUSBTimeout,
GDBErrorUSBNoData,
GDBErrorBadPacket,
GDBErrorMessageTooLong,
GDBErrorBadFooter,
GDBErrorDMA,
GDBErrorBufferTooSmall,
};
enum GDBDataType {
GDBDataTypeNone,
GDBDataTypeText,
GDBDataTypeRawBinary,
GDBDataTypeScreenshot,
GDBDataTypeGDB,
};
enum GDBCartType {
GDBCartTypeNone,
GDBCartTypeX7,
GDBCartTypeCen64,
};
extern u8 (*gdbSerialCanRead)();
enum GDBError gdbSerialInit(OSPiHandle* handler, OSMesgQueue* dmaMessageQ);
enum GDBError gdbSendMessage(enum GDBDataType type, char* src, u32 len);
enum GDBError gdbPollHeader(enum GDBDataType* type, u32* len);
enum GDBError gdbReadData(char* target, u32 len, u32* dataRead);
enum GDBError gdbFinishRead();
#endif