aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-02-02 18:04:29 +0000
committerPedro Alves <palves@redhat.com>2012-02-02 18:04:29 +0000
commite886a1732a221f36ae53d7c46383ffcaba865fdc (patch)
tree9ccde901b2e6170de36d0a7789cf2a63ee7f46ac /gdb/remote.c
parent526f25b299bdd3a21bded4102a192eb680817324 (diff)
downloadgdb-e886a1732a221f36ae53d7c46383ffcaba865fdc.zip
gdb-e886a1732a221f36ae53d7c46383ffcaba865fdc.tar.gz
gdb-e886a1732a221f36ae53d7c46383ffcaba865fdc.tar.bz2
gdbserver/
2012-02-02 Pedro Alves <palves@redhat.com> * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current inferior. gdb/ 2012-02-02 Pedro Alves <palves@redhat.com> * remote.c (remote_get_min_fast_tracepoint_insn_len): Return 0 if the current inferior has no execution. Make sure the current remote process matches gdb's current inferior.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 1153980..1c37b69 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -10592,6 +10592,14 @@ remote_get_min_fast_tracepoint_insn_len (void)
struct remote_state *rs = get_remote_state ();
char *reply;
+ /* If we're not debugging a process yet, the IPA can't be
+ loaded. */
+ if (!target_has_execution)
+ return 0;
+
+ /* Make sure the remote is pointing at the right process. */
+ set_general_process ();
+
sprintf (rs->buf, "qTMinFTPILen");
putpkt (rs->buf);
reply = remote_get_noisy_reply (&target_buf, &target_buf_size);