X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Ffilesystem.c;h=94a1a9cac056874870aa187e7e8016901f64a2e2;hb=4d91c2a4677b90802c8d369190927921bf8ee97d;hp=7f7157f3622d2b38d4dd252ce3b2518bc9f33687;hpb=cce7e648b9fd2892a6493ca2dbba2314e78287dd;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/filesystem.c b/gdb/filesystem.c index 7f7157f362..94a1a9cac0 100644 --- a/gdb/filesystem.c +++ b/gdb/filesystem.c @@ -1,6 +1,6 @@ /* Handle different target file systems for GDB, the GNU Debugger. - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 2010-2020 Free Software Foundation, Inc. This file is part of GDB. @@ -25,7 +25,7 @@ const char file_system_kind_auto[] = "auto"; const char file_system_kind_unix[] = "unix"; const char file_system_kind_dos_based[] = "dos-based"; -const char *target_file_system_kinds[] = +const char *const target_file_system_kinds[] = { file_system_kind_auto, file_system_kind_unix, @@ -39,7 +39,7 @@ effective_target_file_system_kind (void) { if (target_file_system_kind == file_system_kind_auto) { - if (gdbarch_has_dos_based_file_system (target_gdbarch)) + if (gdbarch_has_dos_based_file_system (target_gdbarch ())) return file_system_kind_dos_based; else return file_system_kind_unix; @@ -76,18 +76,16 @@ is \"%s\".\n"), value); } -/* Provide a prototype to silence -Wmissing-prototypes. */ -extern initialize_file_ftype _initialize_filesystem; - +void _initialize_filesystem (); void -_initialize_filesystem (void) +_initialize_filesystem () { add_setshow_enum_cmd ("target-file-system-kind", class_files, target_file_system_kinds, &target_file_system_kind, _("\ -Set assumed file system kind for target reported file names"), _("\ -Show assumed file system kind for target reported file names"), +Set assumed file system kind for target reported file names."), _("\ +Show assumed file system kind for target reported file names."), _("\ If `unix', target file names (e.g., loaded shared library file names)\n\ starting the forward slash (`/') character are considered absolute,\n\