Use CLIENT_DebuggerRequest to freeze/unfreeze threads.
This commit is contained in:
parent
371fd75a39
commit
2a8c5da0c8
@ -25,6 +25,7 @@
|
|||||||
#include "debugger.h"
|
#include "debugger.h"
|
||||||
#include "neexe.h"
|
#include "neexe.h"
|
||||||
#include "process.h"
|
#include "process.h"
|
||||||
|
#include "server.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "expr.h"
|
#include "expr.h"
|
||||||
#include "user.h"
|
#include "user.h"
|
||||||
@ -416,6 +417,7 @@ void mode_command(int newmode)
|
|||||||
static void DEBUG_Main( int signal )
|
static void DEBUG_Main( int signal )
|
||||||
{
|
{
|
||||||
static int loaded_symbols = 0;
|
static int loaded_symbols = 0;
|
||||||
|
static BOOL frozen = FALSE;
|
||||||
static BOOL in_debugger = FALSE;
|
static BOOL in_debugger = FALSE;
|
||||||
char SymbolTableFile[256];
|
char SymbolTableFile[256];
|
||||||
int newmode;
|
int newmode;
|
||||||
@ -438,6 +440,12 @@ static void DEBUG_Main( int signal )
|
|||||||
{
|
{
|
||||||
loaded_symbols++;
|
loaded_symbols++;
|
||||||
|
|
||||||
|
if ( !frozen )
|
||||||
|
{
|
||||||
|
CLIENT_DebuggerRequest( DEBUGGER_FREEZE_ALL );
|
||||||
|
frozen = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize the type handling stuff.
|
* Initialize the type handling stuff.
|
||||||
*/
|
*/
|
||||||
@ -491,6 +499,12 @@ static void DEBUG_Main( int signal )
|
|||||||
|
|
||||||
GlobalUnlock16( GetCurrentTask() );
|
GlobalUnlock16( GetCurrentTask() );
|
||||||
|
|
||||||
|
if ( !frozen )
|
||||||
|
{
|
||||||
|
CLIENT_DebuggerRequest( DEBUGGER_FREEZE_ALL );
|
||||||
|
frozen = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Put the display in a correct state */
|
/* Put the display in a correct state */
|
||||||
USER_Driver->pBeginDebugging();
|
USER_Driver->pBeginDebugging();
|
||||||
|
|
||||||
@ -498,8 +512,6 @@ static void DEBUG_Main( int signal )
|
|||||||
if (newmode != dbg_mode)
|
if (newmode != dbg_mode)
|
||||||
fprintf(stderr,"In %d bit mode.\n", dbg_mode = newmode);
|
fprintf(stderr,"In %d bit mode.\n", dbg_mode = newmode);
|
||||||
|
|
||||||
PROCESS_SuspendOtherThreads();
|
|
||||||
|
|
||||||
DEBUG_DoDisplay();
|
DEBUG_DoDisplay();
|
||||||
|
|
||||||
if (signal != SIGTRAP) /* This is a real crash, dump some info */
|
if (signal != SIGTRAP) /* This is a real crash, dump some info */
|
||||||
@ -561,7 +573,12 @@ static void DEBUG_Main( int signal )
|
|||||||
if( dbg_exec_mode == EXEC_CONT )
|
if( dbg_exec_mode == EXEC_CONT )
|
||||||
{
|
{
|
||||||
dbg_exec_count = 0;
|
dbg_exec_count = 0;
|
||||||
PROCESS_ResumeOtherThreads();
|
|
||||||
|
if ( frozen )
|
||||||
|
{
|
||||||
|
CLIENT_DebuggerRequest( DEBUGGER_UNFREEZE_ALL );
|
||||||
|
frozen = FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
in_debugger = FALSE;
|
in_debugger = FALSE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user