Bugfix: Install task-entry breakpoint *after* EXE module is initialized.

This commit is contained in:
Ulrich Weigand 1999-07-30 18:05:07 +00:00 committed by Alexandre Julliard
parent 63ff31eacd
commit 4d550350f3
2 changed files with 8 additions and 8 deletions

View File

@ -48,9 +48,6 @@ DECLARE_DEBUG_CHANNEL(toolhelp)
/* Pointer to function to switch to a larger stack */ /* Pointer to function to switch to a larger stack */
int (*IF1632_CallLargeStack)( int (*func)(), void *arg ) = NULL; int (*IF1632_CallLargeStack)( int (*func)(), void *arg ) = NULL;
/* Pointer to debugger callback routine */
void (*TASK_AddTaskEntryBreakpoint)( HTASK16 hTask ) = NULL;
static THHOOK DefaultThhook = { 0 }; static THHOOK DefaultThhook = { 0 };
THHOOK *pThhook = &DefaultThhook; THHOOK *pThhook = &DefaultThhook;
@ -388,11 +385,6 @@ BOOL TASK_Create( NE_MODULE *pModule, UINT16 cmdShow)
pTask->teb->htask16 = pTask->teb->process->task = hTask; pTask->teb->htask16 = pTask->teb->process->task = hTask;
TRACE_(task)("module='%s' cmdline='%s' task=%04x\n", name, cmd_line, 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 */ /* Add the task to the linked list */
SYSLEVEL_EnterWin16Lock(); SYSLEVEL_EnterWin16Lock();

View File

@ -36,6 +36,10 @@ static PDB initial_pdb;
static PDB *PROCESS_First = &initial_pdb; static PDB *PROCESS_First = &initial_pdb;
/* Pointer to debugger callback routine */
void (*TASK_AddTaskEntryBreakpoint)( HTASK16 hTask ) = NULL;
/*********************************************************************** /***********************************************************************
* PROCESS_WalkProcess * PROCESS_WalkProcess
*/ */
@ -474,6 +478,10 @@ void PROCESS_Start(void)
LeaveCriticalSection( &pdb->crit_section ); LeaveCriticalSection( &pdb->crit_section );
} }
/* If requested, add entry point breakpoint */
if ( TASK_AddTaskEntryBreakpoint )
TASK_AddTaskEntryBreakpoint( pdb->task );
/* Now call the entry point */ /* Now call the entry point */
PROCESS_CallUserSignalProc( USIG_PROCESS_RUNNING, 0 ); PROCESS_CallUserSignalProc( USIG_PROCESS_RUNNING, 0 );