diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fa4ab8834e..da246a0587 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2010-05-21 Pierre Muller + + * windows-nat.c (display_selector): Call GetLastError to give better + failure explanation. + 2010-05-24 Pedro Alves * config.in: Regenerate. diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 5966b882b6..0ec393f889 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -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; } }