fix a bug in the windows gdb stub caused by passing a fastcall callback to createthread
This commit is contained in:
parent
cc760afb79
commit
b193bca2bd
|
@ -1,5 +1,3 @@
|
|||
#ifndef _GDBSTUB_H_
|
||||
#define _GDBSTUB_H_ 1
|
||||
/* $Id: gdbstub.h,v 1.1 2007-06-07 09:43:25 masscat Exp $
|
||||
*/
|
||||
/* Copyright (C) 2006 Ben Jaques
|
||||
|
@ -22,11 +20,10 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERNC extern "C"
|
||||
#else
|
||||
#define EXTERNC
|
||||
#endif
|
||||
#ifndef _GDBSTUB_H_
|
||||
#define _GDBSTUB_H_ 1
|
||||
|
||||
#include "types.h"
|
||||
|
||||
typedef void *gdbstub_handle_t;
|
||||
|
||||
|
@ -34,15 +31,15 @@ typedef void *gdbstub_handle_t;
|
|||
* The function interface
|
||||
*/
|
||||
|
||||
EXTERNC gdbstub_handle_t
|
||||
gdbstub_handle_t
|
||||
createStub_gdb( u16 port,
|
||||
struct armcpu_memory_iface **cpu_memio,
|
||||
struct armcpu_memory_iface *direct_memio);
|
||||
|
||||
EXTERNC void
|
||||
void
|
||||
destroyStub_gdb( gdbstub_handle_t stub);
|
||||
|
||||
EXTERNC void
|
||||
void
|
||||
activateStub_gdb( gdbstub_handle_t stub,
|
||||
struct armcpu_ctrl_iface *cpu_ctrl);
|
||||
|
||||
|
@ -50,11 +47,11 @@ activateStub_gdb( gdbstub_handle_t stub,
|
|||
* An implementation of the following functions is required
|
||||
* for the GDB stub to function.
|
||||
*/
|
||||
EXTERNC void *
|
||||
createThread_gdb( void (*thread_function)( void *data),
|
||||
void *
|
||||
createThread_gdb( void (WINAPI *thread_function)( void *data),
|
||||
void *thread_data);
|
||||
|
||||
EXTERNC void
|
||||
void
|
||||
joinThread_gdb( void *thread_handle);
|
||||
|
||||
#endif /* End of _GDBSTUB_H_ */
|
||||
|
|
|
@ -1041,7 +1041,7 @@ execute_gdb( void *data, uint32_t instr_addr, int thumb) {
|
|||
}
|
||||
|
||||
static void
|
||||
listenerThread_gdb( void *data) {
|
||||
WINAPI listenerThread_gdb( void *data) {
|
||||
struct gdb_stub_state *state = (struct gdb_stub_state *)data;
|
||||
fd_set read_sock_set;
|
||||
fd_set main_set;
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#ifdef _WIN32
|
||||
#define strcasecmp(x,y) stricmp(x,y)
|
||||
#else
|
||||
#define WINAPI
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
WholeProgramOptimization="false"
|
||||
AdditionalIncludeDirectories="..;.\zlib123;.\zziplib"
|
||||
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;VERSION=\"0.8.0b2 DEBUG\";WIN32;BETA_VERSION;SPU_INTERPOLATE;HAVE_LIBZ;GDB_STUB"
|
||||
ExceptionHandling="0"
|
||||
ExceptionHandling="1"
|
||||
BufferSecurityCheck="false"
|
||||
EnableEnhancedInstructionSet="0"
|
||||
DebugInformationFormat="4"
|
||||
|
@ -142,7 +142,7 @@
|
|||
AdditionalIncludeDirectories="..;.\zlib123;.\zziplib"
|
||||
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;VERSION=\"0.8.0b2\";WIN32;HAVE_LIBZ;HAVE_LIBZZIP;BETA_VERSION;GDB_STUB;SPU_INTERPOLATE"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
ExceptionHandling="1"
|
||||
BufferSecurityCheck="false"
|
||||
EnableEnhancedInstructionSet="0"
|
||||
FloatingPointModel="2"
|
||||
|
|
|
@ -681,8 +681,8 @@ BOOL LoadROM(char * filename, const char *cflash_disk_image)
|
|||
/*
|
||||
* The thread handling functions needed by the GDB stub code.
|
||||
*/
|
||||
extern "C" void *
|
||||
createThread_gdb( void (*thread_function)( void *data),
|
||||
void *
|
||||
createThread_gdb( void (APIENTRY *thread_function)( void *data),
|
||||
void *thread_data) {
|
||||
void *new_thread = CreateThread( NULL, 0,
|
||||
(LPTHREAD_START_ROUTINE)thread_function, thread_data,
|
||||
|
@ -691,7 +691,7 @@ createThread_gdb( void (*thread_function)( void *data),
|
|||
return new_thread;
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
void
|
||||
joinThread_gdb( void *thread_handle) {
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue