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.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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677602554; 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=ye9tnlE7bSryBb5hralOpcGXKlqsNiorGyu9HtaAAU8=; b=V7PC5OhUGD3LJM3UBcAOzmVxPktCQHOBe4mKZRHAOy2Ax33MpBHuG3S40b4QmD/+0lB6fV /zvlwfUAIgYC1KJAHq7UgM0t/ENuC+F/hYbRPzS5jDa8UKHk5JJvM7JyIhmkMqueIQQCPz qvuySAwxvg2xDdQNXkqYlrBdyPJa1io= 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) From: Andrew Burgess 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-Spam-Status: No, score=-5.7 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_H2,SPF_HELO_NONE,SPF_NONE,TXREP 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 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