diff options
author | Pedro Alves <palves@redhat.com> | 2013-04-19 15:27:54 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-04-19 15:27:54 +0000 |
commit | fda0389f6a7b957340f66e16f2362eb4f9586069 (patch) | |
tree | f513b4ec071ff93df181569d7826279c707eef42 | |
parent | bc20a4afc3fa41cab07aa68571b713ecef0aa675 (diff) | |
download | fsf-binutils-gdb-fda0389f6a7b957340f66e16f2362eb4f9586069.zip fsf-binutils-gdb-fda0389f6a7b957340f66e16f2362eb4f9586069.tar.gz fsf-binutils-gdb-fda0389f6a7b957340f66e16f2362eb4f9586069.tar.bz2 |
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 *.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/common/agent.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8b3bfbd..7fd9460 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 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) (remote_read_qxfer) (remote_search_memory, remote_hostio_pwrite, remote_hostio_pread) diff --git a/gdb/common/agent.c b/gdb/common/agent.c index 632310d..f7bedc2 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) |