From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc29.google.com (mail-oo1-xc29.google.com [IPv6:2607:f8b0:4864:20::c29]) by sourceware.org (Postfix) with ESMTPS id 40DEC3856967 for ; Thu, 25 Aug 2022 23:20:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 40DEC3856967 Received: by mail-oo1-xc29.google.com with SMTP id a1-20020a4ab101000000b0044acf001f83so22513ooo.10 for ; Thu, 25 Aug 2022 16:20:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references:x-gm-message-state:from:to :cc; bh=w5IgDRJWaadu8DsZTej2QPolIpZbTc8BK4ZgnemXVhc=; b=Liy2aGUi48GfBX5RGBmrGV5mWvTNUb8QPMIUAP0q/EYGgVOhgt7ttYqfuTpvQ1HbCr gEP+STk1TwZ/8n4cdB2XLmSlUbSRmSx45JR0oDx9Eu6dXKJ4nRXkZ9ai41A6K8LIHKOe B+O6BjdlXyc1MN7MK2l+yZ0Y5zogrgEQOqDPiGQm6Ege8Y0ynETFjRFiZ45Tir+cLg3r ZELtYkBJMJm54qVfM8GQan2vNQzqE/+YeqWGU1fxUeR2aXT+nt7QXOsfXqdR3jHmY85W JtWdt0Vc6DDF1nxCTLWv0ylmrXFtMi2ENWQH5mhr+SD/qpvcS+PuyMyqYIiqJCWgBImF I3/w== X-Gm-Message-State: ACgBeo1tMML7UNz5yNYQ+/ExAd2Ml1mb0x/dKGPCbsF/T1nanrWbjpQh O7IaQMqUv6PJDEA24y5oQwQkx/tb/eDaPw== X-Google-Smtp-Source: AA6agR79pz/CdXmwwYjHD6mDRHnjEbL/zTJm0rNCmsulfu1ZUMq/Q1Z1ZZxTBG0YDKCeIqnpTy6EIw== X-Received: by 2002:a4a:d41:0:b0:44a:8081:733c with SMTP id 62-20020a4a0d41000000b0044a8081733cmr428690oob.71.1661469639544; Thu, 25 Aug 2022 16:20:39 -0700 (PDT) Received: from localhost ([2804:14c:8780:89d8:9238:a6ce:8505:b0a4]) by smtp.gmail.com with ESMTPSA id n6-20020a9d4d06000000b00636c81d4109sm208509otf.46.2022.08.25.16.20.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 16:20:39 -0700 (PDT) References: <20220523180056.1415229-1-eduard.sargsyan@intel.com> <20220523180056.1415229-3-eduard.sargsyan@intel.com> User-agent: mu4e 1.8.9; emacs 28.1 From: Thiago Jung Bauermann To: Eduard Sargsyan Cc: Aleksandar Paunovic , gdb-patches@sourceware.org Subject: Re: [PATCH 2/2] gdb: Improve the resuming of the stepped thread In-reply-to: <20220523180056.1415229-3-eduard.sargsyan@intel.com> Date: Thu, 25 Aug 2022 23:20:37 +0000 Message-ID: <87sfljewqi.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Aug 2022 23:20:42 -0000 Hello Eduard, Eduard Sargsyan via Gdb-patches writes: > From: Aleksandar Paunovic > > 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 > > * infrun.c (keep_going_stepped_thread): Do not resume an > already executing thread. > > gdb/testsuite/ChangeLog: > 2021-04-30 Aleksandar Paunovic > > * gdb.base/breakpoint-running-inferior.exp: Add a start_step > function check. > > Signed-off-by: Aleksandar Paunovic > --- > 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=C2=B9: > 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? --=20 Thiago =C2=B9 https://inbox.sourceware.org/gdb-patches/DM6PR11MB25889C3D6F45819B7D= 86EAE2F0319@DM6PR11MB2588.namprd11.prod.outlook.com/