This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
PATCH: Generate set_tdesc_osabi for valid OSABI
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GDB <gdb-patches at sourceware dot org>
- Date: Thu, 4 Feb 2010 07:49:10 -0800
- Subject: PATCH: Generate set_tdesc_osabi for valid OSABI
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
We don't call set_tdesc_osabi even if there is
<osabi>GNU/Linux</osabi>
in target xml file. This patch adds it. OK to install?
Thanks.
H.J.
---
2010-02-04 H.J. Lu <hongjiu.lu@intel.com>
* target-descriptions.c (maint_print_c_tdesc_cmd): Generate
set_tdesc_osabi for valid OSABI.
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
index 720f0c7..c07173a 100644
--- a/gdb/target-descriptions.c
+++ b/gdb/target-descriptions.c
@@ -1427,6 +1427,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, (enum gdb_osabi) %d);\n",
+ (int) tdesc_osabi (tdesc));
+ printf_unfiltered ("\n");
+ }
+
for (ix = 0; VEC_iterate (arch_p, tdesc->compatible, ix, compatible);
ix++)
{