From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 963CF385840D for ; Sat, 2 Dec 2023 10:52:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 963CF385840D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 963CF385840D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701514362; cv=none; b=ZWcusz3nvCOAGi1/E1ePnZEoXFGc8jKaLLm0bkGm4avz/RrckPTyNrgmEdPr/z0aH107XeLMUoymA8+X2zg+IQDuzDrheApQKXamUAkyRbWOP+PYIGs620YOIfek2FBSJ87M2jx87kp0AYHQXoZs6YXEgNrdvbgrvqRkSelagPI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701514362; c=relaxed/simple; bh=d4to99IpIvRSXAMg2tr1RULH+qLrqj9xP8gvQDfMb9U=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=g0PhkzLLhQBDvad7zy09VRNkMiO7KJ8RcrqozR3i2DUYmyg1bb+VSMFaThvGIyVmRK7UyuQl9GKWV3s+9Q00h0UzrH8Zk0KP3KxsDIZNYutvRCCmcUmbnyMPYZ+1bLVdgTBhBC9B0ODrsDfSrDf3MwAfbtkb1MMWkfmv2ap9mpE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701514361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GY6CrX5TZ0xDZbgVeuZurKV0xuGSeRtoW4lUsWRHu/A=; b=AFRT+BOxgTUC1Omz/aRcRsydx2cZz2LWFi3g/bzalnTsvvHx0fkqxRWzzXLRCTnAXO+jxA Ib5gO4p+ypzEaHDUXsZIf8UKvpvvUN3c2KyuqEgFfiLBuRQgbKtUtte1ag4NpSBEmYRgVS fLeMz+ZdibVNE4fvsFknluvHd/RS8jw= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-315-fcpfJWaGM-a8L_cK6P4cqQ-1; Sat, 02 Dec 2023 05:52:39 -0500 X-MC-Unique: fcpfJWaGM-a8L_cK6P4cqQ-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a114f099bebso268307266b.2 for ; Sat, 02 Dec 2023 02:52:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701514358; x=1702119158; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GY6CrX5TZ0xDZbgVeuZurKV0xuGSeRtoW4lUsWRHu/A=; b=FQkwBzFTjpVGGR7kkWROpyaSjvsHlXMql0Kgh9LK+Tbv+mo6awvuFtqjSF3Fg4T7F/ PcYdY38vdhFCLGg1oqTtINYucIMgn66wPq4MIRyIDXZ2swrsiHyQoNgkaurLpCCIEKxH VZ84KirWOIrmSb3g2eKWXnmI12C6lg9oxF5zMQNHjSTGD+EmM9kgdHIC2pFEqxVJpGvF 9Wlnf0sDjl/O+hU6khgExkzsN658xfrQDRWoiO0b3dNZsv3bD9O6XbGNj8TeEbNK2vDz +mIzYrYHb+cWQ84o837kH/thdYhhDWfDa+L82OKK+XZb0J3oExPLByoED1f5Nw9iu0ED 7PBw== X-Gm-Message-State: AOJu0YxabvPMgdsZpQiPrxtrg+9UGt3Z0uQq2EW5Xgn9ImSBT5XPz9xh ghloiyK98tdf0jQIriq6Dmex4pevSqnkV4NvtrixD474XHJkaoxL8O9eRvgtEmkNpjw8MBqC4B6 asvbm4dabzzMeQRuXd6fQEH2+d9VcXAgAbfUgtus/oTcDRrfgSgh83gyR0Qyo/Kl+k09L6OooAt 0AIJMQog== X-Received: by 2002:a17:906:558f:b0:a19:a19b:55e3 with SMTP id y15-20020a170906558f00b00a19a19b55e3mr1577382ejp.115.1701514358580; Sat, 02 Dec 2023 02:52:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IHrTZXDik3wuY+rlBQ/uBCLaxSMuxXeoR0G2J1wyqXZkSQWXXPjc0IQkkDKbhfYAjGbKonViw== X-Received: by 2002:a17:906:558f:b0:a19:a19b:55e3 with SMTP id y15-20020a170906558f00b00a19a19b55e3mr1577378ejp.115.1701514358189; Sat, 02 Dec 2023 02:52:38 -0800 (PST) Received: from localhost (92.40.184.5.threembb.co.uk. [92.40.184.5]) by smtp.gmail.com with ESMTPSA id hs22-20020a1709073e9600b00a1a5f7bd1a0sm635795ejc.30.2023.12.02.02.52.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Dec 2023 02:52:37 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv9 0/5] Infcalls from B/P conditions in multi-threaded inferiors Date: Sat, 2 Dec 2023 10:52:29 +0000 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_ABUSEAT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: In v9: - Dropped previous patch #4 (gdb/remote: avoid SIGINT after calling remote_target::stop) after feedback from Pedro. This patch wasn't essential for this series, instead I've just updated some of the tests to expect different output from remote targets. - Updated to more recent master, and applied a small fix due to the recent C++17 changes, nothing huge. - Retested on unix, native-gdbserver, and native-extended-gdbserver boards. In v8: - Rebased onto current upstream/master and retested. - Addressed feedback from Baris on patches 1, 2, 3, & 4. This was mostly minor stuff, comment typos and some improvements to the testsuite. There was one real (but minor) GDB change in patch 4. In v7: - Rebased onto current upstream/master, fixed use of find_thread_ptid which is now a process_stratum_target method, - Retested, with no regressions seen. In v6: - Pushed the 5 initial patches. These were the smaller fixes, and, I felt were pretty obvious fixes. I'm sure folk will raise objections if they disagree. - Of the remaining patches, #1 to #5 really needs review before they can be merged. Patch #6 is an obvious cleanup once the first five have been merged. - I've rebased onto current HEAD of master, there's no significant changes. - All other documentation changes have been reviewed and approved. In v5: - Rebased to current HEAD of master, minor merge conflict resolved. No other code or documentation changes. - First patch, which was pure documentation, has now been merged. - All other documentation changes have been reviewed and approved. In v4: - I believe all the docs changes have been reviewed and approved by Eli, - Rebased onto current master, - Dropped patch #2 from the V3 series, - I have addressed all the issues Baris pointed out, including the fixes for the patch #9 ('gdb: add timeouts for inferior function calls'), which I forgot to do in V3. In v3: - Updates for review feedback, biggest changes in #10 and #11, but minor changes to most patches. In V2: - Rebased onto something closer to HEAD of master, - Patches #1, #2, #12, and #13 are new in this series, - Patches #3 to #9, and #11 are unchanged since their V1 iteration, - Patches #10 has changed slightly in implementation since v1, and the docs have been significantly updated. --- Andrew Burgess (5): Revert "gdb: remove unnecessary parameter wait_ptid from do_target_wait" gdb: fix b/p conditions with infcalls in multi-threaded inferiors gdb: add timeouts for inferior function calls gdb: introduce unwind-on-timeout setting gdb: rename unwindonsignal to unwind-on-signal gdb/NEWS | 36 +++ gdb/breakpoint.c | 2 + gdb/doc/gdb.texinfo | 111 ++++++- gdb/gdbthread.h | 3 + gdb/infcall.c | 301 +++++++++++++++++- gdb/infrun.c | 70 +++- gdb/infrun.h | 3 +- gdb/testsuite/gdb.base/callfuncs.exp | 4 +- gdb/testsuite/gdb.base/help.exp | 2 +- gdb/testsuite/gdb.base/infcall-failure.exp | 4 +- gdb/testsuite/gdb.base/infcall-timeout.c | 36 +++ gdb/testsuite/gdb.base/infcall-timeout.exp | 115 +++++++ gdb/testsuite/gdb.base/unwindonsignal.exp | 36 ++- gdb/testsuite/gdb.compile/compile-cplus.exp | 6 +- gdb/testsuite/gdb.compile/compile.exp | 6 +- gdb/testsuite/gdb.cp/gdb2495.exp | 16 +- gdb/testsuite/gdb.fortran/function-calls.exp | 2 +- gdb/testsuite/gdb.mi/mi-condbreak-fail.exp | 6 +- gdb/testsuite/gdb.mi/mi-condbreak-throw.exp | 2 +- gdb/testsuite/gdb.mi/mi-syn-frame.exp | 2 +- .../infcall-from-bp-cond-other-thread-event.c | 135 ++++++++ ...nfcall-from-bp-cond-other-thread-event.exp | 174 ++++++++++ .../gdb.threads/infcall-from-bp-cond-simple.c | 89 ++++++ .../infcall-from-bp-cond-simple.exp | 235 ++++++++++++++ .../gdb.threads/infcall-from-bp-cond-single.c | 139 ++++++++ .../infcall-from-bp-cond-single.exp | 117 +++++++ .../infcall-from-bp-cond-timeout.c | 169 ++++++++++ .../infcall-from-bp-cond-timeout.exp | 191 +++++++++++ .../gdb.threads/thread-unwindonsignal.exp | 8 +- 29 files changed, 1943 insertions(+), 77 deletions(-) create mode 100644 gdb/testsuite/gdb.base/infcall-timeout.c create mode 100644 gdb/testsuite/gdb.base/infcall-timeout.exp create mode 100644 gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.c create mode 100644 gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.exp create mode 100644 gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.c create mode 100644 gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp create mode 100644 gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.c create mode 100644 gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.exp create mode 100644 gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.c create mode 100644 gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.exp base-commit: a393b155174d20d3d120b5012b87c5438ab9e3d4 -- 2.25.4