From fce4c071610c0d01b70b172ee538e831023c1c2f Mon Sep 17 00:00:00 2001 From: =?utf8?q?=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9C?= =?utf8?q?=D0=B0=D1=80=D1=82=D1=8C=D1=8F=D0=BD=D0=BE=D0=B2?= Date: Sun, 17 Mar 2019 12:48:24 +0300 Subject: [PATCH] Fix wrong format specification in display_selector() There are a wrong format strings in function display_selector() in file windows-nat.c. This leads to build error using Cygwin on Windows. LDT_ENTRY.HighWord is a DWORD, which is unsigned long int, so the format specification should be for long int, not simply int. gdb/ChangeLog: 2019-03-17 Vladimir Martyanov PR gdb/24351 * windows-nat.c (display_selector): Format specifications fixed --- gdb/ChangeLog | 5 +++++ gdb/windows-nat.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 517d666c923..478ff0a873f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-03-17 Vladimir Martyanov + + PR gdb/24351 + * windows-nat.c (display_selector): Fix format specifiers. + 2019-03-17 Eli Zaretskii * tui/tui-winsource.c (tui_set_is_exec_point_at): Call diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 5caaa3b5650..c8acadd398d 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -1097,14 +1097,14 @@ display_selector (HANDLE thread, DWORD sel) puts_filtered ("Code (Exec/Read, Conf"); break; default: - printf_filtered ("Unknown type 0x%x",info.HighWord.Bits.Type); + printf_filtered ("Unknown type 0x%lx",info.HighWord.Bits.Type); } if ((info.HighWord.Bits.Type & 0x1) == 0) puts_filtered(", N.Acc"); puts_filtered (")\n"); if ((info.HighWord.Bits.Type & 0x10) == 0) puts_filtered("System selector "); - printf_filtered ("Priviledge level = %d. ", info.HighWord.Bits.Dpl); + printf_filtered ("Priviledge level = %ld. ", info.HighWord.Bits.Dpl); if (info.HighWord.Bits.Granularity) puts_filtered ("Page granular.\n"); else -- 2.30.2