From: Pierre Muller Date: Tue, 25 May 2010 07:38:18 +0000 (+0000) Subject: * windows-nat.c (display_selector): Call GetLastError to give better X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5572ce1f3da0a31e5e3692fac6694b013b8cc0fb;p=binutils-gdb.git * windows-nat.c (display_selector): Call GetLastError to give better failure explanation. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fa4ab8834e3..da246a0587a 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 5966b882b63..0ec393f8892 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; } }