gdb/filesystem.h - gdb

Macros defined

Source code

  1. /* Handle different target file systems for GDB, the GNU Debugger.
  2.    Copyright (C) 2010-2015 Free Software Foundation, Inc.

  3.    This file is part of GDB.

  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 3 of the License, or
  7.    (at your option) any later version.

  8.    This program is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.    GNU General Public License for more details.

  12.    You should have received a copy of the GNU General Public License
  13.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  14. #ifndef FILESYSTEM_H
  15. #define FILESYSTEM_H

  16. extern const char file_system_kind_auto[];
  17. extern const char file_system_kind_unix[];
  18. extern const char file_system_kind_dos_based[];

  19. extern const char *target_file_system_kind;

  20. /* Same as IS_DIR_SEPARATOR but with file system kind KIND's
  21.    semantics, instead of host semantics.  */

  22. #define IS_TARGET_DIR_SEPARATOR(kind, c)                                \
  23.   (((kind) == file_system_kind_dos_based) ? IS_DOS_DIR_SEPARATOR (c) \
  24.    : IS_UNIX_DIR_SEPARATOR (c))

  25. /* Same as IS_ABSOLUTE_PATH but with file system kind KIND's
  26.    semantics, instead of host semantics.  */

  27. #define IS_TARGET_ABSOLUTE_PATH(kind, p)                                \
  28.   (((kind) == file_system_kind_dos_based) ? IS_DOS_ABSOLUTE_PATH (p) \
  29.    : IS_UNIX_ABSOLUTE_PATH (p))

  30. /* Same as HAS_DRIVE_SPEC but with file system kind KIND's semantics,
  31.    instead of host semantics.  */

  32. #define HAS_TARGET_DRIVE_SPEC(kind, p)                                        \
  33.   (((kind) == file_system_kind_dos_based) ? HAS_DOS_DRIVE_SPEC (p) \
  34.    : 0)

  35. /* Same as lbasename, but with file system kind KIND's semantics,
  36.    instead of host semantics.  */
  37. extern const char *target_lbasename (const char *kind, const char *name);

  38. /* The effective setting of "set target-file-system-kind", with "auto"
  39.    resolved to the real kind.  That is, you never see "auto" as a
  40.    result from this function.  */
  41. extern const char *effective_target_file_system_kind (void);

  42. #endif