From 08d1664121e7855d2477854ff1473e82d1731044 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 20 Jul 2009 18:51:42 +0000 Subject: 2009-07-20 Pedro Alves * features/gdb-target.dtd (target): Accept an optional 'osabi' element. (osabi): Define element. * features/mips-linux.xml (target): Add an osabi subelement set to GNU/Linux. * regformats/regdat.sh (xmlarch, xmlosabi): New variables. Don't write the architecture into $xmltarget. Store it in $xmlarch. Handle the 'osabi' type. Handle outputting the osabi element of the target description. * regformats/reg-x86-64-linux.dat (osabi): Set to GNU/Linux. * regformats/reg-i386-linux.dat (osabi): Set to GNU/Linux. * target-descriptions.h (tdesc_osabi, set_tdesc_osabi): Declare. * target-descriptions.c (struct target_desc) : New field. (tdesc_osabi): New function. (set_tdesc_osabi): New function. * xml-tdesc.c: Include osabi.h. (tdesc_end_osabi): New. (target_children): Parse "osabi" elements. * arch-utils.c (gdbarch_info_fill): Try to get the osabi from the target description if the user didn't override it or it is not extractable from the bfd. If that still fails, fallback to the configured in default. * osabi.h (osabi_from_tdesc_string): Declare. * osabi.c (osabi_from_tdesc_string): New. (gdbarch_lookup_osabi): Return GDB_OSABI_UNKNOWN instead of GDB_OSABI_DEFAULT. * NEWS: Mention that target descriptions can now describe the target OS ABI. 2009-07-20 Pedro Alves * gdb.texinfo (Target Description Format): Mention the new optional element. (subsection OS ABI): New subsection. --- gdb/osabi.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/osabi.h') diff --git a/gdb/osabi.h b/gdb/osabi.h index c1aa336..0b4a382 100644 --- a/gdb/osabi.h +++ b/gdb/osabi.h @@ -40,6 +40,10 @@ void gdbarch_register_osabi (enum bfd_architecture, unsigned long, /* Lookup the OS ABI corresponding to the specified BFD. */ enum gdb_osabi gdbarch_lookup_osabi (bfd *); +/* Lookup the OS ABI corresponding to the specified target description + string. */ +enum gdb_osabi osabi_from_tdesc_string (const char *text); + /* Initialize the gdbarch for the specified OS ABI variant. */ void gdbarch_init_osabi (struct gdbarch_info, struct gdbarch *); -- cgit v1.1