]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/gdbserver/remote-utils.c
* inferiors.c (struct thread_info): Add gdb_id.
[thirdparty/binutils-gdb.git] / gdb / gdbserver / remote-utils.c
index 79792a502fbb7cb181fd9e4e97b27a2288d5febb..f85d26210f5e0bf5f303145e98583b2e63faf526 100644 (file)
@@ -683,6 +683,8 @@ prepare_resume_reply (char *buf, char status, unsigned char signo)
        {
          /* 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
@@ -692,7 +694,7 @@ prepare_resume_reply (char *buf, char status, unsigned char signo)
          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;
            }