Home | History | Annotate | Line # | Download | only in gdb
filesystem.h revision 1.1.1.4
      1      1.1  christos /* Handle different target file systems for GDB, the GNU Debugger.
      2  1.1.1.4  christos    Copyright (C) 2010-2017 Free Software Foundation, Inc.
      3      1.1  christos 
      4      1.1  christos    This file is part of GDB.
      5      1.1  christos 
      6      1.1  christos    This program is free software; you can redistribute it and/or modify
      7      1.1  christos    it under the terms of the GNU General Public License as published by
      8      1.1  christos    the Free Software Foundation; either version 3 of the License, or
      9      1.1  christos    (at your option) any later version.
     10      1.1  christos 
     11      1.1  christos    This program is distributed in the hope that it will be useful,
     12      1.1  christos    but WITHOUT ANY WARRANTY; without even the implied warranty of
     13      1.1  christos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14      1.1  christos    GNU General Public License for more details.
     15      1.1  christos 
     16      1.1  christos    You should have received a copy of the GNU General Public License
     17      1.1  christos    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
     18      1.1  christos 
     19      1.1  christos #ifndef FILESYSTEM_H
     20      1.1  christos #define FILESYSTEM_H
     21      1.1  christos 
     22      1.1  christos extern const char file_system_kind_auto[];
     23      1.1  christos extern const char file_system_kind_unix[];
     24      1.1  christos extern const char file_system_kind_dos_based[];
     25      1.1  christos 
     26      1.1  christos extern const char *target_file_system_kind;
     27      1.1  christos 
     28      1.1  christos /* Same as IS_DIR_SEPARATOR but with file system kind KIND's
     29      1.1  christos    semantics, instead of host semantics.  */
     30      1.1  christos 
     31      1.1  christos #define IS_TARGET_DIR_SEPARATOR(kind, c)				\
     32      1.1  christos   (((kind) == file_system_kind_dos_based) ? IS_DOS_DIR_SEPARATOR (c) \
     33      1.1  christos    : IS_UNIX_DIR_SEPARATOR (c))
     34      1.1  christos 
     35      1.1  christos /* Same as IS_ABSOLUTE_PATH but with file system kind KIND's
     36      1.1  christos    semantics, instead of host semantics.  */
     37      1.1  christos 
     38      1.1  christos #define IS_TARGET_ABSOLUTE_PATH(kind, p)				\
     39      1.1  christos   (((kind) == file_system_kind_dos_based) ? IS_DOS_ABSOLUTE_PATH (p) \
     40      1.1  christos    : IS_UNIX_ABSOLUTE_PATH (p))
     41      1.1  christos 
     42      1.1  christos /* Same as HAS_DRIVE_SPEC but with file system kind KIND's semantics,
     43      1.1  christos    instead of host semantics.  */
     44      1.1  christos 
     45      1.1  christos #define HAS_TARGET_DRIVE_SPEC(kind, p)					\
     46      1.1  christos   (((kind) == file_system_kind_dos_based) ? HAS_DOS_DRIVE_SPEC (p) \
     47      1.1  christos    : 0)
     48      1.1  christos 
     49      1.1  christos /* Same as lbasename, but with file system kind KIND's semantics,
     50      1.1  christos    instead of host semantics.  */
     51      1.1  christos extern const char *target_lbasename (const char *kind, const char *name);
     52      1.1  christos 
     53      1.1  christos /* The effective setting of "set target-file-system-kind", with "auto"
     54      1.1  christos    resolved to the real kind.  That is, you never see "auto" as a
     55      1.1  christos    result from this function.  */
     56      1.1  christos extern const char *effective_target_file_system_kind (void);
     57      1.1  christos 
     58      1.1  christos #endif
     59