Debugging Fundamentals Module 2 - Threads (Patreon)
Published:
2022-04-08 23:01:18
Imported:
2023-09
Flagged
Downloads
Content
Further Research
- CREATE_THREAD_DEBUG_INFO structure
- Thread Scheduling
- Context Switching
- CONTEXT structure
- GetThreadContext
- Processes, Threads, and Jobs in the Windows Operating System
Lab 2
When launched the debugger will print out the CREATE_THREAD_DEBUG_EVENT for each new thread as well as the CONTEXT for the thread. Because the CONTEXT is printed before the thread has be started only its initialization values will be present.
Notice that these threads are created after the “Hello World” is printed to the screen indicating that the main thread was not captured by the CREATE_THREAD_DEBUG_EVENT. This is because the main thread is created with the process is first launched.
Lab 2 - Exercise
Use the CREATE_PROCESS_DEBUG_EVENT from Lab 1 to print the CONTEXT for the main thread.