This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I started working on generic OS ABI handling for GDB today, lifting from the various duplicated bits of code in several targets. There are two pieces to the generic code: * OS ABI handlers. These are basically the same as the OS ABI handlers that exist on a per-target basis, but when they're registered, you now specify a bfd_architecture. Only one OS ABI can exist per bfd_architecture. * OS ABI "sniffers". These peek at a BFD with a given bfd_architecture/bfd_flavour and determine which OS ABI is correct for that BFD. Multiple sniffers can exist for a given bfd_architecture/bfd_flavour, e.g. one to sniff out NetBSD a.out, one for FreeBSD a.out, etc. If a sniffer registers w/ bfd_architecture of "unknown", it can sniff files of any architecture for its flavour. There is a generic ELF sniffer that uses EI_OSABI and note sections. (This is an example of an arch == "unknown" sniffer.) The first sniffer to return other than GDB_OSABI_UNKNOWN wins, so sniffers should be careful to only claim BFDs they're sure about. Tomorrow I'll make the Alpha and SH targets use the generic OS ABI framework as examples. Comments appreciated. -- -- Jason R. Thorpe <thorpej@wasabisystems.com>
Attachment:
osabi-patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |