gdb_byte for binary buffer, char for string: common/agent.c.
authorPedro Alves <palves@redhat.com>
Fri, 19 Apr 2013 15:27:54 +0000 (15:27 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 19 Apr 2013 15:27:54 +0000 (15:27 +0000)
Similarly to the remote code, agent commands are mostly ascii.  Cast to
gdb_byte when treating the command buffer as raw memory bytes.

2013-04-19  Pedro Alves  <palves@redhat.com>

* common/agent.c (agent_run_command): Add cast to gdb_byte *.

gdb/ChangeLog
gdb/common/agent.c

index 8b3bfbd4929c2c35d0792648faacfb3e2f274ae8..7fd9460302f76ee387d444d1fc858937b2de6b83 100644 (file)
@@ -1,3 +1,7 @@
+2013-04-19  Pedro Alves  <palves@redhat.com>
+
+       * common/agent.c (agent_run_command): Add cast to gdb_byte *.
+
 2013-04-19  Pedro Alves  <palves@redhat.com>
 
        * remote.c (remote_write_bytes_aux, compare_sections_command)
index 632310d72fbc3da991f270a682fb8c45795fda61..f7bedc2c874a9a93a5f5765857e3d618d3708e35 100644 (file)
@@ -218,7 +218,8 @@ agent_run_command (int pid, const char *cmd, int len)
   int ret = write_inferior_memory (ipa_sym_addrs.addr_cmd_buf,
                                   (const unsigned char *) cmd, len);
 #else
-  int ret = target_write_memory (ipa_sym_addrs.addr_cmd_buf, cmd, len);
+  int ret = target_write_memory (ipa_sym_addrs.addr_cmd_buf,
+                                (gdb_byte *) cmd, len);
 #endif
 
   if (ret != 0)