2018-09-24 10:43:20 +02:00
|
|
|
#include "debugger.h"
|
|
|
|
#include "exceptions.h"
|
2022-02-08 14:48:41 +01:00
|
|
|
#include "logger.h"
|
|
|
|
#include <coreinit/debug.h>
|
|
|
|
#include <wups.h>
|
2018-09-24 10:43:20 +02:00
|
|
|
|
2022-02-08 14:48:41 +01:00
|
|
|
OSThread **pThreadList;
|
2018-09-24 10:43:20 +02:00
|
|
|
|
2022-02-08 14:44:53 +01:00
|
|
|
|
2022-02-08 14:48:41 +01:00
|
|
|
WUPS_PLUGIN_NAME("Debugger");
|
|
|
|
WUPS_PLUGIN_DESCRIPTION("FTP Server");
|
|
|
|
WUPS_PLUGIN_VERSION("0.1");
|
|
|
|
WUPS_PLUGIN_AUTHOR("Kinnay");
|
|
|
|
WUPS_PLUGIN_LICENSE("GPL");
|
2018-09-24 10:43:20 +02:00
|
|
|
|
2022-02-08 14:48:41 +01:00
|
|
|
WUPS_USE_WUT_DEVOPTAB();
|
2022-02-08 14:44:53 +01:00
|
|
|
|
2022-02-08 14:48:41 +01:00
|
|
|
INITIALIZE_PLUGIN() {
|
|
|
|
InstallExceptionHandlers();
|
2018-09-24 10:43:20 +02:00
|
|
|
}
|
2022-02-08 14:48:41 +01:00
|
|
|
ON_APPLICATION_START() {
|
|
|
|
initLogging();
|
|
|
|
DEBUG_FUNCTION_LINE("Started Debugger plugin");
|
|
|
|
pThreadList = (OSThread **) 0x100567F8;
|
|
|
|
debugger = new Debugger();
|
|
|
|
DEBUG_FUNCTION_LINE("Created Debugger");
|
2022-02-08 14:44:53 +01:00
|
|
|
debugger->start();
|
2022-02-08 14:48:41 +01:00
|
|
|
DEBUG_FUNCTION_LINE("Started Debugger thread");
|
2018-09-24 10:43:20 +02:00
|
|
|
}
|
|
|
|
|
2022-02-08 14:48:41 +01:00
|
|
|
ON_APPLICATION_REQUESTS_EXIT() {
|
|
|
|
DEBUG_FUNCTION_LINE("Deleting Debugger thread");
|
|
|
|
delete debugger;
|
|
|
|
DEBUG_FUNCTION_LINE("Deleted Debugger thread");
|
|
|
|
deinitLogging();
|
2018-09-24 10:43:20 +02:00
|
|
|
}
|