aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2010-02-04 17:09:58 +0000
committerH.J. Lu <hjl.tools@gmail.com>2010-02-04 17:09:58 +0000
commitc3f08eb78059b1b86df7bbede842933bc81f4d17 (patch)
treef49c2b7296add468e0d231081886f25b7c61314a
parentfbe5da0e6f6fe7c8f3a26a465f9859608cc6df2a (diff)
downloadgdb-c3f08eb78059b1b86df7bbede842933bc81f4d17.zip
gdb-c3f08eb78059b1b86df7bbede842933bc81f4d17.tar.gz
gdb-c3f08eb78059b1b86df7bbede842933bc81f4d17.tar.bz2
Generate set_tdesc_osabi for valid OSABI.
2010-02-04 H.J. Lu <hongjiu.lu@intel.com> * target-descriptions.c: Include "osabi.h". (maint_print_c_tdesc_cmd): Generate set_tdesc_osabi for valid OSABI.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/target-descriptions.c11
2 files changed, 17 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7e3f057..7caab77 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2010-02-04 H.J. Lu <hongjiu.lu@intel.com>
+
+ * target-descriptions.c: Include "osabi.h".
+ (maint_print_c_tdesc_cmd): Generate set_tdesc_osabi for valid
+ OSABI.
+
2010-02-04 Tristan Gingold <gingold@adacore.com>
* machoread.c (macho_add_oso): Renamed to macho_register_oso.
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
index 02ab6fa..4fbc72c 100644
--- a/gdb/target-descriptions.c
+++ b/gdb/target-descriptions.c
@@ -29,6 +29,7 @@
#include "vec.h"
#include "xml-support.h"
#include "xml-tdesc.h"
+#include "osabi.h"
#include "gdb_assert.h"
#include "gdb_obstack.h"
@@ -1348,6 +1349,7 @@ maint_print_c_tdesc_cmd (char *args, int from_tty)
printf_unfiltered ("/* THIS FILE IS GENERATED. Original: %s */\n\n",
filename);
printf_unfiltered ("#include \"defs.h\"\n");
+ printf_unfiltered ("#include \"osabi.h\"\n");
printf_unfiltered ("#include \"target-descriptions.h\"\n");
printf_unfiltered ("\n");
@@ -1369,6 +1371,15 @@ maint_print_c_tdesc_cmd (char *args, int from_tty)
printf_unfiltered ("\n");
}
+ if (tdesc_osabi (tdesc) > GDB_OSABI_UNKNOWN
+ && tdesc_osabi (tdesc) < GDB_OSABI_INVALID)
+ {
+ printf_unfiltered
+ (" set_tdesc_osabi (result, osabi_from_tdesc_string (\"%s\"));\n",
+ gdbarch_osabi_name (tdesc_osabi (tdesc)));
+ printf_unfiltered ("\n");
+ }
+
for (ix = 0; VEC_iterate (arch_p, tdesc->compatible, ix, compatible);
ix++)
{