nto & lynx x86: call init_target_desc
authorSimon Marchi <simon.marchi@ericsson.com>
Mon, 2 Oct 2017 09:00:30 +0000 (11:00 +0200)
committerSimon Marchi <simon.marchi@ericsson.com>
Mon, 2 Oct 2017 09:00:30 +0000 (11:00 +0200)
In gdbserver, target descriptions need to be initialized by calling
init_target_desc.  Because i386_create_target_description is shared with
GDB, it doesn't do that, the callers must take care of it.  These two
platforms currently don't.

I am not able to build them, so I couldn't test.

gdb/gdbserver/ChangeLog:

* lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
* nto-x86-low.c (nto_x86_arch_setup): Likewise.

gdb/gdbserver/ChangeLog
gdb/gdbserver/lynx-i386-low.c
gdb/gdbserver/nto-x86-low.c

index 6027c7f87dfeb1851e529b705d28a855616948f0..67223a06182a7ef4b6974a6ab28a56c6e5a717bc 100644 (file)
@@ -1,3 +1,8 @@
+2017-10-02  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
+       * nto-x86-low.c (nto_x86_arch_setup): Likewise.
+
 2017-09-29  Pedro Alves  <palves@redhat.com>
 
        * ax.c (gdb_parse_agent_expr): Constify.
index 57181d677d279aa888c1070cde0774a65ccefa72..a7eae1da988273cf26a0b7d0b12774617b91e20f 100644 (file)
@@ -293,7 +293,12 @@ lynx_i386_store_fpregset (struct regcache *regcache, const char *buf)
 static void
 lynx_i386_arch_setup (void)
 {
-  lynx_tdesc = i386_create_target_description (X86_XSTATE_SSE_MASK, false);
+  struct target_desc *tdesc
+    = i386_create_target_description (X86_XSTATE_SSE_MASK, false);
+
+  init_target_desc (tdesc);
+
+  lynx_tdesc = tdesc;
 }
 
 /* Description of all the x86-lynx register sets.  */
index cfa5993024b872f16dcc5bcce86907e00b0a11bb..48bdc53997fc3e9fafb8a878f45092a2d9d70472 100644 (file)
@@ -87,7 +87,12 @@ static void
 nto_x86_arch_setup (void)
 {
   the_low_target.num_regs = 16;
-  nto_tdesc = i386_create_target_description (X86_XSTATE_SSE_MASK, false);
+  struct target_desc *tdesc
+    = i386_create_target_description (X86_XSTATE_SSE_MASK, false);
+
+  init_target_desc (tdesc);
+
+  nto_tdesc = tdesc;
 }
 
 struct nto_target_ops the_low_target =