From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8D34AXYv/mPnuQAAWB0awg (envelope-from ) for ; Tue, 28 Feb 2023 11:44:38 -0500 Received: by simark.ca (Postfix, from userid 112) id 0489B1E222; Tue, 28 Feb 2023 11:44:38 -0500 (EST) 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=lk/GUCcY; 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=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.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 74D831E128 for ; Tue, 28 Feb 2023 11:44:37 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0F274384F00E for ; Tue, 28 Feb 2023 16:44:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F274384F00E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677602676; bh=ye9tnlE7bSryBb5hralOpcGXKlqsNiorGyu9HtaAAU8=; 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=lk/GUCcY5mS7qhJh8sbwwut7yIXKyzlojY7JPc5HN/0KtWP8S8YEtJ1dSLfZJX2ou 5uEaXa/MQmpsNmw2gfEc12T1jcZdHhOyp7wiNToJ4qjHbNlExvqrIUo+SsZAz6+024 AitqwRFHXH18wwo9FMR4T15XNDe6ljLMKoPwgVTo= 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 D515F3858C83 for ; Tue, 28 Feb 2023 16:42:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D515F3858C83 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-632-LdRpDSJ-PU6Ddr8dD9EU5w-1; Tue, 28 Feb 2023 11:42:21 -0500 X-MC-Unique: LdRpDSJ-PU6Ddr8dD9EU5w-1 Received: by mail-ed1-f72.google.com with SMTP id fi8-20020a056402550800b004a26cc7f6cbso14732497edb.4 for ; Tue, 28 Feb 2023 08:42:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677602540; 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=ye9tnlE7bSryBb5hralOpcGXKlqsNiorGyu9HtaAAU8=; b=Wh5QKfcje0Rqiy9qD0taoUQBxHX4KqSgd7TiuqC8rAOJnXOxlp5IYnvSpkrOdgoPAL lylH52KWqqj8fdH/c9tf2pYSI4gKSlP3QOgnYdizQ/5jIgz9UyCuyEdqyI+eOs9753pu DS8x6kzDsjWGrokszG0sYAnMFc2C7/4ZV4mWe2S3BskdjdlTJ//kiE04T3LbOlrt34NK y6ZYazGbIyRWZ/b+Nk6+fHlWWMgsDXTV4zT9EOfBwZc0HURjATKAP7ZFSg9Uqst+c2WN /gx4CH777/ti0232T1t4KLgTdC+7PM22f8d/M0LHlgPK1dXaj268SzIx/BJRQ7MHXMQZ 0SFw== X-Gm-Message-State: AO0yUKV5oqE3GN1JvlwlXnsRrDr7wXRW9elFYUBZtvqodNTbv5mokc9X CF6Jp60RYJJAmDZDkcc2Ib91yC6KAt3KZadot9yTg0JV13GPdu0RI8ylwhGdVwNH6I+tC4gH+wk 61K1/bBSyoyXV1lHdQzck1oTFJWj++LdjgkkTRCrz3X1lkQSFMP16GeIWwewIbUdr4TY8LX+IFJ v714M= X-Received: by 2002:a17:906:a16:b0:8b1:78b6:4b3c with SMTP id w22-20020a1709060a1600b008b178b64b3cmr3173566ejf.73.1677602540318; Tue, 28 Feb 2023 08:42:20 -0800 (PST) X-Google-Smtp-Source: AK7set+ODHIjzNvcp3rF/Qk57a9TjBu81n/0b2ed7AYQBm5ohlJ8oDdZIVRQLwmQzdpkzrI5dJNYBw== X-Received: by 2002:a17:906:a16:b0:8b1:78b6:4b3c with SMTP id w22-20020a1709060a1600b008b178b64b3cmr3173544ejf.73.1677602539965; Tue, 28 Feb 2023 08:42:19 -0800 (PST) Received: from localhost (95.72.115.87.dyn.plus.net. [87.115.72.95]) by smtp.gmail.com with ESMTPSA id va13-20020a17090711cd00b008b23b22b062sm4687209ejb.114.2023.02.28.08.42.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Feb 2023 08:42:19 -0800 (PST) To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv4 00/12] Infcalls from B/P conditions in multi-threaded inferiors Date: Tue, 28 Feb 2023 16:42:05 +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-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 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 (12): gdb/doc: extended documentation for inferior function calls gdb: include breakpoint number in testing condition error message gdbserver: allows agent_mem_read to return an error code gdbserver: allow agent expressions to fail with invalid memory access gdb: avoid repeated signal reporting during failed conditional breakpoint gdb: don't always print breakpoint location after failed condition check 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 | 17 +- gdb/doc/gdb.texinfo | 127 +++++++- gdb/gdbthread.h | 3 + gdb/infcall.c | 305 +++++++++++++++++- gdb/infrun.c | 70 +++- gdb/infrun.h | 3 +- gdb/remote.c | 10 + gdb/testsuite/gdb.base/bp-cond-failure.c | 30 ++ gdb/testsuite/gdb.base/bp-cond-failure.exp | 104 ++++++ gdb/testsuite/gdb.base/callfuncs.exp | 4 +- .../gdb.base/catch-signal-siginfo-cond.exp | 2 +- gdb/testsuite/gdb.base/gnu-ifunc.exp | 2 +- gdb/testsuite/gdb.base/help.exp | 2 +- gdb/testsuite/gdb.base/infcall-failure.c | 48 +++ gdb/testsuite/gdb.base/infcall-failure.exp | 183 +++++++++++ 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 +- .../gdb.python/py-finish-breakpoint.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 +- gdbserver/ax.cc | 12 +- gdbserver/ax.h | 3 +- gdbserver/tracepoint.cc | 11 +- gdbserver/tracepoint.h | 9 +- 38 files changed, 2340 insertions(+), 79 deletions(-) create mode 100644 gdb/testsuite/gdb.base/bp-cond-failure.c create mode 100644 gdb/testsuite/gdb.base/bp-cond-failure.exp create mode 100644 gdb/testsuite/gdb.base/infcall-failure.c create mode 100644 gdb/testsuite/gdb.base/infcall-failure.exp 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: 2968b79fca38cf18e8eef360c36de7a6e3846d3c -- 2.25.4