From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id J+jhMoOGYmS8HgsAWB0awg (envelope-from ) for ; Mon, 15 May 2023 15:22:43 -0400 Received: by simark.ca (Postfix, from userid 112) id BA22E1E11E; Mon, 15 May 2023 15:22:43 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=TIPKS+vA; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 223021E0D6 for ; Mon, 15 May 2023 15:22:43 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 346573857708 for ; Mon, 15 May 2023 19:22:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 346573857708 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1684178562; bh=sdRxizHauHhYO0V3pXf4wDE4scgu6r7wgET55uLyGro=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=TIPKS+vALcv7D/g/w+syfL9KInvgOgdSbihdjzUY9kqFPCod0rYuzZpwCGxSZx+sN 4wuswVmbQ/IdtQo23yzvsWcrklvM1HGgOoN0FEmcMtTgCj3DFlxQ3RdKUvboYMJjJu s+JHENuIfqxijc3I+lt+92QUXdPllfPagxZm6dhg= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 6C41C3858D20 for ; Mon, 15 May 2023 19:22:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6C41C3858D20 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-658-5G5QWutNMSOCgGW-F_G0jA-1; Mon, 15 May 2023 15:22:18 -0400 X-MC-Unique: 5G5QWutNMSOCgGW-F_G0jA-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-3f4dd7f13d0so23029525e9.3 for ; Mon, 15 May 2023 12:22:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684178537; x=1686770537; 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=sdRxizHauHhYO0V3pXf4wDE4scgu6r7wgET55uLyGro=; b=P3pUyT/0/CX4Z9nFwmTwC782gK7PKYWLFIDNqnWApqQCErYBldCquK7akVp4NUiE0c o5warl7AJClKzQmQ9zxenv8B+FbdeGt4qezZq+6vh8yMjdytQqF3soz81FQlr5abAlCr b7QJk6h90L59bGfKw6RLIDjY1J+hvnwDXNYfFStMZSdS7PFM4gTa2/3uCmYJ6RhWUGxR VAeQLtqXoaxef/aay8bYWX/bOmtWu3V6I6JNZmbYYARiLqVCPw5BHYPkyQW8LMfBJbRd nviSkk4IM+14eQ5OCgA0SD83sFQhyoVkEBcVhDIRJqOmyJ5kkBFgLHQxSIlJHey9jiHP XJKg== X-Gm-Message-State: AC+VfDwqFkiGP+KBNuLtn9gofiBt3SF2fxMwb7VgemoHLgnhi3Ykzo+n YEvdKLHgjUIdrkosJivjXw3hXakEY6rSiFO45sXT4dxKFzqTcYMR5tOQJO5qnB7ZU4D2fYjFfIU sYUwl5O4j2feQQoi8bELjYOzeZOXDn+xWTd8aJFXiTONEFe/qKq6Ne8KYRI9MRO+rp5zYpE+iF9 J2k7du/g== X-Received: by 2002:a05:600c:2119:b0:3f4:2c71:b9b1 with SMTP id u25-20020a05600c211900b003f42c71b9b1mr15741311wml.24.1684178537521; Mon, 15 May 2023 12:22:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4bV6B7TW9EVxr6fHnSayOM68MjfmUfaDC+/itDWNdQwuUGGDNpc4VsOYOtn7u84R9aSD9xrg== X-Received: by 2002:a05:600c:2119:b0:3f4:2c71:b9b1 with SMTP id u25-20020a05600c211900b003f42c71b9b1mr15741303wml.24.1684178537087; Mon, 15 May 2023 12:22:17 -0700 (PDT) Received: from localhost (11.72.115.87.dyn.plus.net. [87.115.72.11]) by smtp.gmail.com with ESMTPSA id f18-20020adfe912000000b00307d20546e6sm94018wrm.27.2023.05.15.12.22.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 12:22:16 -0700 (PDT) To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv7 0/6] Infcalls from B/P conditions in multi-threaded inferiors Date: Mon, 15 May 2023 20:22:07 +0100 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-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: , From: Andrew Burgess via Gdb-patches Reply-To: Andrew Burgess Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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 (6): 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/remote: avoid SIGINT after calling remote_target::stop gdb: introduce unwind-on-timeout setting gdb: rename unwindonsignal to unwind-on-signal gdb/NEWS | 38 +++ gdb/breakpoint.c | 2 + gdb/doc/gdb.texinfo | 105 ++++++- gdb/gdbthread.h | 3 + gdb/infcall.c | 296 +++++++++++++++++- gdb/infrun.c | 70 ++++- gdb/infrun.h | 3 +- gdb/remote.c | 10 + 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 | 98 ++++++ gdb/testsuite/gdb.base/unwindonsignal.exp | 36 ++- gdb/testsuite/gdb.compile/compile-cplus.exp | 2 +- gdb/testsuite/gdb.compile/compile.exp | 2 +- gdb/testsuite/gdb.cp/gdb2495.exp | 16 +- gdb/testsuite/gdb.fortran/function-calls.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 | 174 ++++++++++ .../gdb.threads/thread-unwindonsignal.exp | 8 +- 28 files changed, 1903 insertions(+), 68 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: 6a1cf1bfedbcdb977d9ead3bf6a228360d78cc1b -- 2.25.4