Set thread start address to 0 on events generated by
DebugActiveProcess.
Return a correct address in the simulated exception event.
diff --git a/server/context_i386.c b/server/context_i386.c
index 821b528..52ee132 100644
--- a/server/context_i386.c
+++ b/server/context_i386.c
@@ -458,6 +458,19 @@
/* always need to be accessed by ptrace anyway */
}
+/* retrieve the current instruction pointer of a thread */
+void *get_thread_ip( struct thread *thread )
+{
+ CONTEXT context;
+ context.Eip = 0;
+ if (suspend_for_ptrace( thread ))
+ {
+ get_thread_context( thread, CONTEXT_CONTROL, &context );
+ resume_thread( thread );
+ }
+ return (void *)context.Eip;
+}
+
/* retrieve the current context of a thread */
DECL_HANDLER(get_thread_context)
{