* windows-nat.c (display_selector): Call GetLastError to give better
authorPierre Muller <muller@sourceware.org>
Tue, 25 May 2010 07:38:18 +0000 (07:38 +0000)
committerPierre Muller <muller@sourceware.org>
Tue, 25 May 2010 07:38:18 +0000 (07:38 +0000)
failure explanation.

gdb/ChangeLog
gdb/windows-nat.c

index fa4ab8834e314c6faedd665d19263b2fc8da3e14..da246a0587a687498e8adb4184ea623c4e77c663 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-21  Pierre Muller  <muller@ics.u-strasbg.fr>
+
+       * windows-nat.c (display_selector): Call GetLastError to give better
+       failure explanation.
+
 2010-05-24  Pedro Alves  <pedro@codesourcery.com>
 
        * config.in: Regenerate.
index 5966b882b638ad4f77c58e2a1099593efb84d5ee..0ec393f88921d043bc5df22a6853df5cc2b1616e 100644 (file)
@@ -1032,7 +1032,11 @@ display_selector (HANDLE thread, DWORD sel)
     }
   else
     {
-      printf_filtered ("Invalid selector 0x%lx.\n",sel);
+      DWORD err = GetLastError ();
+      if (err == ERROR_NOT_SUPPORTED)
+       printf_filtered ("Function not supported\n");
+      else
+       printf_filtered ("Invalid selector 0x%lx.\n",sel);
       return 0;
     }
 }