From: Kevin Buettner via Gdb-patches <gdb-patches@sourceware.org>
To: <zhiyong.yan@windriver.com>
Cc: gdb-patches@sourceware.org, <tom@tromey.com>
Subject: Re: [PATCH] [patch] gdbserver assert error on arm platform
Date: Thu, 11 May 2023 14:04:07 -0700 [thread overview]
Message-ID: <20230511140407.0a0977fb@f37-zws-nv> (raw)
In-Reply-To: <20230511062001.2745878-1-zhiyong.yan@windriver.com>
I have some formatting nits as well as a request for a test case. See
below...
On Thu, 11 May 2023 14:20:01 +0800
<zhiyong.yan@windriver.com> wrote:
> From: Zhiyong Yan <zhiyong.yan@windriver.com>
>
> Bugzilla 30387 has given the steps of producing this issue on arm platform.
> Gdb should not assume pending threads always generate ___a non-gdbserver trap event___, a ___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.
In addition to the provided patch, could you also add a test case?
>
> LINK: https://sourceware.org/bugzilla/show_bug.cgi?id=30387
s/LINK/Bug/
>
> Signed-off-by: Zhiyong Yan zhiyong.yan@windriver.com
> ---
> gdbserver/linux-low.cc | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
> index e6a39202a98..543daf66376 100644
> --- a/gdbserver/linux-low.cc
> +++ b/gdbserver/linux-low.cc
> @@ -4670,8 +4670,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));
> + else{
> + threads_debug_printf ("leaving LWP %ld stopped", lwpid_of (thread));
> + if(thread->last_resume_kind == resume_step){
Missing space before left paren and after right paren.
> + /*
> + * If resume_step is required by GDB, install single-step breakpoint.
> + */
Format the above comment as:
/* If resume_step is required by GDB, install single-step breakpoint. */
If you want to use a block comment, don't prefix each line with a '*'. Also,
the trailing '*/' should be placed at the end of the last line in the block
comment. Likewise for the leading '/*'.
> + if (supports_software_single_step())
Missing space before '()'.
> + install_software_single_step_breakpoints (lwp);
> + }
> + }
>
> thread->last_status.set_ignore ();
> lwp->resume = NULL;
> --
> 2.25.1
>
next prev parent reply other threads:[~2023-05-11 21:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 6:20 zhiyong.yan
2023-05-11 21:04 ` Kevin Buettner via Gdb-patches [this message]
2023-06-19 1:50 ` Yan, Zhiyong
2023-06-20 7:35 ` Bruno Larsen via Gdb-patches
2023-06-20 8:08 ` Yan, Zhiyong
2023-06-22 1:44 ` Kevin Buettner via Gdb-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230511140407.0a0977fb@f37-zws-nv \
--to=gdb-patches@sourceware.org \
--cc=kevinb@redhat.com \
--cc=tom@tromey.com \
--cc=zhiyong.yan@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox