robust-services-core
robust-services-core copied to clipboard
Change instruction pointer to kill thread
A thread is currently killed via Thread::FunctionInvoked, which is called by Debug::ft. A thread must therefore invoke a traced function to get killed. A more robust way to kill a thread is to change its instruction pointer so that it resumes execution in a function that throws an exception. However, implementing this is platform-specific. On Windows, for example, it probably means using CONTEXT, GetThreadContext, and SetThreadContext.