summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
25c28b4)
Replace with find_thread.
gdb/gdbserver/ChangeLog:
* linux-low.c (need_step_over_p): Return bool, remove dummy
argument.
(linux_resume, proceed_all_lwps): Use find_thread.
+2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
+
+ * linux-low.c (need_step_over_p): Return bool, remove dummy
+ argument.
+ (linux_resume, proceed_all_lwps): Use find_thread.
+
2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
* linux-low.c (resume_status_pending_p): Return bool, remove
2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
* linux-low.c (resume_status_pending_p): Return bool, remove
required STOP_PC adjustment has already been propagated to the
inferior's regcache. */
required STOP_PC adjustment has already been propagated to the
inferior's regcache. */
-static int
-need_step_over_p (thread_info *thread, void *dummy)
+static bool
+need_step_over_p (thread_info *thread)
{
struct lwp_info *lwp = get_thread_lwp (thread);
struct thread_info *saved_thread;
{
struct lwp_info *lwp = get_thread_lwp (thread);
struct thread_info *saved_thread;
/* GDBserver is skipping the extra traps from the wrapper program,
don't have to do step over. */
if (proc->tdesc == NULL)
/* GDBserver is skipping the extra traps from the wrapper program,
don't have to do step over. */
if (proc->tdesc == NULL)
/* LWPs which will not be resumed are not interesting, because we
might not wait for them next time through linux_wait. */
/* LWPs which will not be resumed are not interesting, because we
might not wait for them next time through linux_wait. */
if (debug_threads)
debug_printf ("Need step over [LWP %ld]? Ignoring, not stopped\n",
lwpid_of (thread));
if (debug_threads)
debug_printf ("Need step over [LWP %ld]? Ignoring, not stopped\n",
lwpid_of (thread));
}
if (thread->last_resume_kind == resume_stop)
}
if (thread->last_resume_kind == resume_stop)
debug_printf ("Need step over [LWP %ld]? Ignoring, should remain"
" stopped\n",
lwpid_of (thread));
debug_printf ("Need step over [LWP %ld]? Ignoring, should remain"
" stopped\n",
lwpid_of (thread));
}
gdb_assert (lwp->suspended >= 0);
}
gdb_assert (lwp->suspended >= 0);
if (debug_threads)
debug_printf ("Need step over [LWP %ld]? Ignoring, suspended\n",
lwpid_of (thread));
if (debug_threads)
debug_printf ("Need step over [LWP %ld]? Ignoring, suspended\n",
lwpid_of (thread));
}
if (lwp->status_pending_p)
}
if (lwp->status_pending_p)
debug_printf ("Need step over [LWP %ld]? Ignoring, has pending"
" status.\n",
lwpid_of (thread));
debug_printf ("Need step over [LWP %ld]? Ignoring, has pending"
" status.\n",
lwpid_of (thread));
}
/* Note: PC, not STOP_PC. Either GDB has adjusted the PC already,
}
/* Note: PC, not STOP_PC. Either GDB has adjusted the PC already,
"Old stop_pc was 0x%s, PC is now 0x%s\n",
lwpid_of (thread),
paddress (lwp->stop_pc), paddress (pc));
"Old stop_pc was 0x%s, PC is now 0x%s\n",
lwpid_of (thread),
paddress (lwp->stop_pc), paddress (pc));
}
/* On software single step target, resume the inferior with signal
}
/* On software single step target, resume the inferior with signal
" signals.\n",
lwpid_of (thread));
" signals.\n",
lwpid_of (thread));
}
saved_thread = current_thread;
}
saved_thread = current_thread;
lwpid_of (thread), paddress (pc));
current_thread = saved_thread;
lwpid_of (thread), paddress (pc));
current_thread = saved_thread;
that find_inferior stops looking. */
current_thread = saved_thread;
that find_inferior stops looking. */
current_thread = saved_thread;
" at 0x%s\n",
lwpid_of (thread), paddress (pc));
" at 0x%s\n",
lwpid_of (thread), paddress (pc));
}
/* Start a step-over operation on LWP. When LWP stopped at a
}
/* Start a step-over operation on LWP. When LWP stopped at a
to queue any signals that would otherwise be delivered or
queued. */
if (!any_pending && supports_breakpoints ())
to queue any signals that would otherwise be delivered or
queued. */
if (!any_pending && supports_breakpoints ())
- need_step_over
- = (struct thread_info *) find_inferior (&all_threads,
- need_step_over_p, NULL);
+ need_step_over = find_thread (need_step_over_p);
leave_all_stopped = (need_step_over != NULL || any_pending);
leave_all_stopped = (need_step_over != NULL || any_pending);
if (supports_breakpoints ())
{
if (supports_breakpoints ())
{
- need_step_over
- = (struct thread_info *) find_inferior (&all_threads,
- need_step_over_p, NULL);
+ need_step_over = find_thread (need_step_over_p);
if (need_step_over != NULL)
{
if (need_step_over != NULL)
{