From: Pedro Alves Date: Sun, 25 Feb 2007 17:40:10 +0000 (+0000) Subject: * server.c (get_features_xml): Check if target implemented X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=820f2bda8e60b9fa27458fb5b68cebc062ec5e7d;p=binutils-gdb.git * 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. --- diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index e85c2e5c31c..82b9bfca176 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,10 @@ +2007-02-25 Pedro Alves + + * 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 * spu-low.c (spu_arch_string): New. diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index db2bfca8af3..b0a957f5cbc 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -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; diff --git a/gdb/gdbserver/win32-i386-low.c b/gdb/gdbserver/win32-i386-low.c index 817eb37d29b..6823b540b5e 100644 --- a/gdb/gdbserver/win32-i386-low.c +++ b/gdb/gdbserver/win32-i386-low.c @@ -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. */