Fix format specification in display_selector() (again)
authorJon Turney <jon.turney@dronecode.org.uk>
Thu, 28 Mar 2019 14:02:25 +0000 (14:02 +0000)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 28 Mar 2019 21:10:45 +0000 (17:10 -0400)
DWORD type is not a long on 64-bit Cygwin, because that it is LP64.
Explicitly cast DWORD values to unsigned long and use an appropriate
format.

gdb/ChangeLog:

2019-03-28  Jon Turney  <jon.turney@dronecode.org.uk>

* windows-nat.c (display_selector): Fixed format specifications
for 64-bit Cygwin.

gdb/ChangeLog
gdb/windows-nat.c

index 7cb9d8dee0308a3ef488a4e6c45d78027dccc6de..0d1cb44957822c6ffbe484e1b38a2da2b4e75190 100644 (file)
@@ -1,3 +1,8 @@
+2019-03-28  Jon Turney  <jon.turney@dronecode.org.uk>
+
+       * windows-nat.c (display_selector): Fixed format specifications
+       for 64-bit Cygwin.
+
 2019-03-28  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
 
        * infrun.c (follow_exec): Call target_terminal::ours_for_output.
index d38ade5855b660585664e654dfb83ee16442e6f9..47f6cbb541265c62f59931fb562412ee92325012 100644 (file)
@@ -1096,14 +1096,16 @@ display_selector (HANDLE thread, DWORD sel)
          puts_filtered ("Code (Exec/Read, Conf");
          break;
        default:
-         printf_filtered ("Unknown type 0x%lx",info.HighWord.Bits.Type);
+         printf_filtered ("Unknown type 0x%lx",
+                          (unsigned long) 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 = %ld. ", info.HighWord.Bits.Dpl);
+      printf_filtered ("Priviledge level = %ld. ",
+                      (unsigned long) info.HighWord.Bits.Dpl);
       if (info.HighWord.Bits.Granularity)
        puts_filtered ("Page granular.\n");
       else
This page took 0.027008 seconds and 4 git commands to generate.