GDB (API)
/home/stan/gdb/src/gdb/osabi.h
Go to the documentation of this file.
00001 /* OS ABI variant handling for GDB.
00002    Copyright (C) 2001-2013 Free Software Foundation, Inc.
00003    
00004    This file is part of GDB.
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 3 of the License, or
00009    (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00018 
00019 #ifndef OSABI_H
00020 #define OSABI_H
00021 
00022 /* Register an OS ABI sniffer.  Each arch/flavour may have more than
00023    one sniffer.  This is used to e.g. differentiate one OS's a.out from
00024    another.  The first sniffer to return something other than
00025    GDB_OSABI_UNKNOWN wins, so a sniffer should be careful to claim a file
00026    only if it knows for sure what it is.  */
00027 void gdbarch_register_osabi_sniffer (enum bfd_architecture,
00028                                      enum bfd_flavour,
00029                                      enum gdb_osabi (*)(bfd *));
00030 
00031 /* Register a handler for an OS ABI variant for a given architecture
00032    and machine type.  There should be only one handler for a given OS
00033    ABI for each architecture and machine type combination.  */
00034 void gdbarch_register_osabi (enum bfd_architecture, unsigned long,
00035                              enum gdb_osabi,
00036                              void (*)(struct gdbarch_info,
00037                                       struct gdbarch *));
00038 
00039 /* Lookup the OS ABI corresponding to the specified BFD.  */
00040 enum gdb_osabi gdbarch_lookup_osabi (bfd *);
00041 
00042 /* Lookup the OS ABI corresponding to the specified target description
00043    string.  */
00044 enum gdb_osabi osabi_from_tdesc_string (const char *text);
00045 
00046 /* Initialize the gdbarch for the specified OS ABI variant.  */
00047 void gdbarch_init_osabi (struct gdbarch_info, struct gdbarch *);
00048 
00049 /* Return the name of the specified OS ABI.  */
00050 const char *gdbarch_osabi_name (enum gdb_osabi);
00051 
00052 /* Helper routine for ELF file sniffers.  This looks at ABI tag note
00053    sections to determine the OS ABI from the note.  It should be called
00054    via bfd_map_over_sections.  */
00055 void generic_elf_osabi_sniff_abi_tag_sections (bfd *, asection *, void *);
00056 
00057 #endif /* OSABI_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines