More #ifdef protection for gdb stub by riccardom
(patch 2168060). Added a --enable-gdb-stub to configure too.
This commit is contained in:
parent
5d5ea8b2a2
commit
40aea15810
|
@ -155,6 +155,11 @@ AC_SUBST(PO_DIR)
|
||||||
AC_SUBST(PO_FILES)
|
AC_SUBST(PO_FILES)
|
||||||
AC_SUBST(PO_FILES_IN)
|
AC_SUBST(PO_FILES_IN)
|
||||||
|
|
||||||
|
dnl - Gdb stub
|
||||||
|
AC_ARG_ENABLE(gdb-stub,
|
||||||
|
[AC_HELP_STRING(--enable-gdb-stub, enable gdb stub)],
|
||||||
|
[AC_DEFINE(GDB_STUB)])
|
||||||
|
|
||||||
dnl - Compiler warnings
|
dnl - Compiler warnings
|
||||||
|
|
||||||
# for developer use, enable lots of compile warnings,
|
# for developer use, enable lots of compile warnings,
|
||||||
|
@ -163,7 +168,7 @@ dnl - Compiler warnings
|
||||||
#
|
#
|
||||||
# NB: must add -Werror after AC_PROG_CC, etc., so do this last
|
# NB: must add -Werror after AC_PROG_CC, etc., so do this last
|
||||||
AC_ARG_ENABLE(hardcore,
|
AC_ARG_ENABLE(hardcore,
|
||||||
[ --enable-hardcore turn on -W -Wall -Werror],
|
[AC_HELP_STRING(--enable-hardcore, turn on -W -Wall -Werror)],
|
||||||
[case "${enableval}" in
|
[case "${enableval}" in
|
||||||
yes) ENABLE_HARDCORE=1 ;;
|
yes) ENABLE_HARDCORE=1 ;;
|
||||||
no) ENABLE_HARDCORE=0 ;;
|
no) ENABLE_HARDCORE=0 ;;
|
||||||
|
|
|
@ -52,7 +52,9 @@
|
||||||
#include "../sndsdl.h"
|
#include "../sndsdl.h"
|
||||||
#include "../ctrlssdl.h"
|
#include "../ctrlssdl.h"
|
||||||
#include "../render3D.h"
|
#include "../render3D.h"
|
||||||
|
#ifdef GDB_STUB
|
||||||
#include "../gdbstub.h"
|
#include "../gdbstub.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
volatile BOOL execute = FALSE;
|
volatile BOOL execute = FALSE;
|
||||||
|
|
||||||
|
@ -171,8 +173,10 @@ fill_config( struct my_config *config,
|
||||||
printf( " 4 = Italian\n");
|
printf( " 4 = Italian\n");
|
||||||
printf( " 5 = Spanish\n");
|
printf( " 5 = Spanish\n");
|
||||||
printf( "\n");
|
printf( "\n");
|
||||||
|
#ifdef GDB_STUB
|
||||||
printf( " --arm9gdb=PORT_NUM Enable the ARM9 GDB stub on the given port\n");
|
printf( " --arm9gdb=PORT_NUM Enable the ARM9 GDB stub on the given port\n");
|
||||||
printf( " --arm7gdb=PORT_NUM Enable the ARM7 GDB stub on the given port\n");
|
printf( " --arm7gdb=PORT_NUM Enable the ARM7 GDB stub on the given port\n");
|
||||||
|
#endif
|
||||||
//printf( " --sticky Enable sticky keys and stylus\n");
|
//printf( " --sticky Enable sticky keys and stylus\n");
|
||||||
printf( "\n");
|
printf( "\n");
|
||||||
printf( " --cflash=PATH_TO_DISK_IMAGE\n");
|
printf( " --cflash=PATH_TO_DISK_IMAGE\n");
|
||||||
|
@ -212,6 +216,7 @@ fill_config( struct my_config *config,
|
||||||
good_args = 0;
|
good_args = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef GDB_STUB
|
||||||
else if ( strncmp( argv[i], "--arm9gdb=", 10) == 0) {
|
else if ( strncmp( argv[i], "--arm9gdb=", 10) == 0) {
|
||||||
char *end_char;
|
char *end_char;
|
||||||
unsigned long port_num = strtoul( &argv[i][10], &end_char, 10);
|
unsigned long port_num = strtoul( &argv[i][10], &end_char, 10);
|
||||||
|
@ -236,6 +241,7 @@ fill_config( struct my_config *config,
|
||||||
good_args = 0;
|
good_args = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if ( strncmp( argv[i], "--cflash=", 9) == 0) {
|
else if ( strncmp( argv[i], "--cflash=", 9) == 0) {
|
||||||
if ( config->cflash_disk_image_file == NULL) {
|
if ( config->cflash_disk_image_file == NULL) {
|
||||||
config->cflash_disk_image_file = &argv[i][9];
|
config->cflash_disk_image_file = &argv[i][9];
|
||||||
|
@ -271,10 +277,10 @@ fill_config( struct my_config *config,
|
||||||
return good_args;
|
return good_args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The thread handling functions needed by the GDB stub code.
|
* The thread handling functions needed by the GDB stub code.
|
||||||
*/
|
*/
|
||||||
|
#ifdef GDB_STUB
|
||||||
void *
|
void *
|
||||||
createThread_gdb( void (*thread_function)( void *data),
|
createThread_gdb( void (*thread_function)( void *data),
|
||||||
void *thread_data) {
|
void *thread_data) {
|
||||||
|
@ -289,6 +295,7 @@ joinThread_gdb( void *thread_handle) {
|
||||||
int ignore;
|
int ignore;
|
||||||
SDL_WaitThread( (SDL_Thread*)thread_handle, &ignore);
|
SDL_WaitThread( (SDL_Thread*)thread_handle, &ignore);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -542,12 +549,14 @@ int main(int argc, char ** argv) {
|
||||||
static unsigned short keypad = 0;
|
static unsigned short keypad = 0;
|
||||||
struct my_config my_config;
|
struct my_config my_config;
|
||||||
u32 last_cycle = 0;
|
u32 last_cycle = 0;
|
||||||
|
#ifdef GDB_STUB
|
||||||
gdbstub_handle_t arm9_gdb_stub;
|
gdbstub_handle_t arm9_gdb_stub;
|
||||||
gdbstub_handle_t arm7_gdb_stub;
|
gdbstub_handle_t arm7_gdb_stub;
|
||||||
struct armcpu_memory_iface *arm9_memio = &arm9_base_memory_iface;
|
struct armcpu_memory_iface *arm9_memio = &arm9_base_memory_iface;
|
||||||
struct armcpu_memory_iface *arm7_memio = &arm7_base_memory_iface;
|
struct armcpu_memory_iface *arm7_memio = &arm7_base_memory_iface;
|
||||||
struct armcpu_ctrl_iface *arm9_ctrl_iface;
|
struct armcpu_ctrl_iface *arm9_ctrl_iface;
|
||||||
struct armcpu_ctrl_iface *arm7_ctrl_iface;
|
struct armcpu_ctrl_iface *arm7_ctrl_iface;
|
||||||
|
#endif
|
||||||
|
|
||||||
int limiter_frame_counter = 0;
|
int limiter_frame_counter = 0;
|
||||||
SDL_sem *fps_limiter_semaphore;
|
SDL_sem *fps_limiter_semaphore;
|
||||||
|
@ -584,6 +593,7 @@ int main(int argc, char ** argv) {
|
||||||
fw_config.language = my_config.firmware_language;
|
fw_config.language = my_config.firmware_language;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef GDB_STUB
|
||||||
if ( my_config.arm9_gdb_port != 0) {
|
if ( my_config.arm9_gdb_port != 0) {
|
||||||
arm9_gdb_stub = createStub_gdb( my_config.arm9_gdb_port,
|
arm9_gdb_stub = createStub_gdb( my_config.arm9_gdb_port,
|
||||||
&arm9_memio,
|
&arm9_memio,
|
||||||
|
@ -606,6 +616,7 @@ int main(int argc, char ** argv) {
|
||||||
exit( 1);
|
exit( 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
LogStart();
|
LogStart();
|
||||||
|
@ -633,12 +644,14 @@ int main(int argc, char ** argv) {
|
||||||
* Activate the GDB stubs
|
* Activate the GDB stubs
|
||||||
* This has to come after the NDS_Init where the cpus are set up.
|
* This has to come after the NDS_Init where the cpus are set up.
|
||||||
*/
|
*/
|
||||||
|
#ifdef GDB_STUB
|
||||||
if ( my_config.arm9_gdb_port != 0) {
|
if ( my_config.arm9_gdb_port != 0) {
|
||||||
activateStub_gdb( arm9_gdb_stub, arm9_ctrl_iface);
|
activateStub_gdb( arm9_gdb_stub, arm9_ctrl_iface);
|
||||||
}
|
}
|
||||||
if ( my_config.arm7_gdb_port != 0) {
|
if ( my_config.arm7_gdb_port != 0) {
|
||||||
activateStub_gdb( arm7_gdb_stub, arm7_ctrl_iface);
|
activateStub_gdb( arm7_gdb_stub, arm7_ctrl_iface);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* // This has to get fixed yet
|
/* // This has to get fixed yet
|
||||||
strcpy(szRomPath, dirname(argv[1]));
|
strcpy(szRomPath, dirname(argv[1]));
|
||||||
|
@ -818,12 +831,14 @@ int main(int argc, char ** argv) {
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
NDS_DeInit();
|
NDS_DeInit();
|
||||||
|
|
||||||
|
#ifdef GDB_STUB
|
||||||
if ( my_config.arm9_gdb_port != 0) {
|
if ( my_config.arm9_gdb_port != 0) {
|
||||||
destroyStub_gdb( arm9_gdb_stub);
|
destroyStub_gdb( arm9_gdb_stub);
|
||||||
}
|
}
|
||||||
if ( my_config.arm7_gdb_port != 0) {
|
if ( my_config.arm7_gdb_port != 0) {
|
||||||
destroyStub_gdb( arm7_gdb_stub);
|
destroyStub_gdb( arm7_gdb_stub);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
LogStop();
|
LogStop();
|
||||||
|
|
|
@ -24,9 +24,12 @@
|
||||||
#include "callbacks_IO.h"
|
#include "callbacks_IO.h"
|
||||||
#include "dTools/callbacks_dtools.h"
|
#include "dTools/callbacks_dtools.h"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "../gdbstub.h"
|
|
||||||
#include "keyval_names.h"
|
#include "keyval_names.h"
|
||||||
|
|
||||||
|
#ifdef GDB_STUB
|
||||||
|
#include "../gdbstub.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef GTKGLEXT_AVAILABLE
|
#ifdef GTKGLEXT_AVAILABLE
|
||||||
#include <gtk/gtkgl.h>
|
#include <gtk/gtkgl.h>
|
||||||
#include "../OGLRender.h"
|
#include "../OGLRender.h"
|
||||||
|
@ -122,10 +125,13 @@ fill_configured_features( struct configured_features *config,
|
||||||
2 = French\n\
|
2 = French\n\
|
||||||
3 = German\n\
|
3 = German\n\
|
||||||
4 = Italian\n\
|
4 = Italian\n\
|
||||||
5 = Spanish\n\n\
|
5 = Spanish\n\n"));
|
||||||
|
#ifdef GDB_STUB
|
||||||
|
g_print( _("\
|
||||||
--arm9gdb=PORT_NUM Enable the ARM9 GDB stub on the given port\n\
|
--arm9gdb=PORT_NUM Enable the ARM9 GDB stub on the given port\n\
|
||||||
--arm7gdb=PORT_NUM Enable the ARM7 GDB stub on the given port\n\
|
--arm7gdb=PORT_NUM Enable the ARM7 GDB stub on the given port\n\n"));
|
||||||
\n\
|
#endif
|
||||||
|
g_print( _("\
|
||||||
--help Display this message\n"));
|
--help Display this message\n"));
|
||||||
//g_print(" --sticky Enable sticky keys and stylus\n");
|
//g_print(" --sticky Enable sticky keys and stylus\n");
|
||||||
good_args = 0;
|
good_args = 0;
|
||||||
|
@ -150,6 +156,7 @@ fill_configured_features( struct configured_features *config,
|
||||||
good_args = 0;
|
good_args = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef GDB_STUB
|
||||||
else if ( strncmp( argv[i], "--arm9gdb=", 10) == 0) {
|
else if ( strncmp( argv[i], "--arm9gdb=", 10) == 0) {
|
||||||
char *end_char;
|
char *end_char;
|
||||||
unsigned long port_num = strtoul( &argv[i][10], &end_char, 10);
|
unsigned long port_num = strtoul( &argv[i][10], &end_char, 10);
|
||||||
|
@ -174,6 +181,7 @@ fill_configured_features( struct configured_features *config,
|
||||||
good_args = 0;
|
good_args = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if ( strcmp( argv[i], "--disable-limiter") == 0) {
|
else if ( strcmp( argv[i], "--disable-limiter") == 0) {
|
||||||
config->disable_limiter = 1;
|
config->disable_limiter = 1;
|
||||||
}
|
}
|
||||||
|
@ -315,6 +323,7 @@ static int Write_ConfigFile()
|
||||||
/*
|
/*
|
||||||
* The thread handling functions needed by the GDB stub code.
|
* The thread handling functions needed by the GDB stub code.
|
||||||
*/
|
*/
|
||||||
|
#ifdef GDB_STUB
|
||||||
void *
|
void *
|
||||||
createThread_gdb( void (*thread_function)( void *data),
|
createThread_gdb( void (*thread_function)( void *data),
|
||||||
void *thread_data) {
|
void *thread_data) {
|
||||||
|
@ -330,6 +339,7 @@ void
|
||||||
joinThread_gdb( void *thread_handle) {
|
joinThread_gdb( void *thread_handle) {
|
||||||
g_thread_join((GThread *) thread_handle);
|
g_thread_join((GThread *) thread_handle);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -359,8 +369,10 @@ glade_fps_limiter_fn( Uint32 interval, void *param) {
|
||||||
static int
|
static int
|
||||||
common_gtk_glade_main( struct configured_features *my_config) {
|
common_gtk_glade_main( struct configured_features *my_config) {
|
||||||
SDL_TimerID limiter_timer;
|
SDL_TimerID limiter_timer;
|
||||||
|
#ifdef GDB_STUB
|
||||||
gdbstub_handle_t arm9_gdb_stub;
|
gdbstub_handle_t arm9_gdb_stub;
|
||||||
gdbstub_handle_t arm7_gdb_stub;
|
gdbstub_handle_t arm7_gdb_stub;
|
||||||
|
#endif
|
||||||
struct armcpu_memory_iface *arm9_memio = &arm9_base_memory_iface;
|
struct armcpu_memory_iface *arm9_memio = &arm9_base_memory_iface;
|
||||||
struct armcpu_memory_iface *arm7_memio = &arm7_base_memory_iface;
|
struct armcpu_memory_iface *arm7_memio = &arm7_base_memory_iface;
|
||||||
struct armcpu_ctrl_iface *arm9_ctrl_iface;
|
struct armcpu_ctrl_iface *arm9_ctrl_iface;
|
||||||
|
@ -388,6 +400,7 @@ common_gtk_glade_main( struct configured_features *my_config) {
|
||||||
#endif
|
#endif
|
||||||
init_keyvals();
|
init_keyvals();
|
||||||
|
|
||||||
|
#ifdef GDB_STUB
|
||||||
if ( my_config->arm9_gdb_port != 0) {
|
if ( my_config->arm9_gdb_port != 0) {
|
||||||
arm9_gdb_stub = createStub_gdb( my_config->arm9_gdb_port,
|
arm9_gdb_stub = createStub_gdb( my_config->arm9_gdb_port,
|
||||||
&arm9_memio,
|
&arm9_memio,
|
||||||
|
@ -410,7 +423,7 @@ common_gtk_glade_main( struct configured_features *my_config) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if(SDL_Init( SDL_INIT_TIMER | SDL_INIT_VIDEO) == -1)
|
if(SDL_Init( SDL_INIT_TIMER | SDL_INIT_VIDEO) == -1)
|
||||||
{
|
{
|
||||||
|
@ -431,12 +444,14 @@ common_gtk_glade_main( struct configured_features *my_config) {
|
||||||
* This has to come after the NDS_Init (called in desmume_init)
|
* This has to come after the NDS_Init (called in desmume_init)
|
||||||
* where the cpus are set up.
|
* where the cpus are set up.
|
||||||
*/
|
*/
|
||||||
|
#ifdef GDB_STUB
|
||||||
if ( my_config->arm9_gdb_port != 0) {
|
if ( my_config->arm9_gdb_port != 0) {
|
||||||
activateStub_gdb( arm9_gdb_stub, arm9_ctrl_iface);
|
activateStub_gdb( arm9_gdb_stub, arm9_ctrl_iface);
|
||||||
}
|
}
|
||||||
if ( my_config->arm7_gdb_port != 0) {
|
if ( my_config->arm7_gdb_port != 0) {
|
||||||
activateStub_gdb( arm7_gdb_stub, arm7_ctrl_iface);
|
activateStub_gdb( arm7_gdb_stub, arm7_ctrl_iface);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Initialize joysticks */
|
/* Initialize joysticks */
|
||||||
if(!init_joy()) return 1;
|
if(!init_joy()) return 1;
|
||||||
|
|
|
@ -27,7 +27,9 @@
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "../debug.h"
|
#include "../debug.h"
|
||||||
|
|
||||||
|
#ifdef GDB_STUB
|
||||||
#include "../gdbstub.h"
|
#include "../gdbstub.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef GTKGLEXT_AVAILABLE
|
#ifdef GTKGLEXT_AVAILABLE
|
||||||
#include "../OGLRender.h"
|
#include "../OGLRender.h"
|
||||||
|
@ -173,8 +175,10 @@ fill_configured_features( struct configured_features *config,
|
||||||
printf( " 4 = Italian\n");
|
printf( " 4 = Italian\n");
|
||||||
printf( " 5 = Spanish\n");
|
printf( " 5 = Spanish\n");
|
||||||
printf( "\n");
|
printf( "\n");
|
||||||
|
#ifdef GDB_STUB
|
||||||
printf( " --arm9gdb=PORT_NUM Enable the ARM9 GDB stub on the given port\n");
|
printf( " --arm9gdb=PORT_NUM Enable the ARM9 GDB stub on the given port\n");
|
||||||
printf( " --arm7gdb=PORT_NUM Enable the ARM7 GDB stub on the given port\n");
|
printf( " --arm7gdb=PORT_NUM Enable the ARM7 GDB stub on the given port\n");
|
||||||
|
#endif
|
||||||
//printf( " --sticky Enable sticky keys and stylus\n");
|
//printf( " --sticky Enable sticky keys and stylus\n");
|
||||||
printf( "\n");
|
printf( "\n");
|
||||||
printf( " --cflash=PATH_TO_DISK_IMAGE\n");
|
printf( " --cflash=PATH_TO_DISK_IMAGE\n");
|
||||||
|
@ -204,6 +208,7 @@ fill_configured_features( struct configured_features *config,
|
||||||
fprintf( stderr, "Firmware language must be set to a value from 0 to 5.\n");
|
fprintf( stderr, "Firmware language must be set to a value from 0 to 5.\n");
|
||||||
good_args = 0;
|
good_args = 0;
|
||||||
}
|
}
|
||||||
|
#ifdef GDB_STUB
|
||||||
} else if ( strncmp( argv[i], "--arm9gdb=", 10) == 0) {
|
} else if ( strncmp( argv[i], "--arm9gdb=", 10) == 0) {
|
||||||
char *end_char;
|
char *end_char;
|
||||||
unsigned long port_num = strtoul( &argv[i][10], &end_char, 10);
|
unsigned long port_num = strtoul( &argv[i][10], &end_char, 10);
|
||||||
|
@ -224,6 +229,7 @@ fill_configured_features( struct configured_features *config,
|
||||||
fprintf( stderr, "ARM7 GDB stub port must be in the range 1 to 65535\n");
|
fprintf( stderr, "ARM7 GDB stub port must be in the range 1 to 65535\n");
|
||||||
good_args = 0;
|
good_args = 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
} else if ( strncmp( argv[i], "--cflash=", 9) == 0) {
|
} else if ( strncmp( argv[i], "--cflash=", 9) == 0) {
|
||||||
if ( config->cflash_disk_image_file == NULL) {
|
if ( config->cflash_disk_image_file == NULL) {
|
||||||
config->cflash_disk_image_file = &argv[i][9];
|
config->cflash_disk_image_file = &argv[i][9];
|
||||||
|
@ -260,6 +266,7 @@ fill_configured_features( struct configured_features *config,
|
||||||
/*
|
/*
|
||||||
* The thread handling functions needed by the GDB stub code.
|
* The thread handling functions needed by the GDB stub code.
|
||||||
*/
|
*/
|
||||||
|
#ifdef GDB_STUB
|
||||||
void *
|
void *
|
||||||
createThread_gdb( void (*thread_function)( void *data),
|
createThread_gdb( void (*thread_function)( void *data),
|
||||||
void *thread_data)
|
void *thread_data)
|
||||||
|
@ -276,6 +283,7 @@ void
|
||||||
joinThread_gdb( void *thread_handle) {
|
joinThread_gdb( void *thread_handle) {
|
||||||
g_thread_join( (GThread *)thread_handle);
|
g_thread_join( (GThread *)thread_handle);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
u16 Keypad_Temp[NB_KEYS];
|
u16 Keypad_Temp[NB_KEYS];
|
||||||
|
@ -1522,8 +1530,10 @@ common_gtk_main( struct configured_features *my_config)
|
||||||
GdkGLConfig *glconfig;
|
GdkGLConfig *glconfig;
|
||||||
GdkGLContext *glcontext;
|
GdkGLContext *glcontext;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef GDB_STUB
|
||||||
gdbstub_handle_t arm9_gdb_stub;
|
gdbstub_handle_t arm9_gdb_stub;
|
||||||
gdbstub_handle_t arm7_gdb_stub;
|
gdbstub_handle_t arm7_gdb_stub;
|
||||||
|
#endif
|
||||||
struct armcpu_memory_iface *arm9_memio = &arm9_base_memory_iface;
|
struct armcpu_memory_iface *arm9_memio = &arm9_base_memory_iface;
|
||||||
struct armcpu_memory_iface *arm7_memio = &arm7_base_memory_iface;
|
struct armcpu_memory_iface *arm7_memio = &arm7_base_memory_iface;
|
||||||
struct armcpu_ctrl_iface *arm9_ctrl_iface;
|
struct armcpu_ctrl_iface *arm9_ctrl_iface;
|
||||||
|
@ -1546,6 +1556,7 @@ common_gtk_main( struct configured_features *my_config)
|
||||||
LogStart();
|
LogStart();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef GDB_STUB
|
||||||
if ( my_config->arm9_gdb_port != 0) {
|
if ( my_config->arm9_gdb_port != 0) {
|
||||||
arm9_gdb_stub = createStub_gdb( my_config->arm9_gdb_port,
|
arm9_gdb_stub = createStub_gdb( my_config->arm9_gdb_port,
|
||||||
&arm9_memio,
|
&arm9_memio,
|
||||||
|
@ -1568,7 +1579,7 @@ common_gtk_main( struct configured_features *my_config)
|
||||||
exit( -1);
|
exit( -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef GTKGLEXT_AVAILABLE
|
#ifdef GTKGLEXT_AVAILABLE
|
||||||
/* Try double-buffered visual */
|
/* Try double-buffered visual */
|
||||||
|
@ -1599,18 +1610,19 @@ common_gtk_main( struct configured_features *my_config)
|
||||||
arm7_memio, &arm7_ctrl_iface,
|
arm7_memio, &arm7_ctrl_iface,
|
||||||
my_config->disable_sound);
|
my_config->disable_sound);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Activate the GDB stubs
|
* Activate the GDB stubs
|
||||||
* This has to come after the NDS_Init (called in desmume_init)
|
* This has to come after the NDS_Init (called in desmume_init)
|
||||||
* where the cpus are set up.
|
* where the cpus are set up.
|
||||||
*/
|
*/
|
||||||
|
#ifdef GDB_STUB
|
||||||
if ( my_config->arm9_gdb_port != 0) {
|
if ( my_config->arm9_gdb_port != 0) {
|
||||||
activateStub_gdb( arm9_gdb_stub, arm9_ctrl_iface);
|
activateStub_gdb( arm9_gdb_stub, arm9_ctrl_iface);
|
||||||
}
|
}
|
||||||
if ( my_config->arm7_gdb_port != 0) {
|
if ( my_config->arm7_gdb_port != 0) {
|
||||||
activateStub_gdb( arm7_gdb_stub, arm7_ctrl_iface);
|
activateStub_gdb( arm7_gdb_stub, arm7_ctrl_iface);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Create the dummy firmware */
|
/* Create the dummy firmware */
|
||||||
NDS_CreateDummyFirmware( &fw_config);
|
NDS_CreateDummyFirmware( &fw_config);
|
||||||
|
@ -2016,12 +2028,14 @@ common_gtk_main( struct configured_features *my_config)
|
||||||
|
|
||||||
Write_ConfigFile();
|
Write_ConfigFile();
|
||||||
|
|
||||||
|
#ifdef GDB_STUB
|
||||||
if ( my_config->arm9_gdb_port != 0) {
|
if ( my_config->arm9_gdb_port != 0) {
|
||||||
destroyStub_gdb( arm9_gdb_stub);
|
destroyStub_gdb( arm9_gdb_stub);
|
||||||
}
|
}
|
||||||
if ( my_config->arm7_gdb_port != 0) {
|
if ( my_config->arm7_gdb_port != 0) {
|
||||||
destroyStub_gdb( arm7_gdb_stub);
|
destroyStub_gdb( arm7_gdb_stub);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue