diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2019-03-28 14:02:25 +0000 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2019-03-28 17:10:45 -0400 |
commit | e432ccf1cb4685b990f9cf10cb84626f52239806 (patch) | |
tree | 0705c9204ad8f5fa39fc2cd95f86ba9d6aa65c08 /gdb | |
parent | 077cad8ec1ca069d8981ecdbfa68c24b12597f67 (diff) | |
download | gdb-e432ccf1cb4685b990f9cf10cb84626f52239806.zip gdb-e432ccf1cb4685b990f9cf10cb84626f52239806.tar.gz gdb-e432ccf1cb4685b990f9cf10cb84626f52239806.tar.bz2 |
Fix format specification in display_selector() (again)
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/windows-nat.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7cb9d8d..0d1cb44 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index d38ade58..47f6cbb 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -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 |