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 1EC49385829B for ; Tue, 5 Mar 2024 15:40:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1EC49385829B 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 1EC49385829B 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=1709653246; cv=none; b=ulQf8PxW00d4vtSSCQk0GEcmMUS2K9WglbSD4ipPRiejJDlVKLKJ3/p0Qthvm0MA7Kb0tU2f6x8aYZCiW8kjZpygVC7JTEnBBXHPOU1XnUInwrGvcJSGqKXJUWvZdyxwBJ/WBw7dHlQUziSZeB5KfCbwlnpbktETSbjxIqiRNAo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709653246; c=relaxed/simple; bh=D1PvmwLReCIZrF+0h7dBCiC36T7IGy4sxG5p/HpXtVc=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=LzT8T3opQAYRXJSCvA2Yq7DCtUT+MKTvLbY/mLxcEGOPrgQRSfdlTnlz5Ttkxi/bZDmg5rTF2mFAomy62oq0jPj/cn7dWwPpUzMYCAjpM4RoLwiZ96xSwRNJ4bZR59Z8pFJeKUpguczT4msodD76diWr2MOuwPXZ+jUOapChHFQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709653243; 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=g2ZRvYFsTiLtnEgO5F1bvAkKqsWS68/Sydq2hEgzBR8=; b=UPKJS46CkdGbLohK4hBTRXwognVpRyESwjv+sWjVeqE0FKjE9yYy1fQOeagf/5b1IEKFTV U9cjkYqgzFkebmP0zBeoYpg/bhvLp1sPtPg4BeRwPq9R8S0wsb4KTuqEbdpPhHs4oLtkne WCeJYm3H1kIpPxxAnsvrjbH6828/HP0= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-379-bYgcly5EPg22AvccbE8QGw-1; Tue, 05 Mar 2024 10:40:42 -0500 X-MC-Unique: bYgcly5EPg22AvccbE8QGw-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a44d0cb0596so228421566b.2 for ; Tue, 05 Mar 2024 07:40:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709653240; x=1710258040; 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=g2ZRvYFsTiLtnEgO5F1bvAkKqsWS68/Sydq2hEgzBR8=; b=mUhZ4A96YihJ+9Jnxs45VMMDxHJFAg7qS4rejlMqB/fRA7jBz1s4P1KOSoz2dcaZfN +hgZJaYFhqFeN3tDLi1TBBOpyWmPJ3Q/yRels2iPhf4lSh+6o7gJRF4LZ/D8QK4uCcOu kEPdtm8Iwm2GkYTt2QSQu18ZqtyzhSWfbaDVZTfkREiZgytzUlz01snmwfJ3AS5WSr9K PEvksiEHLEe217avLv7gOp7gpkEWr1S0EQdh9q48sIK4g0ehGO1KVOxQmKqBl5R1CESg tALx54pfpJwLN0eSN6RdBjjj7BFixyc30/nZBPB0rCGCAOuWXbu2oAQ34e9S9FI237e0 KXBA== X-Gm-Message-State: AOJu0YxiiZStMw5IsSmo5XMSRbJxFVni12ARvebWC+os+t3IqsXXa/lW ZBO3IAsj55UrXQ+YtgfoNkoSwUBOPNC+h9ClMCarmOM1G+gqk1sNjoo5/egC0KETCk93kTpEsw+ mSvvPLabMsbtSIX4vdwsQhRaU2Lxwx/caD1vu+O4cUDed9I3lMP1ATE3N+xz4j22nplqK8Q7//M i8jJaOwfgz3STlxjws9QDLaECRt/Tyg9xbpxAW6/8nchk= X-Received: by 2002:a17:906:d92f:b0:a43:af0b:ec31 with SMTP id rn15-20020a170906d92f00b00a43af0bec31mr8645394ejb.53.1709653240349; Tue, 05 Mar 2024 07:40:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKxhTwgMh23C8w2ZV9EQYzUYqYu7XvhNtqvmNspuQzOJLm9GkkU/b5qIwSv6MGu8mPhT4x/w== X-Received: by 2002:a17:906:d92f:b0:a43:af0b:ec31 with SMTP id rn15-20020a170906d92f00b00a43af0bec31mr8645364ejb.53.1709653239715; Tue, 05 Mar 2024 07:40:39 -0800 (PST) Received: from localhost (185.223.159.143.dyn.plus.net. [143.159.223.185]) by smtp.gmail.com with ESMTPSA id wr6-20020a170907700600b00a45646a9e18sm2082648ejb.76.2024.03.05.07.40.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 07:40:39 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv11 0/5] Infcalls from B/P conditions in multi-threaded inferiors Date: Tue, 5 Mar 2024 15:40:33 +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=-6.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,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 List-Id: In v11: - Rebased onto current upstream/master, only merge conflict was in NEWS file. Retested with no regressions. In v10: - Rebased onto current upstream/master, I've updated the copyright dates from 2023 to 2024. - No merge conflicts (other than NEWS) and no build problems. 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: a7ea089b0bccb6379e079e2ab764c2012d94b472 -- 2.25.4