aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/tracepoint.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2017-09-22 17:00:33 -0300
committerAlexandre Oliva <aoliva@redhat.com>2017-09-22 17:00:33 -0300
commit9e0703de64a6dd4deae2ebd569955f14337f2710 (patch)
treecec45139f1febef6441deabae142c3fb3f2c61f3 /gdb/gdbserver/tracepoint.c
parent13b9f79a1904081d984a64037af6457c1e3ff7b6 (diff)
parent43573013c9836f2b91b74b9b29dac35fdb41e06b (diff)
downloadgdb-9e0703de64a6dd4deae2ebd569955f14337f2710.zip
gdb-9e0703de64a6dd4deae2ebd569955f14337f2710.tar.gz
gdb-9e0703de64a6dd4deae2ebd569955f14337f2710.tar.bz2
Merge remote-tracking branch 'remotes/master' into users/aoliva/SFN
Updated local changes to binutils/testsuite/binutils-all/readelf.exp to match the unresolved (failed to assemble) messages introduced by Alan Modra.
Diffstat (limited to 'gdb/gdbserver/tracepoint.c')
-rw-r--r--gdb/gdbserver/tracepoint.c32
1 files changed, 10 insertions, 22 deletions
diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
index d4fe76a..0f41ff4 100644
--- a/gdb/gdbserver/tracepoint.c
+++ b/gdb/gdbserver/tracepoint.c
@@ -3956,17 +3956,6 @@ cmd_qtstmat (char *packet)
run_inferior_command (packet, strlen (packet) + 1);
}
-/* Helper for gdb_agent_about_to_close.
- Return non-zero if thread ENTRY is in the same process in DATA. */
-
-static int
-same_process_p (struct inferior_list_entry *entry, void *data)
-{
- int *pid = (int *) data;
-
- return ptid_get_pid (entry->id) == *pid;
-}
-
/* Sent the agent a command to close it. */
void
@@ -3981,8 +3970,7 @@ gdb_agent_about_to_close (int pid)
saved_thread = current_thread;
/* Find any thread which belongs to process PID. */
- current_thread = (struct thread_info *)
- find_inferior (&all_threads, same_process_p, &pid);
+ current_thread = find_any_thread_of_pid (pid);
strcpy (buf, "close");
@@ -5581,7 +5569,7 @@ force_unlock_trace_buffer (void)
case, if we want to move the thread out of the jump pad, we need to
single-step it until this function returns 0. */
-int
+fast_tpoint_collect_result
fast_tracepoint_collecting (CORE_ADDR thread_area,
CORE_ADDR stop_pc,
struct fast_tpoint_collect_status *status)
@@ -5656,7 +5644,7 @@ fast_tracepoint_collecting (CORE_ADDR thread_area,
if (tpoint == NULL)
{
warning ("in jump pad, but no matching tpoint?");
- return 0;
+ return fast_tpoint_collect_result::not_collecting;
}
else
{
@@ -5684,7 +5672,7 @@ fast_tracepoint_collecting (CORE_ADDR thread_area,
if (tpoint == NULL)
{
warning ("in trampoline, but no matching tpoint?");
- return 0;
+ return fast_tpoint_collect_result::not_collecting;
}
else
{
@@ -5712,14 +5700,14 @@ fast_tracepoint_collecting (CORE_ADDR thread_area,
{
trace_debug ("fast_tracepoint_collecting:"
" failed reading 'collecting' in the inferior");
- return 0;
+ return fast_tpoint_collect_result::not_collecting;
}
if (!ipa_collecting)
{
trace_debug ("fast_tracepoint_collecting: not collecting"
" (and nobody is).");
- return 0;
+ return fast_tpoint_collect_result::not_collecting;
}
/* Some thread is collecting. Check which. */
@@ -5732,7 +5720,7 @@ fast_tracepoint_collecting (CORE_ADDR thread_area,
{
trace_debug ("fast_tracepoint_collecting: not collecting "
"(another thread is)");
- return 0;
+ return fast_tpoint_collect_result::not_collecting;
}
tpoint
@@ -5742,7 +5730,7 @@ fast_tracepoint_collecting (CORE_ADDR thread_area,
warning ("fast_tracepoint_collecting: collecting, "
"but tpoint %s not found?",
paddress ((CORE_ADDR) ipa_collecting_obj.tpoint));
- return 0;
+ return fast_tpoint_collect_result::not_collecting;
}
/* The thread is within `gdb_collect', skip over the rest of
@@ -5769,7 +5757,7 @@ fast_tracepoint_collecting (CORE_ADDR thread_area,
fast_tracepoint_collecting, returning continue-until-break at %s",
paddress (tpoint->adjusted_insn_addr));
- return 1; /* continue */
+ return fast_tpoint_collect_result::before_insn; /* continue */
}
else
{
@@ -5780,7 +5768,7 @@ fast_tracepoint_collecting, returning continue-until-break at %s",
paddress (tpoint->adjusted_insn_addr),
paddress (tpoint->adjusted_insn_addr_end));
- return 2; /* single-step */
+ return fast_tpoint_collect_result::at_insn; /* single-step */
}
}