mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 14:39:09 +08:00
Remove usage of find_inferior in linux_stabilize_threads
Replace with find_thread. gdb/gdbserver/ChangeLog: * linux-low.c (lwp_running): Return bool, remove unused argument. (linux_stabilize_threads): Use find_thread.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* linux-low.c (lwp_running): Return bool, remove unused
|
||||||
|
argument.
|
||||||
|
(linux_stabilize_threads): Use find_thread.
|
||||||
|
|
||||||
2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
|
2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
* linux-low.c (select_singlestep_lwp_callback): Remove.
|
* linux-low.c (select_singlestep_lwp_callback): Remove.
|
||||||
|
@ -2919,7 +2919,7 @@ unsuspend_all_lwps (struct lwp_info *except)
|
|||||||
|
|
||||||
static void move_out_of_jump_pad_callback (thread_info *thread);
|
static void move_out_of_jump_pad_callback (thread_info *thread);
|
||||||
static bool stuck_in_jump_pad_callback (thread_info *thread);
|
static bool stuck_in_jump_pad_callback (thread_info *thread);
|
||||||
static int lwp_running (thread_info *thread, void *data);
|
static bool lwp_running (thread_info *thread);
|
||||||
static ptid_t linux_wait_1 (ptid_t ptid,
|
static ptid_t linux_wait_1 (ptid_t ptid,
|
||||||
struct target_waitstatus *ourstatus,
|
struct target_waitstatus *ourstatus,
|
||||||
int target_options);
|
int target_options);
|
||||||
@ -2975,7 +2975,7 @@ linux_stabilize_threads (void)
|
|||||||
for_each_inferior (&all_threads, move_out_of_jump_pad_callback);
|
for_each_inferior (&all_threads, move_out_of_jump_pad_callback);
|
||||||
|
|
||||||
/* Loop until all are stopped out of the jump pads. */
|
/* Loop until all are stopped out of the jump pads. */
|
||||||
while (find_inferior (&all_threads, lwp_running, NULL) != NULL)
|
while (find_thread (lwp_running) != NULL)
|
||||||
{
|
{
|
||||||
struct target_waitstatus ourstatus;
|
struct target_waitstatus ourstatus;
|
||||||
struct lwp_info *lwp;
|
struct lwp_info *lwp;
|
||||||
@ -4121,16 +4121,15 @@ move_out_of_jump_pad_callback (thread_info *thread)
|
|||||||
current_thread = saved_thread;
|
current_thread = saved_thread;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static bool
|
||||||
lwp_running (thread_info *thread, void *data)
|
lwp_running (thread_info *thread)
|
||||||
{
|
{
|
||||||
struct lwp_info *lwp = get_thread_lwp (thread);
|
struct lwp_info *lwp = get_thread_lwp (thread);
|
||||||
|
|
||||||
if (lwp_is_marked_dead (lwp))
|
if (lwp_is_marked_dead (lwp))
|
||||||
return 0;
|
return false;
|
||||||
if (lwp->stopped)
|
|
||||||
return 0;
|
return !lwp->stopped;
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Stop all lwps that aren't stopped yet, except EXCEPT, if not NULL.
|
/* Stop all lwps that aren't stopped yet, except EXCEPT, if not NULL.
|
||||||
|
Reference in New Issue
Block a user