]>
Commit | Line | Data |
---|---|---|
70f80edf | 1 | /* OS ABI variant handling for GDB. |
3666a048 | 2 | Copyright (C) 2001-2021 Free Software Foundation, Inc. |
70f80edf JT |
3 | |
4 | This file is part of GDB. | |
5 | ||
6 | This program is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
a9762ec7 | 8 | the Free Software Foundation; either version 3 of the License, or |
70f80edf JT |
9 | (at your option) any later version. |
10 | ||
11 | This program is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
a9762ec7 | 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
70f80edf JT |
18 | |
19 | #ifndef OSABI_H | |
20 | #define OSABI_H | |
21 | ||
fe4b2ee6 SM |
22 | /* * List of known OS ABIs. If you change this, make sure to update the |
23 | table in osabi.c. */ | |
24 | enum gdb_osabi | |
25 | { | |
26 | GDB_OSABI_UNKNOWN = 0, /* keep this zero */ | |
27 | GDB_OSABI_NONE, | |
28 | ||
29 | GDB_OSABI_SVR4, | |
30 | GDB_OSABI_HURD, | |
31 | GDB_OSABI_SOLARIS, | |
32 | GDB_OSABI_LINUX, | |
33 | GDB_OSABI_FREEBSD, | |
34 | GDB_OSABI_NETBSD, | |
35 | GDB_OSABI_OPENBSD, | |
36 | GDB_OSABI_WINCE, | |
37 | GDB_OSABI_GO32, | |
38 | GDB_OSABI_QNXNTO, | |
39 | GDB_OSABI_CYGWIN, | |
053205cc | 40 | GDB_OSABI_WINDOWS, |
fe4b2ee6 SM |
41 | GDB_OSABI_AIX, |
42 | GDB_OSABI_DICOS, | |
43 | GDB_OSABI_DARWIN, | |
fe4b2ee6 SM |
44 | GDB_OSABI_OPENVMS, |
45 | GDB_OSABI_LYNXOS178, | |
46 | GDB_OSABI_NEWLIB, | |
47 | GDB_OSABI_SDE, | |
48 | GDB_OSABI_PIKEOS, | |
49 | ||
50 | GDB_OSABI_INVALID /* keep this last */ | |
51 | }; | |
52 | ||
70f80edf JT |
53 | /* Register an OS ABI sniffer. Each arch/flavour may have more than |
54 | one sniffer. This is used to e.g. differentiate one OS's a.out from | |
55 | another. The first sniffer to return something other than | |
56 | GDB_OSABI_UNKNOWN wins, so a sniffer should be careful to claim a file | |
57 | only if it knows for sure what it is. */ | |
58 | void gdbarch_register_osabi_sniffer (enum bfd_architecture, | |
59 | enum bfd_flavour, | |
60 | enum gdb_osabi (*)(bfd *)); | |
61 | ||
05816f70 MK |
62 | /* Register a handler for an OS ABI variant for a given architecture |
63 | and machine type. There should be only one handler for a given OS | |
64 | ABI for each architecture and machine type combination. */ | |
65 | void gdbarch_register_osabi (enum bfd_architecture, unsigned long, | |
66 | enum gdb_osabi, | |
dda83cd7 | 67 | void (*)(struct gdbarch_info, |
70f80edf JT |
68 | struct gdbarch *)); |
69 | ||
70 | /* Lookup the OS ABI corresponding to the specified BFD. */ | |
71 | enum gdb_osabi gdbarch_lookup_osabi (bfd *); | |
72 | ||
08d16641 PA |
73 | /* Lookup the OS ABI corresponding to the specified target description |
74 | string. */ | |
75 | enum gdb_osabi osabi_from_tdesc_string (const char *text); | |
76 | ||
70f80edf | 77 | /* Initialize the gdbarch for the specified OS ABI variant. */ |
4be87837 | 78 | void gdbarch_init_osabi (struct gdbarch_info, struct gdbarch *); |
70f80edf JT |
79 | |
80 | /* Return the name of the specified OS ABI. */ | |
81 | const char *gdbarch_osabi_name (enum gdb_osabi); | |
82 | ||
ac04f72b TT |
83 | /* Return a regular expression that matches the OS part of a GNU |
84 | configury triplet for the given OSABI. */ | |
85 | const char *osabi_triplet_regexp (enum gdb_osabi osabi); | |
86 | ||
70f80edf | 87 | /* Helper routine for ELF file sniffers. This looks at ABI tag note |
b35c1d1c TT |
88 | sections to determine the OS ABI from the note. */ |
89 | void generic_elf_osabi_sniff_abi_tag_sections (bfd *, asection *, | |
90 | enum gdb_osabi *); | |
70f80edf JT |
91 | |
92 | #endif /* OSABI_H */ |