aboutsummaryrefslogtreecommitdiff
path: root/gdbserver
diff options
context:
space:
mode:
Diffstat (limited to 'gdbserver')
-rw-r--r--gdbserver/linux-low.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index 0cbfeb9..a896b37 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -1731,9 +1731,9 @@ linux_process_target::status_pending_p_callback (thread_info *thread,
struct lwp_info *
find_lwp_pid (ptid_t ptid)
{
- thread_info *thread = find_thread ([&] (thread_info *thr_arg)
+ long lwp = ptid.lwp () != 0 ? ptid.lwp () : ptid.pid ();
+ thread_info *thread = find_thread ([lwp] (thread_info *thr_arg)
{
- int lwp = ptid.lwp () != 0 ? ptid.lwp () : ptid.pid ();
return thr_arg->id.lwp () == lwp;
});