From 5572ce1f3da0a31e5e3692fac6694b013b8cc0fb Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Tue, 25 May 2010 07:38:18 +0000 Subject: [PATCH] * windows-nat.c (display_selector): Call GetLastError to give better failure explanation. --- gdb/ChangeLog | 5 +++++ gdb/windows-nat.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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; } } -- 2.30.2