This is the mail archive of the gdb-patches@sourceware.org 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]

PATCH: Generate set_tdesc_osabi for valid OSABI


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++)
     {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]