]>
Commit | Line | Data |
---|---|---|
1 | /* OS ABI variant handling for GDB. | |
2 | Copyright 2001, 2002 Free Software Foundation, Inc. | |
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 | |
8 | the Free Software Foundation; either version 2 of the License, or | |
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 | |
17 | along with this program; if not, write to the Free Software | |
18 | Foundation, Inc., 59 Temple Place - Suite 330, | |
19 | Boston, MA 02111-1307, USA. */ | |
20 | ||
21 | #ifndef OSABI_H | |
22 | #define OSABI_H | |
23 | ||
24 | /* List of known OS ABIs. If you change this, make sure to update the | |
25 | table in osabi.c. */ | |
26 | enum gdb_osabi | |
27 | { | |
28 | GDB_OSABI_UNKNOWN = 0, /* keep this first */ | |
29 | ||
30 | GDB_OSABI_SVR4, | |
31 | GDB_OSABI_HURD, | |
32 | GDB_OSABI_SOLARIS, | |
33 | GDB_OSABI_OSF1, | |
34 | GDB_OSABI_LINUX, | |
35 | GDB_OSABI_FREEBSD_AOUT, | |
36 | GDB_OSABI_FREEBSD_ELF, | |
37 | GDB_OSABI_NETBSD_AOUT, | |
38 | GDB_OSABI_NETBSD_ELF, | |
39 | GDB_OSABI_WINCE, | |
40 | GDB_OSABI_GO32, | |
41 | GDB_OSABI_NETWARE, | |
42 | GDB_OSABI_IRIX, | |
43 | GDB_OSABI_LYNXOS, | |
44 | GDB_OSABI_INTERIX, | |
45 | GDB_OSABI_HPUX_ELF, | |
46 | GDB_OSABI_HPUX_SOM, | |
47 | ||
48 | GDB_OSABI_ARM_EABI_V1, | |
49 | GDB_OSABI_ARM_EABI_V2, | |
50 | GDB_OSABI_ARM_APCS, | |
51 | ||
52 | GDB_OSABI_INVALID /* keep this last */ | |
53 | }; | |
54 | ||
55 | /* Register an OS ABI sniffer. Each arch/flavour may have more than | |
56 | one sniffer. This is used to e.g. differentiate one OS's a.out from | |
57 | another. The first sniffer to return something other than | |
58 | GDB_OSABI_UNKNOWN wins, so a sniffer should be careful to claim a file | |
59 | only if it knows for sure what it is. */ | |
60 | void gdbarch_register_osabi_sniffer (enum bfd_architecture, | |
61 | enum bfd_flavour, | |
62 | enum gdb_osabi (*)(bfd *)); | |
63 | ||
64 | /* Register a handler for an OS ABI variant for a given architecture | |
65 | and machine type. There should be only one handler for a given OS | |
66 | ABI for each architecture and machine type combination. */ | |
67 | void gdbarch_register_osabi (enum bfd_architecture, unsigned long, | |
68 | enum gdb_osabi, | |
69 | void (*)(struct gdbarch_info, | |
70 | struct gdbarch *)); | |
71 | ||
72 | /* Lookup the OS ABI corresponding to the specified BFD. */ | |
73 | enum gdb_osabi gdbarch_lookup_osabi (bfd *); | |
74 | ||
75 | /* Initialize the gdbarch for the specified OS ABI variant. */ | |
76 | void gdbarch_init_osabi (struct gdbarch_info, struct gdbarch *, | |
77 | enum gdb_osabi); | |
78 | ||
79 | /* Return the name of the specified OS ABI. */ | |
80 | const char *gdbarch_osabi_name (enum gdb_osabi); | |
81 | ||
82 | /* Helper routine for ELF file sniffers. This looks at ABI tag note | |
83 | sections to determine the OS ABI from the note. It should be called | |
84 | via bfd_map_over_sections. */ | |
85 | void generic_elf_osabi_sniff_abi_tag_sections (bfd *, asection *, void *); | |
86 | ||
87 | #endif /* OSABI_H */ |