29 #include "../../idlib/precompiled.h"
32 #include "../../game/gamesys/Event.h"
33 #include "../../game/gamesys/Class.h"
34 #include "../../game/script/Script_Program.h"
35 #include "../../game/script/Script_Interpreter.h"
36 #include "../../game/script/Script_Thread.h"
37 #include "../../game/script/Script_Compiler.h"
38 #include "../../framework/sync/Msg.h"
86 DuplicateHandle ( GetCurrentProcess(), GetCurrentThread ( ), GetCurrentProcess(), &
mGameThread, 0,
FALSE, DUPLICATE_SAME_ACCESS );
105 if ( strchr( osPath,
':' ) )
150 MSG_Init( &msg, buffer,
sizeof( buffer ) );
153 while (
mPort.
GetPacket ( adrFrom, msg.data, msg.cursize, msg.maxsize ) )
155 unsigned short command;
163 command = (
unsigned short) MSG_ReadShort ( &msg );
247 MSG_Init( &msg, buffer,
sizeof( buffer ) );
248 MSG_WriteShort ( &msg, (
int)dbmsg );
264 bool onceOnly =
false;
267 char filename[MAX_PATH];
270 onceOnly = MSG_ReadBits ( msg, 1 ) ?
true :
false;
271 lineNumber = MSG_ReadLong ( msg );
272 id = MSG_ReadLong ( msg );
274 MSG_ReadString ( msg, filename, MAX_PATH );
298 id = MSG_ReadLong ( msg );
335 MSG_WriteString ( msg,
"<UNKNOWN>" );
336 MSG_WriteString ( msg,
"<UNKNOWN>" );
337 MSG_WriteLong ( msg, 0 );
342 MSG_WriteString ( msg,
va(
"%s( ??? )", func->
Name() ) );
353 MSG_WriteString ( msg, qpath );
358 MSG_WriteString ( msg,
"<UNKNOWN>" );
359 MSG_WriteLong ( msg, 0 );
378 MSG_Init( &msg, buffer,
sizeof( buffer ) );
412 MSG_Init( &msg, buffer,
sizeof( buffer ) );
428 MSG_WriteBits ( &msg, (
int)thread->
IsWaiting(), 1 );
429 MSG_WriteBits ( &msg, (
int)thread->
IsDying(), 1 );
453 scopeDepth = (short)MSG_ReadShort ( in_msg );
454 MSG_ReadString ( in_msg, varname, 256 );
462 MSG_Init( &msg, buffer,
sizeof( buffer ) );
470 MSG_WriteShort ( &msg, (
short)scopeDepth );
471 MSG_WriteString ( &msg, varname );
472 MSG_WriteString ( &msg, varvalue );
488 const char* filename;
520 Break ( interpreter, program, instructionPointer );
531 Break ( interpreter, program, instructionPointer );
540 Break ( interpreter, program, instructionPointer );
571 Break ( interpreter, program, instructionPointer );
595 const char* filename;
620 MSG_Init( &msg, buffer,
sizeof( buffer ) );
623 MSG_WriteString ( &msg, qpath );
709 MSG_Init( &msg, buffer,
sizeof( buffer ) );
711 MSG_WriteString ( &msg, text );
void HandleRemoveBreakpoint(msg_t *msg)
const function_t * GetCurrentFunction(void) const
void HandleInspectVariable(msg_t *msg)
statement_t & GetStatement(int index)
const function_t * mBreakStepOverFunc1
idProgram * mBreakProgram
const char * GetThreadName(void)
bool Sys_CompareNetAdrBase(const netadr_t a, const netadr_t b)
idFileSystem * fileSystem
bool Sys_StringToNetAdr(const char *s, netadr_t *a, bool doDNSResolve)
void Print(const char *text)
void Sleep(const int time)
const char * Name(void) const
const function_t * mBreakStepOverFunc2
int Icmp(const char *text) const
void SendPacket(void *data, int datasize)
idStr & BackSlashesToSlashes(void)
void HandleInspectThreads(msg_t *msg)
bool GetPacket(netadr_t &from, void *data, int &size, int maxSize)
bool IsDoneProcessing(void)
const char * GetFilename(int num)
idList< rvDebuggerBreakpoint * > mBreakpoints
CRITICAL_SECTION mCriticalSection
bool InitForPort(int portNumber)
void OSPathToRelativePath(const char *osPath, idStr &qpath)
static idList< idThread * > & GetThreads(void)
void HandleAddBreakpoint(msg_t *msg)
void SendMessage(EDebuggerMessage dbmsg)
void CheckBreakpoints(idInterpreter *interpreter, idProgram *program, int instructionPointer)
bool GetRegisterValue(const char *name, idStr &out, int scopeDepth)
const char * GetFilename(void)
void ClearBreakpoints(void)
void HandleInspectCallstack(msg_t *msg)
idThread * GetThread(void) const
int Append(const type &obj)
bool ProcessMessages(void)
unsigned short linenumber
int mBreakInstructionPointer
bool RemoveIndex(int index)
int GetCallstackDepth(void) const
char * va(const char *fmt,...)
void Break(idInterpreter *interpreter, idProgram *program, int instructionPointer)
virtual const char * OSPathToRelativePath(const char *OSPath)=0
const prstack_t * GetCallstack(void) const
idInterpreter * mBreakInterpreter
void MSG_WriteCallstackFunc(msg_t *msg, const prstack_t *stack)
void Sys_GrabMouseCursor(bool)