* server.c (get_features_xml): Check if target implemented
authorPedro Alves <palves@redhat.com>
Sun, 25 Feb 2007 17:40:10 +0000 (17:40 +0000)
committerPedro Alves <palves@redhat.com>
Sun, 25 Feb 2007 17:40:10 +0000 (17:40 +0000)
arch_string.
* win32-i386-low.c (win32_arch_string): New.
(win32_target_ops): Add win32_arch_string as arch_string member.

gdb/gdbserver/ChangeLog
gdb/gdbserver/server.c
gdb/gdbserver/win32-i386-low.c

index e85c2e5c31c881659fad7cf356d1cbd8980d47c1..82b9bfca17634baaa37af8b3fe113f41bb234064 100644 (file)
@@ -1,3 +1,10 @@
+2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
+
+       * server.c (get_features_xml): Check if target implemented
+       arch_string.
+       * win32-i386-low.c (win32_arch_string): New.
+       (win32_target_ops): Add win32_arch_string as arch_string member.
+
 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
 
        * spu-low.c (spu_arch_string): New.
index db2bfca8af34ebd2e9276a6a9d85fcdeb907860b..b0a957f5cbc77fe6d148297a6160201a86aa76c6 100644 (file)
@@ -216,7 +216,9 @@ get_features_xml (const char *annex)
 
   if (features_supported == -1)
     {
-      const char *arch = (*the_target->arch_string) ();
+      const char *arch = NULL;
+      if (the_target->arch_string != NULL)
+       arch = (*the_target->arch_string) ();
 
       if (arch == NULL)
        features_supported = 0;
index 817eb37d29bac4294f88458fef536cde954b23f3..6823b540b5eb75f57518848a6b21688173e0cc3b 100644 (file)
@@ -1054,6 +1054,12 @@ win32_write_inferior_memory (CORE_ADDR memaddr, const unsigned char *myaddr,
   return child_xfer_memory (memaddr, (char *) myaddr, len, 1, 0) != len;
 }
 
+static const char *
+win32_arch_string (void)
+{
+  return "i386";
+}
+
 static struct target_ops win32_target_ops = {
   win32_create_inferior,
   win32_attach,
@@ -1066,8 +1072,16 @@ static struct target_ops win32_target_ops = {
   win32_store_inferior_registers,
   win32_read_inferior_memory,
   win32_write_inferior_memory,
-  0,
-  0
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  win32_arch_string
 };
 
 /* Initialize the Win32 backend.  */