From 4d550350f3088d53ba2569db6f9a14d095d76155 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Fri, 30 Jul 1999 18:05:07 +0000 Subject: [PATCH] Bugfix: Install task-entry breakpoint *after* EXE module is initialized. --- loader/task.c | 8 -------- scheduler/process.c | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/loader/task.c b/loader/task.c index c3e8dcde8e7..601952e97c7 100644 --- a/loader/task.c +++ b/loader/task.c @@ -48,9 +48,6 @@ DECLARE_DEBUG_CHANNEL(toolhelp) /* Pointer to function to switch to a larger stack */ int (*IF1632_CallLargeStack)( int (*func)(), void *arg ) = NULL; - /* Pointer to debugger callback routine */ -void (*TASK_AddTaskEntryBreakpoint)( HTASK16 hTask ) = NULL; - static THHOOK DefaultThhook = { 0 }; THHOOK *pThhook = &DefaultThhook; @@ -388,11 +385,6 @@ BOOL TASK_Create( NE_MODULE *pModule, UINT16 cmdShow) pTask->teb->htask16 = pTask->teb->process->task = hTask; TRACE_(task)("module='%s' cmdline='%s' task=%04x\n", name, cmd_line, hTask ); - /* If requested, add entry point breakpoint */ - - if ( TASK_AddTaskEntryBreakpoint ) - TASK_AddTaskEntryBreakpoint( hTask ); - /* Add the task to the linked list */ SYSLEVEL_EnterWin16Lock(); diff --git a/scheduler/process.c b/scheduler/process.c index f4c69e8d736..db423d97937 100644 --- a/scheduler/process.c +++ b/scheduler/process.c @@ -36,6 +36,10 @@ static PDB initial_pdb; static PDB *PROCESS_First = &initial_pdb; + /* Pointer to debugger callback routine */ +void (*TASK_AddTaskEntryBreakpoint)( HTASK16 hTask ) = NULL; + + /*********************************************************************** * PROCESS_WalkProcess */ @@ -474,6 +478,10 @@ void PROCESS_Start(void) LeaveCriticalSection( &pdb->crit_section ); } + /* If requested, add entry point breakpoint */ + if ( TASK_AddTaskEntryBreakpoint ) + TASK_AddTaskEntryBreakpoint( pdb->task ); + /* Now call the entry point */ PROCESS_CallUserSignalProc( USIG_PROCESS_RUNNING, 0 ); -- 2.11.4.GIT