* win32-i386-low.c: Add 64-bit support.
[deliverable/binutils-gdb.git] / gdb / gdbserver / server.c
index 8666bcd87899f37fae5d861841e3de3fdc1ab1fc..9c05c7fcc53e8381cda5847d237cd8a4f91a76bb 100644 (file)
@@ -1463,6 +1463,29 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p)
       /* Otherwise, pretend we do not understand this packet.  */
     }
 
+  /* Windows OS Thread Information Block address support.  */
+  if (the_target->get_tib_address != NULL
+      && strncmp ("qGetTIBAddr:", own_buf, 12) == 0)
+    {
+      char *annex;
+      int n;
+      CORE_ADDR tlb;
+      ptid_t ptid = read_ptid (own_buf + 12, &annex);
+
+      n = (*the_target->get_tib_address) (ptid, &tlb);
+      if (n == 1)
+       {
+         sprintf (own_buf, "%llx", tlb);
+         return;
+       }
+      else if (n == 0)
+       {
+         write_enn (own_buf);
+         return;
+       }
+      return;
+    }
+
   /* Handle "monitor" commands.  */
   if (strncmp ("qRcmd,", own_buf, 6) == 0)
     {
@@ -2999,10 +3022,7 @@ handle_target_event (int err, gdb_client_data client_data)
 
       if (last_status.kind == TARGET_WAITKIND_EXITED
          || last_status.kind == TARGET_WAITKIND_SIGNALLED)
-       {
-         mourn_inferior (process);
-         remove_process (process);
-       }
+       mourn_inferior (process);
 
       if (forward_event)
        {
This page took 0.024367 seconds and 4 git commands to generate.