1 /* OS ABI variant handling for GDB and gdbserver.
3 Copyright (C) 2001-2024 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 #ifndef OSABI_COMMON_H
21 #define OSABI_COMMON_H
23 /* List of known OS ABIs. If you change this, make sure to update the
27 #define GDB_OSABI_DEF_FIRST(Enum, Name, Regex) \
28 GDB_OSABI_ ## Enum = 0,
30 #define GDB_OSABI_DEF(Enum, Name, Regex) \
33 #define GDB_OSABI_DEF_LAST(Enum, Name, Regex) \
36 #include "gdbsupport/osabi.def"
38 #undef GDB_OSABI_DEF_LAST
40 #undef GDB_OSABI_DEF_FIRST
43 /* Lookup the OS ABI corresponding to the specified target description
45 enum gdb_osabi
osabi_from_tdesc_string (const char *text
);
47 /* Return the name of the specified OS ABI. */
48 const char *gdbarch_osabi_name (enum gdb_osabi
);
50 /* Return a regular expression that matches the OS part of a GNU
51 configury triplet for the given OSABI. */
52 const char *osabi_triplet_regexp (enum gdb_osabi osabi
);
54 #endif /* OSABI_COMMON_H */