Commit a0eb2ed4 authored by Michael Karcher's avatar Michael Karcher Committed by Alexandre Julliard

server: Don't report LOAD_DLL debug event for exe module.

parent 9d6d3b3b
......@@ -1241,6 +1241,7 @@ static void test_SuspendFlag(void)
static void test_DebuggingFlag(void)
{
char buffer[MAX_PATH];
void *processbase = NULL;
PROCESS_INFORMATION info;
STARTUPINFOA startup, us;
DEBUG_EVENT de;
......@@ -1261,7 +1262,15 @@ static void test_DebuggingFlag(void)
{
ok(WaitForDebugEvent(&de, INFINITE), "reading debug event\n");
ContinueDebugEvent(de.dwProcessId, de.dwThreadId, DBG_CONTINUE);
if (!dbg)
{
ok(de.dwDebugEventCode == CREATE_PROCESS_DEBUG_EVENT,
"first event: %d\n", de.dwDebugEventCode);
processbase = de.u.CreateProcessInfo.lpBaseOfImage;
}
if (de.dwDebugEventCode != EXCEPTION_DEBUG_EVENT) dbg++;
ok(de.dwDebugEventCode != LOAD_DLL_DEBUG_EVENT ||
de.u.LoadDll.lpBaseOfDll != processbase, "got LOAD_DLL for main module\n");
} while (de.dwDebugEventCode != EXIT_PROCESS_DEBUG_EVENT);
ok(dbg, "I have seen a debug event\n");
......
......@@ -514,7 +514,7 @@ void generate_startup_debug_events( struct process *process, client_ptr_t entry
/* generate dll events (in loading order, i.e. reverse list order) */
ptr = list_tail( &process->dlls );
while (ptr)
while (ptr != list_head( &process->dlls ))
{
struct process_dll *dll = LIST_ENTRY( ptr, struct process_dll, entry );
generate_debug_event( first_thread, LOAD_DLL_DEBUG_EVENT, dll );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment