]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: change gdbarch_has_dos_based_file_system to bool
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 27 Feb 2026 20:05:25 +0000 (15:05 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 9 Mar 2026 17:15:47 +0000 (13:15 -0400)
Change-Id: I62125fd2657224bf112dd031b9251597dfdf3b06
Approved-By: Tom Tromey <tom@tromey.com>
gdb/gdbarch-gen.c
gdb/gdbarch-gen.h
gdb/gdbarch_components.py
gdb/i386-go32-tdep.c
gdb/windows-tdep.c

index e1f8759a8ee9b521e97e605f00a0761cb4c9d91f..52211c138022638fc6939f286634e1fdc438b301 100644 (file)
@@ -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;
 }
index 3225a0857ebc7f98650e6d2cc5c27880ffa9422a..03b4ee0561cbb366840c4e6cd760a1c80d5f5ccf 100644 (file)
@@ -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
index 6fdc576283c0119b26ec6d7b5808cf06131d95ac..1b1e73bbe66c627791df5486e0179c46970b4f8a 100644 (file)
@@ -2443,9 +2443,9 @@ If true, the target OS has DOS-based file system semantics.  That
 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,
 )
 
index c9967eb5789d79ed118e807ada3f629d93f080cb..13c4b51c3f9e607021aeb1c5dc981ae507b0b6b3 100644 (file)
@@ -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);
index ee04ed10f2410defe38455a2f4b49fd55774a76f..a79d1b5e02e948dceb45546123413133112d5511 100644 (file)
@@ -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);