Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Thiago Jung Bauermann via Gdb-patches <gdb-patches@sourceware.org>
To: Eduard Sargsyan <eduard.sargsyan@intel.com>
Cc: Aleksandar Paunovic <aleksandar.paunovic@intel.com>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] gdb: Improve the resuming of the stepped thread
Date: Thu, 25 Aug 2022 23:20:37 +0000	[thread overview]
Message-ID: <87sfljewqi.fsf@linaro.org> (raw)
In-Reply-To: <20220523180056.1415229-3-eduard.sargsyan@intel.com>


Hello Eduard,

Eduard Sargsyan via Gdb-patches <gdb-patches@sourceware.org> writes:

> From: Aleksandar Paunovic <aleksandar.paunovic@intel.com>
>
> Stepped thread should not be resumed (again) if the next stopping point
> (next stopping PC) cannot be determined.  Do not resume the stepped thread
> in this case.  Resuming would lead to an inconsistent state where the
> stepped thread would be running forever and GDB would never get to
> breakpoints of the other threads.  */
>
> gdb/ChangeLog:
> 2021-04-30  Aleksandar Paunovic  <aleksandar.paunovic@intel.com>
>
>         * infrun.c (keep_going_stepped_thread): Do not resume an
> 	already executing thread.
>
> gdb/testsuite/ChangeLog:
> 2021-04-30  Aleksandar Paunovic  <aleksandar.paunovic@intel.com>
>
> 	* gdb.base/breakpoint-running-inferior.exp: Add a start_step
> 	function check.
>
> Signed-off-by: Aleksandar Paunovic <aleksandar.paunovic@intel.com>
> ---
>  gdb/infrun.c                                      | 15 ++++++++++++++-
>  .../gdb.base/breakpoint-running-inferior.exp      |  5 +++++
>  2 files changed, 19 insertions(+), 1 deletion(-)

When Andrew Burgess reviewed this patch, Aleksandar said¹:

> Actually now when I tested this further I saw that this check (the whole patch) is
> unnecessary because GDB recovers successfully.
> Originally the regcache_read_pc function call (10 lines below my change) was throwing "PC
> register is not available" but it seems in the meantime this is fixed.
> I will put only first patch for review.

Has anything changed since then?

-- 
Thiago

¹ https://inbox.sourceware.org/gdb-patches/DM6PR11MB25889C3D6F45819B7D86EAE2F0319@DM6PR11MB2588.namprd11.prod.outlook.com/

  reply	other threads:[~2022-08-25 23:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-23 18:00 [PATCH 0/2] Some patches for multi inferior case Eduard Sargsyan via Gdb-patches
2022-05-23 18:00 ` [PATCH 1/2] gdb: Fix deleted thread when issuing next command Eduard Sargsyan via Gdb-patches
2022-08-25 23:11   ` Thiago Jung Bauermann via Gdb-patches
2022-05-23 18:00 ` [PATCH 2/2] gdb: Improve the resuming of the stepped thread Eduard Sargsyan via Gdb-patches
2022-08-25 23:20   ` Thiago Jung Bauermann via Gdb-patches [this message]
2022-06-22  8:22 ` [PATCH 0/2] Some patches for multi inferior case Sargsyan, Eduard via Gdb-patches
  -- strict thread matches above, loose matches on Subject: below --
2021-06-07  8:42 [PATCH 0/2] Fix next command in the running inferior aleksandar.paunovic via Gdb-patches
2021-06-07  8:42 ` [PATCH 2/2] gdb: Improve the resuming of the stepped thread aleksandar.paunovic via Gdb-patches
2021-06-07 13:48   ` Andrew Burgess
2021-06-14 10:47     ` Paunovic, Aleksandar 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=87sfljewqi.fsf@linaro.org \
    --to=gdb-patches@sourceware.org \
    --cc=aleksandar.paunovic@intel.com \
    --cc=eduard.sargsyan@intel.com \
    --cc=thiago.bauermann@linaro.org \
    /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