{
/* FIXME right place to set this? */
thread_from_wait = ((struct inferior_list_entry *)current_inferior)->id;
+ unsigned int gdb_id_from_wait = thread_to_gdb_id (current_inferior);
+
if (debug_threads)
fprintf (stderr, "Writing resume reply for %ld\n\n", thread_from_wait);
/* This if (1) ought to be unnecessary. But remote_wait in GDB
if (1 || old_thread_from_wait != thread_from_wait)
{
general_thread = thread_from_wait;
- sprintf (buf, "thread:%lx;", thread_from_wait);
+ sprintf (buf, "thread:%x;", gdb_id_from_wait);
buf += strlen (buf);
old_thread_from_wait = thread_from_wait;
}