summaryrefslogtreecommitdiff
path: root/gdb/common
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-04-19 15:27:54 +0000
committerPedro Alves <palves@redhat.com>2013-04-19 15:27:54 +0000
commit34bcb4e371534d9a450ea11a578adff28704fa23 (patch)
treea4a3e0ee05ea036e56f5d392c50048b6f8f074a0 /gdb/common
parentea029ce7c43cebe294b644bc316eeefcc774d992 (diff)
downloadgdb-34bcb4e371534d9a450ea11a578adff28704fa23.tar.gz
gdb_byte for binary buffer, char for string: common/agent.c.
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 *.
Diffstat (limited to 'gdb/common')
-rw-r--r--gdb/common/agent.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/common/agent.c b/gdb/common/agent.c
index 632310d72fb..f7bedc2c874 100644
--- a/gdb/common/agent.c
+++ b/gdb/common/agent.c
@@ -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)