gdb: change gdbarch_has_dos_based_file_system to bool

Change-Id: I62125fd2657224bf112dd031b9251597dfdf3b06
Approved-By: Tom Tromey <tom@tromey.com>
diff --git a/gdb/gdbarch-gen.c b/gdb/gdbarch-gen.c
index e1f8759..52211c1 100644
--- a/gdb/gdbarch-gen.c
+++ b/gdb/gdbarch-gen.c
@@ -226,7 +226,7 @@ struct gdbarch
   gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at = default_fast_tracepoint_valid_at;
   gdbarch_guess_tracepoint_registers_ftype *guess_tracepoint_registers = default_guess_tracepoint_registers;
   gdbarch_auto_wide_charset_ftype *auto_wide_charset = default_auto_wide_charset;
-  int has_dos_based_file_system = 0;
+  bool has_dos_based_file_system = false;
   gdbarch_gen_return_address_ftype *gen_return_address = default_gen_return_address;
   gdbarch_info_proc_ftype *info_proc = nullptr;
   gdbarch_core_info_proc_ftype *core_info_proc = nullptr;
@@ -4800,7 +4800,7 @@ set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch,
   gdbarch->auto_wide_charset = auto_wide_charset;
 }
 
-int
+bool
 gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
@@ -4812,7 +4812,7 @@ gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
 
 void
 set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch,
-				       int has_dos_based_file_system)
+				       bool has_dos_based_file_system)
 {
   gdbarch->has_dos_based_file_system = has_dos_based_file_system;
 }
diff --git a/gdb/gdbarch-gen.h b/gdb/gdbarch-gen.h
index 3225a08..03b4ee0 100644
--- a/gdb/gdbarch-gen.h
+++ b/gdb/gdbarch-gen.h
@@ -1538,8 +1538,8 @@ extern void set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch, gdbarch_auto
    is, absolute paths include a drive name, and the backslash is
    considered a directory separator. */
 
-extern int gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch);
-extern void set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch, int has_dos_based_file_system);
+extern bool gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch);
+extern void set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch, bool has_dos_based_file_system);
 
 /* Generate bytecodes to collect the return address in a frame.
    Since the bytecodes run on the target, possibly with GDB not even
diff --git a/gdb/gdbarch_components.py b/gdb/gdbarch_components.py
index 6fdc576..1b1e73b 100644
--- a/gdb/gdbarch_components.py
+++ b/gdb/gdbarch_components.py
@@ -2443,9 +2443,9 @@
 is, absolute paths include a drive name, and the backslash is
 considered a directory separator.
 """,
-    type="int",
+    type="bool",
     name="has_dos_based_file_system",
-    predefault="0",
+    predefault="false",
     invalid=False,
 )
 
diff --git a/gdb/i386-go32-tdep.c b/gdb/i386-go32-tdep.c
index c9967eb..13c4b51 100644
--- a/gdb/i386-go32-tdep.c
+++ b/gdb/i386-go32-tdep.c
@@ -36,7 +36,7 @@ i386_go32_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   if (!tdesc_has_registers (info.target_desc))
     tdep->tdesc = i386_target_description (X86_XSTATE_X87_MASK, false);
 
-  set_gdbarch_has_dos_based_file_system (gdbarch, 1);
+  set_gdbarch_has_dos_based_file_system (gdbarch, true);
 
   set_gdbarch_wchar_bit (gdbarch, 16);
   set_gdbarch_wchar_signed (gdbarch, false);
diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c
index ee04ed1..a79d1b5 100644
--- a/gdb/windows-tdep.c
+++ b/gdb/windows-tdep.c
@@ -947,7 +947,7 @@ windows_init_abi_common (struct gdbarch_info info, struct gdbarch *gdbarch)
 
   /* Canonical paths on this target look like
      `c:\Program Files\Foo App\mydll.dll', for example.  */
-  set_gdbarch_has_dos_based_file_system (gdbarch, 1);
+  set_gdbarch_has_dos_based_file_system (gdbarch, true);
 
   set_gdbarch_make_solib_ops (gdbarch, make_windows_solib_ops);