gdbserver: Install single-step breakpoint for a pending thread whose last_resume_kind is resume_step
Message ID | 20230703030458.1192525-1-zhiyong.yan@windriver.com |
---|---|
State | New |
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 627143857704 for <patchwork@sourceware.org>; Mon, 3 Jul 2023 03:05:17 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mx0a-0064b401.pphosted.com (mx0a-0064b401.pphosted.com [205.220.166.238]) by sourceware.org (Postfix) with ESMTPS id 94F13385843E for <gdb-patches@sourceware.org>; Mon, 3 Jul 2023 03:05:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 94F13385843E Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=windriver.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=windriver.com Received: from pps.filterd (m0250810.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3632x25A022471; Sun, 2 Jul 2023 20:05:01 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=PPS06212021; bh=DamoFudWMrXxo2Di2u 1RYW/t3Zr73sA7Q0Fz8XWxovQ=; b=HyByitULF+XhI9eQjsZI/Fh136gluVyMr0 iq6IEsWSw13PDNedtn8sEV1bhkRjsAdKCl/RIFKDESyGfASuoIj7PLFkaOXKtLR6 7hXm2/vHpnzg2jwrMM5kPwoR8Tg0X0Tdv0VoizzwjWvP0+4qALsX7YBBnV26fchC RB9m1ut6YsYEUJzP6B7NKQY9ezq2huvw84H41igVRpWy36HgPn5yv4eqkR41flNZ E/6Jlcdg2XMSuH/Z427mdC5pE7CJi47gaa8EsjgbFMzH4G7D6G9Rf9K81DfiRvVa TpbyR4WGmsgR//xbHy+F2X29AqqyoIbisWJFWTr+ffTuLp+cge+A== Received: from ala-exchng02.corp.ad.wrs.com (ala-exchng02.wrs.com [147.11.82.254]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3rjfdys454-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Sun, 02 Jul 2023 20:05:01 -0700 (PDT) Received: from ALA-EXCHNG02.corp.ad.wrs.com (147.11.82.254) by ALA-EXCHNG02.corp.ad.wrs.com (147.11.82.254) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Sun, 2 Jul 2023 20:05:00 -0700 Received: from pek-lpd-ccm6.wrs.com (147.11.1.11) by ALA-EXCHNG02.corp.ad.wrs.com (147.11.82.254) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Sun, 2 Jul 2023 20:04:59 -0700 From: <zhiyong.yan@windriver.com> To: <gdb-patches@sourceware.org> CC: <tom@tromey.com>, <zhiyong.yan@windriver.com> Subject: [PATCH] gdbserver: Install single-step breakpoint for a pending thread whose last_resume_kind is resume_step Date: Mon, 3 Jul 2023 11:04:58 +0800 Message-ID: <20230703030458.1192525-1-zhiyong.yan@windriver.com> X-Mailer: git-send-email 2.35.5 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: SYkqhZaZPYBU-59zCIf3nPuDRpnlREVh X-Proofpoint-ORIG-GUID: SYkqhZaZPYBU-59zCIf3nPuDRpnlREVh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-03_02,2023-06-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 malwarescore=0 priorityscore=1501 mlxlogscore=670 suspectscore=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2305260000 definitions=main-2307030027 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
gdbserver: Install single-step breakpoint for a pending thread whose last_resume_kind is resume_step
|
|
Commit Message
Yan, Zhiyong
July 3, 2023, 3:04 a.m. UTC
From: Zhiyong Yan <zhiyong.yan@windriver.com> Gdb should not assume pending threads always generate “a non-gdbserver trap event”, for example “Signal 17” event could happen. Now that resume_stopped_resumed_lwps() -> may_hw_step() assumes that the break point must already exist, resume_one_thread() should ensure the software breaking point is installed although the thread is pending. Signed-off-by: Zhiyong Yan zhiyong.yan@windriver.com Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30387 --- gdbserver/linux-low.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
Comments
On Mon, Jul 3, 2023 at 5:05 AM <zhiyong.yan@windriver.com> wrote: > From: Zhiyong Yan <zhiyong.yan@windriver.com> > > Gdb should not assume pending threads always generate “a non-gdbserver > trap event”, for example “Signal 17” event could happen. Now that > resume_stopped_resumed_lwps() -> may_hw_step() assumes that the break point > must already exist, resume_one_thread() should ensure the software breaking > point is installed although the thread is pending. > > Signed-off-by: Zhiyong Yan zhiyong.yan@windriver.com > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30387 I can confirm this patch causes no regression Fedora-Rawhide, ppc64le.
Hi Alexandra, Thanks for your feedback. Best Regards. Zhiyong From: Alexandra Petlanova Hajkova <ahajkova@redhat.com> Sent: Monday, July 10, 2023 8:46 PM To: Yan, Zhiyong <Zhiyong.Yan@windriver.com> Cc: gdb-patches@sourceware.org; tom@tromey.com Subject: Re: [PATCH] gdbserver: Install single-step breakpoint for a pending thread whose last_resume_kind is resume_step CAUTION: This email comes from a non Wind River email account! Do not click links or open attachments unless you recognize the sender and know the content is safe. On Mon, Jul 3, 2023 at 5:05 AM <zhiyong.yan@windriver.com<mailto:zhiyong.yan@windriver.com>> wrote: From: Zhiyong Yan <zhiyong.yan@windriver.com<mailto:zhiyong.yan@windriver.com>> Gdb should not assume pending threads always generate “a non-gdbserver trap event”, for example “Signal 17” event could happen. Now that resume_stopped_resumed_lwps() -> may_hw_step() assumes that the break point must already exist, resume_one_thread() should ensure the software breaking point is installed although the thread is pending. Signed-off-by: Zhiyong Yan zhiyong.yan@windriver.com<mailto:zhiyong.yan@windriver.com> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30387<https://urldefense.com/v3/__https:/sourceware.org/bugzilla/show_bug.cgi?id=30387__;!!AjveYdw8EvQ!fkg3Ae-1jPyI75siqABZuT57DvfkxmNtWeqO1A1Jly9PEvrBravJqc2Eou3b6H0Qfc31GRg9fixINWkyyZW8IwY$> I can confirm this patch causes no regression Fedora-Rawhide, ppc64le.
Hi Zhiyong, See my comments below; there's still one formatting nit, but I also have a question about whether this is the right place to fix the bug that you're seeing. Also, I've added Luis to the CC list since he knows a lot more about the ARM architecture than I do. On Mon, 3 Jul 2023 11:04:58 +0800 <zhiyong.yan@windriver.com> wrote: > From: Zhiyong Yan <zhiyong.yan@windriver.com> > > Gdb should not assume pending threads always generate "a non-gdbserver trap event", for example "Signal 17" event could happen. Now that resume_stopped_resumed_lwps() -> may_hw_step() assumes that the break point must already exist, resume_one_thread() should ensure the software breaking point is installed although the thread is pending. > > Signed-off-by: Zhiyong Yan zhiyong.yan@windriver.com > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30387 > --- > gdbserver/linux-low.cc | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc > index e6a39202a98..7d8bbf71ddc 100644 > --- a/gdbserver/linux-low.cc > +++ b/gdbserver/linux-low.cc > @@ -4671,7 +4671,16 @@ linux_process_target::resume_one_thread (thread_info *thread, > proceed_one_lwp (thread, NULL); > } > else > - threads_debug_printf ("leaving LWP %ld stopped", lwpid_of (thread)); > + { > + threads_debug_printf ("leaving LWP %ld stopped", lwpid_of (thread)); > + if (thread->last_resume_kind == resume_step) > + { > + /* If resume_step is required by GDB, > + install single-step breakpoint. */ > + if (supports_software_single_step()) Formatting nit: you need a space between 'supports_software_single_step' and the left paren. > + install_software_single_step_breakpoints (lwp); > + } > + } > > thread->last_status.set_ignore (); > lwp->resume = NULL; With regard to the change itself... If the debugging printf is accurate, the LWP is being left in a stopped state. If that's the case, then why are software single step breakpoints being inserted? It seems to me that you'd only want to insert these breakpoints when the thread is actually about to resume. That said, I have no doubt that this change works for you, so clearly there's something going on which I do not understand. I'd like to understand the situation better before approving it. Also, once you have an explanation, please update the code comments and/or commit log message as appropriate. My personal preference is for a concise explanation to be placed in the code comments with any additional, longer winded explanations or examples being placed in the commit log message. Kevin
Hi Kevin, My last mail's attachment is a little big, I am not sure if you can receive it. I zipped the log, and send again. - For "format nit", I will work on it again. - For your concern "I'd like to understand the situation better before approving it.", Please check attached " step5-assert.txt". Attached step5-assert.txt is a debug log which contains several "gdb step next" output. For example, at line 29, resume_one_thread() doesn't call process_one_lwp() because thread LWP 316.316 is pending, as a result the software breaking point is not installed. Later, if this pending thread makes "wait_1: Hit a non-gdbserver trap event." happen, stop_all_lwps() -> "prepare_resume_reply: Writing resume reply for" ->... In such case, "gdb N" can finish without assert error. But in step5-assert.txt, from line 14923 to 14943, we can see the pending thread make below happen, " wait_for_event_filtered: Got a pending child 316 362.994099 [threads] wait_for_event_filtered: Got an event from pending child 316 (117f) 362.994379 [threads] wait_1: Ignored signal 17 for LWP 316 " In this case "resume_stopped_resumed_lwps" will resume every 'stopped-resumed' thread, but a thread (previously pending) has no software break point installed, then resume_stopped_resumed_lwps() asserts failed in maybe_hw_step(). Best Regards. Zhiyong -----Original Message----- From: Kevin Buettner <kevinb@redhat.com> Sent: Wednesday, July 12, 2023 2:43 AM To: Yan, Zhiyong <Zhiyong.Yan@windriver.com> Cc: gdb-patches@sourceware.org; tom@tromey.com; luis.machado@arm.com Subject: Re: [PATCH] gdbserver: Install single-step breakpoint for a pending thread whose last_resume_kind is resume_step CAUTION: This email comes from a non Wind River email account! Do not click links or open attachments unless you recognize the sender and know the content is safe. Hi Zhiyong, See my comments below; there's still one formatting nit, but I also have a question about whether this is the right place to fix the bug that you're seeing. Also, I've added Luis to the CC list since he knows a lot more about the ARM architecture than I do. On Mon, 3 Jul 2023 11:04:58 +0800 <zhiyong.yan@windriver.com> wrote: > From: Zhiyong Yan <zhiyong.yan@windriver.com> > > Gdb should not assume pending threads always generate "a non-gdbserver trap event", for example "Signal 17" event could happen. Now that resume_stopped_resumed_lwps() -> may_hw_step() assumes that the break point must already exist, resume_one_thread() should ensure the software breaking point is installed although the thread is pending. > > Signed-off-by: Zhiyong Yan zhiyong.yan@windriver.com > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30387 > --- > gdbserver/linux-low.cc | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc index > e6a39202a98..7d8bbf71ddc 100644 > --- a/gdbserver/linux-low.cc > +++ b/gdbserver/linux-low.cc > @@ -4671,7 +4671,16 @@ linux_process_target::resume_one_thread (thread_info *thread, > proceed_one_lwp (thread, NULL); > } > else > - threads_debug_printf ("leaving LWP %ld stopped", lwpid_of (thread)); > + { > + threads_debug_printf ("leaving LWP %ld stopped", lwpid_of (thread)); > + if (thread->last_resume_kind == resume_step) > + { > + /* If resume_step is required by GDB, > + install single-step breakpoint. */ > + if (supports_software_single_step()) Formatting nit: you need a space between 'supports_software_single_step' and the left paren. > + install_software_single_step_breakpoints (lwp); > + } > + } > > thread->last_status.set_ignore (); > lwp->resume = NULL; With regard to the change itself... If the debugging printf is accurate, the LWP is being left in a stopped state. If that's the case, then why are software single step breakpoints being inserted? It seems to me that you'd only want to insert these breakpoints when the thread is actually about to resume. That said, I have no doubt that this change works for you, so clearly there's something going on which I do not understand. I'd like to understand the situation better before approving it. Also, once you have an explanation, please update the code comments and/or commit log message as appropriate. My personal preference is for a concise explanation to be placed in the code comments with any additional, longer winded explanations or examples being placed in the commit log message. Kevin
Hi all, For "format nit", I have sent new patch again. Because add more mail CC, I send patch triple today, they same. Sorry for bothering you. Best Regards. Zhiyong -----Original Message----- From: Yan, Zhiyong Sent: Wednesday, July 12, 2023 10:34 AM To: Kevin Buettner <kevinb@redhat.com> Cc: gdb-patches@sourceware.org; tom@tromey.com; luis.machado@arm.com Subject: RE: [PATCH] gdbserver: Install single-step breakpoint for a pending thread whose last_resume_kind is resume_step Hi Kevin, My last mail's attachment is a little big, I am not sure if you can receive it. I zipped the log, and send again. - For "format nit", I will work on it again. - For your concern "I'd like to understand the situation better before approving it.", Please check attached " step5-assert.txt". Attached step5-assert.txt is a debug log which contains several "gdb step next" output. For example, at line 29, resume_one_thread() doesn't call process_one_lwp() because thread LWP 316.316 is pending, as a result the software breaking point is not installed. Later, if this pending thread makes "wait_1: Hit a non-gdbserver trap event." happen, stop_all_lwps() -> "prepare_resume_reply: Writing resume reply for" ->... In such case, "gdb N" can finish without assert error. But in step5-assert.txt, from line 14923 to 14943, we can see the pending thread make below happen, " wait_for_event_filtered: Got a pending child 316 362.994099 [threads] wait_for_event_filtered: Got an event from pending child 316 (117f) 362.994379 [threads] wait_1: Ignored signal 17 for LWP 316 " In this case "resume_stopped_resumed_lwps" will resume every 'stopped-resumed' thread, but a thread (previously pending) has no software break point installed, then resume_stopped_resumed_lwps() asserts failed in maybe_hw_step(). Best Regards. Zhiyong -----Original Message----- From: Kevin Buettner <kevinb@redhat.com> Sent: Wednesday, July 12, 2023 2:43 AM To: Yan, Zhiyong <Zhiyong.Yan@windriver.com> Cc: gdb-patches@sourceware.org; tom@tromey.com; luis.machado@arm.com Subject: Re: [PATCH] gdbserver: Install single-step breakpoint for a pending thread whose last_resume_kind is resume_step CAUTION: This email comes from a non Wind River email account! Do not click links or open attachments unless you recognize the sender and know the content is safe. Hi Zhiyong, See my comments below; there's still one formatting nit, but I also have a question about whether this is the right place to fix the bug that you're seeing. Also, I've added Luis to the CC list since he knows a lot more about the ARM architecture than I do. On Mon, 3 Jul 2023 11:04:58 +0800 <zhiyong.yan@windriver.com> wrote: > From: Zhiyong Yan <zhiyong.yan@windriver.com> > > Gdb should not assume pending threads always generate "a non-gdbserver trap event", for example "Signal 17" event could happen. Now that resume_stopped_resumed_lwps() -> may_hw_step() assumes that the break point must already exist, resume_one_thread() should ensure the software breaking point is installed although the thread is pending. > > Signed-off-by: Zhiyong Yan zhiyong.yan@windriver.com > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30387 > --- > gdbserver/linux-low.cc | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc index > e6a39202a98..7d8bbf71ddc 100644 > --- a/gdbserver/linux-low.cc > +++ b/gdbserver/linux-low.cc > @@ -4671,7 +4671,16 @@ linux_process_target::resume_one_thread (thread_info *thread, > proceed_one_lwp (thread, NULL); > } > else > - threads_debug_printf ("leaving LWP %ld stopped", lwpid_of (thread)); > + { > + threads_debug_printf ("leaving LWP %ld stopped", lwpid_of (thread)); > + if (thread->last_resume_kind == resume_step) > + { > + /* If resume_step is required by GDB, > + install single-step breakpoint. */ > + if (supports_software_single_step()) Formatting nit: you need a space between 'supports_software_single_step' and the left paren. > + install_software_single_step_breakpoints (lwp); > + } > + } > > thread->last_status.set_ignore (); > lwp->resume = NULL; With regard to the change itself... If the debugging printf is accurate, the LWP is being left in a stopped state. If that's the case, then why are software single step breakpoints being inserted? It seems to me that you'd only want to insert these breakpoints when the thread is actually about to resume. That said, I have no doubt that this change works for you, so clearly there's something going on which I do not understand. I'd like to understand the situation better before approving it. Also, once you have an explanation, please update the code comments and/or commit log message as appropriate. My personal preference is for a concise explanation to be placed in the code comments with any additional, longer winded explanations or examples being placed in the commit log message. Kevin
Hi, On 7/11/23 19:42, Kevin Buettner wrote: > Hi Zhiyong, > > See my comments below; there's still one formatting nit, but I also > have a question about whether this is the right place to fix the bug > that you're seeing. > > Also, I've added Luis to the CC list since he knows a lot more about > the ARM architecture than I do. I was aware of this one, but since it is generic code, I thought I'd defer it to the global maintainers. It doesn't look like something that can/should be handled in arch-specific layers. But I can revisit it if people think otherwise. > > On Mon, 3 Jul 2023 11:04:58 +0800 > <zhiyong.yan@windriver.com> wrote: > >> From: Zhiyong Yan <zhiyong.yan@windriver.com> >> >> Gdb should not assume pending threads always generate "a non-gdbserver trap event", for example "Signal 17" event could happen. Now that resume_stopped_resumed_lwps() -> may_hw_step() assumes that the break point must already exist, resume_one_thread() should ensure the software breaking point is installed although the thread is pending. >> >> Signed-off-by: Zhiyong Yan zhiyong.yan@windriver.com >> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30387 >> --- >> gdbserver/linux-low.cc | 11 ++++++++++- >> 1 file changed, 10 insertions(+), 1 deletion(-) >> >> diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc >> index e6a39202a98..7d8bbf71ddc 100644 >> --- a/gdbserver/linux-low.cc >> +++ b/gdbserver/linux-low.cc >> @@ -4671,7 +4671,16 @@ linux_process_target::resume_one_thread (thread_info *thread, >> proceed_one_lwp (thread, NULL); >> } >> else >> - threads_debug_printf ("leaving LWP %ld stopped", lwpid_of (thread)); >> + { >> + threads_debug_printf ("leaving LWP %ld stopped", lwpid_of (thread)); >> + if (thread->last_resume_kind == resume_step) >> + { >> + /* If resume_step is required by GDB, >> + install single-step breakpoint. */ >> + if (supports_software_single_step()) > > Formatting nit: you need a space between 'supports_software_single_step' > and the left paren. > >> + install_software_single_step_breakpoints (lwp); >> + } >> + } >> >> thread->last_status.set_ignore (); >> lwp->resume = NULL; > > With regard to the change itself... > > If the debugging printf is accurate, the LWP is being left in a > stopped state. If that's the case, then why are software single step > breakpoints being inserted? It seems to me that you'd only want > to insert these breakpoints when the thread is actually about to > resume. > > That said, I have no doubt that this change works for you, so clearly > there's something going on which I do not understand. I'd like to > understand the situation better before approving it. Also, once you > have an explanation, please update the code comments and/or commit log > message as appropriate. My personal preference is for a concise > explanation to be placed in the code comments with any additional, > longer winded explanations or examples being placed in the commit log > message. > > Kevin >
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc index e6a39202a98..7d8bbf71ddc 100644 --- a/gdbserver/linux-low.cc +++ b/gdbserver/linux-low.cc @@ -4671,7 +4671,16 @@ linux_process_target::resume_one_thread (thread_info *thread, proceed_one_lwp (thread, NULL); } else - threads_debug_printf ("leaving LWP %ld stopped", lwpid_of (thread)); + { + threads_debug_printf ("leaving LWP %ld stopped", lwpid_of (thread)); + if (thread->last_resume_kind == resume_step) + { + /* If resume_step is required by GDB, + install single-step breakpoint. */ + if (supports_software_single_step()) + install_software_single_step_breakpoints (lwp); + } + } thread->last_status.set_ignore (); lwp->resume = NULL;