aboutsummaryrefslogtreecommitdiff
path: root/gdb/common
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2012-04-16 11:24:47 +0000
committerYao Qi <yao@codesourcery.com>2012-04-16 11:24:47 +0000
commit42476b702c78006853f79b2013af919c313c1f7a (patch)
tree8655c361c05aff36eb6782afa9e6e0a8a0ac4c43 /gdb/common
parent7bc83639079c1ba45fae3c16a00eb1806107ae28 (diff)
downloadgdb-42476b702c78006853f79b2013af919c313c1f7a.zip
gdb-42476b702c78006853f79b2013af919c313c1f7a.tar.gz
gdb-42476b702c78006853f79b2013af919c313c1f7a.tar.bz2
gdb/
* common/agent.c (agent_run_command): Add one more parameter `len'. Update callers. * common/agent.h: Update declaration. * linux-nat.c (linux_child_static_tracepoint_markers_by_strid): Update. (linux_child_static_tracepoint_markers_by_strid): Ditto. gdb/gdbserver/ * tracepoint.c (COPY_FIELD_TO_BUF): New macro. (struct tracepoint_action_ops) <send>: New field. (m_tracepoint_action_send, r_tracepoint_action_send): New. (agent_expr_send, x_tracepoint_action_send): New. (l_tracepoint_action_send): New. (cmd_qtdp): Download and install tracepoint according to `use_agent'. (run_inferior_command): Add one more parameter `len'. Update callers. (tracepoint_send_agent): New. (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
Diffstat (limited to 'gdb/common')
-rw-r--r--gdb/common/agent.c3
-rw-r--r--gdb/common/agent.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/gdb/common/agent.c b/gdb/common/agent.c
index ecb52dc..8fdc75a 100644
--- a/gdb/common/agent.c
+++ b/gdb/common/agent.c
@@ -208,12 +208,11 @@ gdb_connect_sync_socket (int pid)
socket. Return zero if success, otherwise return non-zero. */
int
-agent_run_command (int pid, const char *cmd)
+agent_run_command (int pid, const char *cmd, int len)
{
int fd;
int tid = agent_get_helper_thread_id ();
ptid_t ptid = ptid_build (pid, tid, 0);
- int len = strlen (cmd) + 1;
#ifdef GDBSERVER
int ret = write_inferior_memory (ipa_sym_addrs.addr_cmd_buf,
diff --git a/gdb/common/agent.h b/gdb/common/agent.h
index fa8bc36..aec0221 100644
--- a/gdb/common/agent.h
+++ b/gdb/common/agent.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-int agent_run_command (int pid, const char *cmd);
+int agent_run_command (int pid, const char *cmd, int len);
int agent_look_up_symbols (void *);