Use CLIENT_DebuggerRequest to freeze/unfreeze threads.

This commit is contained in:
Ulrich Weigand 1999-04-11 17:13:43 +00:00 committed by Alexandre Julliard
parent 371fd75a39
commit 2a8c5da0c8
1 changed files with 20 additions and 3 deletions

View File

@ -25,6 +25,7 @@
#include "debugger.h"
#include "neexe.h"
#include "process.h"
#include "server.h"
#include "main.h"
#include "expr.h"
#include "user.h"
@ -416,6 +417,7 @@ void mode_command(int newmode)
static void DEBUG_Main( int signal )
{
static int loaded_symbols = 0;
static BOOL frozen = FALSE;
static BOOL in_debugger = FALSE;
char SymbolTableFile[256];
int newmode;
@ -438,6 +440,12 @@ static void DEBUG_Main( int signal )
{
loaded_symbols++;
if ( !frozen )
{
CLIENT_DebuggerRequest( DEBUGGER_FREEZE_ALL );
frozen = TRUE;
}
/*
* Initialize the type handling stuff.
*/
@ -491,6 +499,12 @@ static void DEBUG_Main( int signal )
GlobalUnlock16( GetCurrentTask() );
if ( !frozen )
{
CLIENT_DebuggerRequest( DEBUGGER_FREEZE_ALL );
frozen = TRUE;
}
/* Put the display in a correct state */
USER_Driver->pBeginDebugging();
@ -498,8 +512,6 @@ static void DEBUG_Main( int signal )
if (newmode != dbg_mode)
fprintf(stderr,"In %d bit mode.\n", dbg_mode = newmode);
PROCESS_SuspendOtherThreads();
DEBUG_DoDisplay();
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 )
{
dbg_exec_count = 0;
PROCESS_ResumeOtherThreads();
if ( frozen )
{
CLIENT_DebuggerRequest( DEBUGGER_UNFREEZE_ALL );
frozen = FALSE;
}
}
in_debugger = FALSE;