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 3587C3858D32 for ; Tue, 2 Jan 2024 15:58:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3587C3858D32 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 3587C3858D32 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=1704211081; cv=none; b=nqoLvcldKROqJLsZ2aXXHa/8Mxa2P+Kh2dXUyr9laUS0DQNCFLYzEjXppS+fyK2Fyj1f30nCEvoqDlBiUP3qjqqG6205WIi2I0VFoezNMVj4b6ZDv6C9L6u4FgIW04OPkLzPzsqZbs8xZPv5X3SJNfT48KFBlms98HddUJfVv6s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704211081; c=relaxed/simple; bh=nR6ajOFGuuMllAvoFikrbCwNaVSepzIJZIBsnjmLP0k=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=XsNVv8BL4YMn3azKxmX8xB6YhJZodG6S87ui5YeDqKfojbUqFFfZlsWNUloSHMcFV7O/SpAtQTS69z7bNc8MCkZoUtTMk/LmTsvBUkbFwAfPWPos7ImrNFVYcWcTHomJXbe+Ye91kyjlzCqsMN6WJfNs3F0xsBKiPffUuSC2ZCU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704211079; 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=DLhvrqz8On4DdT9Nzbc5fkViSZfY7d/XVKuNy4kAxdc=; b=He5FGFjiX9SMCGM4vLllsW4+AUIY9jqD5nWgwfotzJqfue3b0JKbXTCbglcOeuAy+plWey WPWiGYATVQdpDG/6Le1JwJiRgpTpPq5QB97Trj4MihfraKHthbxLfebXJ+sh8IK5NJ2NmW LXWK8+ACJz4BDtkyk/jSGLCAwv3qNWg= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-487-IvFbSa4uP0aDt87ct2-Oog-1; Tue, 02 Jan 2024 10:57:58 -0500 X-MC-Unique: IvFbSa4uP0aDt87ct2-Oog-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-40d68242598so32516485e9.3 for ; Tue, 02 Jan 2024 07:57:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704211077; x=1704815877; 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=DLhvrqz8On4DdT9Nzbc5fkViSZfY7d/XVKuNy4kAxdc=; b=pstzmIXaBUC7zVPtlLmF0sEqdhfyQKaU5TA3WMNRyeVyk8DJSQEGiFjgpN4wco/gwK wE57FboJjs3ychh30VUb0ETax8k5PMdiLASsij3UUcbQVeBmgpGveAYRJxW2Lkq1NQBJ cLhOT62f6YgirEAD2HDhvzDFaJmTKW5U0w7dCArUCJl7zUu+MOgMoWcsMosa/+6Ocnvt b/KK6Jwx7N+1dMbWavkSI0ozKFbPOlJnP9BoFJoCPkUEPqz0zSigxeIAiNETlC8Fp9Ee udi1hY074zpUnEOQPf4pWxnHOhlohrkDpmFYy1j4DcbR3uTt7cut2AwEvtVKpqBIelvG yLcw== X-Gm-Message-State: AOJu0YwHG8AzFijgxUq8SoazhI38zwLglo7W5ANzPWPgMviiW+dq15nW ZGKc3pc/iK6lSjkQBYVp3dGgLOmQBCfd8Ju1u2mNNND0qZF1GXQ6agW/0ETer7eZgZ1b3XLoDFs wLX5VExOBB4sWRCDT2k6fQIwCdFxYDXe5oBk9KyGdekSYV8iOIXxPXfdKnQQCKlh54WEYlV7K+q A9HQicxME8NGMdSA== X-Received: by 2002:a05:600c:3d93:b0:40d:8898:a71 with SMTP id bi19-20020a05600c3d9300b0040d88980a71mr876917wmb.358.1704211076860; Tue, 02 Jan 2024 07:57:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFaLdqgBkNd1gKYLsiJ0Uul751vhpKMOtcr3cAUiBiAxPfD4utf5BclqFIj4YonV+9U4AAXxw== X-Received: by 2002:a05:600c:3d93:b0:40d:8898:a71 with SMTP id bi19-20020a05600c3d9300b0040d88980a71mr876911wmb.358.1704211076450; Tue, 02 Jan 2024 07:57:56 -0800 (PST) Received: from localhost (185.223.159.143.dyn.plus.net. [143.159.223.185]) by smtp.gmail.com with ESMTPSA id v20-20020a05600c471400b0040d77ebd55csm16205527wmo.13.2024.01.02.07.57.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 07:57:56 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv10 0/5] Infcalls from B/P conditions in multi-threaded inferiors Date: Tue, 2 Jan 2024 15:57:48 +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=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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 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: 528b729be1a293a21f44149351f3eba5b4e2d870 -- 2.25.4