This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 15/26] gdb_byte for binary buffer, char for string: common/agent.c.
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 12 Apr 2013 00:00:45 +0100
- Subject: [PATCH 15/26] gdb_byte for binary buffer, char for string: common/agent.c.
- References: <20130411225847 dot 16791 dot 29283 dot stgit at brno dot lan>
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-11 Pedro Alves <palves@redhat.com>
* common/agent.c (agent_run_command): Add cast to gdb_byte *.
---
gdb/common/agent.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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)