RE: [PATCH] gdbserver: Install single-step breakpoint for a pending thread whose last_resume_kind is resume_step

Yan, Zhiyong
2023-07-11T01:50:04Z

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.