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 0106C3858413 for ; Tue, 31 Jan 2023 17:49:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0106C3858413 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=1675187358; 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=Ms8orp0VHeZ0orezzwSaLiFdA9I+Denaom1F8Duu1Vo=; b=CCl/DSpfJGe55rr2skXG341XWlze1yPHMHvRh+h8Q3c5ZzMZLPK6nBbsxyrFTCxAujvQpt s8o4zyxjDNdVv0o2iBjE9y/iePPA8yaPVPzb3Se0vNri3WxZNRftmMdHfg2qIvOjfJkTuI CbSZrNz0eHYn9PqcgS4whv4OK1sJVi8= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-546-XoMKrvlWORGYI8u2m0lppw-1; Tue, 31 Jan 2023 12:27:22 -0500 X-MC-Unique: XoMKrvlWORGYI8u2m0lppw-1 Received: by mail-qt1-f199.google.com with SMTP id bs11-20020ac86f0b000000b003b9b4ec27c4so682965qtb.19 for ; Tue, 31 Jan 2023 09:27:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=Ms8orp0VHeZ0orezzwSaLiFdA9I+Denaom1F8Duu1Vo=; b=Uv3o/rEKzlxIzsQ6ZgmqglBfO98yXEFKsguZYEmwpokXoxhE8E6YLF6LmbW00poUnf Cw5lLRIHC+d0nvE0KYnvj3rmgKGMeMYn/+1uVxzE4Jg7oJ+2YAWyURXpmALAbHJW9FMH XdmL74MWZnn8HVmacKMDRoLNNfkKglrQL3Ng6XH3U4sFM3syj9aafxktoU6x2JFA9fuf rm2rGuGt9KVhj/HCG4vaQyJpAXKbLYMZ7VkSxPujuRQYKl/USgX8FWoJmHKUEr94a64d dFBQCcrBgiBSvxqTVoOQc2SpfMKNSrf+NONxAHAQoxEtUSzeIZy5Hauzjs/PUSm9Os6S il4g== X-Gm-Message-State: AO0yUKXdAtectB58x6G9XKvDKfL8B/OQyD1B50I+xzPY/PHRViia+Kdw GOchNSxfzFgGjMr+Jb7s/BuOCLCpjiVf7bzxtmHFHvwp0sEYn3EmYKXgkLMSNdAfM9d4UCZMi6p Q6Om0rtaIb6rV/TwikHyECLyNLwmB0gMaNriE2WHg9zVdeycvkbH/H9ehWsa7/x0fGg35NIdKKg == X-Received: by 2002:a05:6214:448a:b0:537:6bc5:6c3b with SMTP id on10-20020a056214448a00b005376bc56c3bmr42000916qvb.30.1675186041390; Tue, 31 Jan 2023 09:27:21 -0800 (PST) X-Google-Smtp-Source: AK7set93f3Vn5e/Hz6605Q2zNfINWWSALpDceDKRfmzbdmeQd/NMyJVRaMJLbkgbX9IzbMOkHf7n4w== X-Received: by 2002:a05:6214:448a:b0:537:6bc5:6c3b with SMTP id on10-20020a056214448a00b005376bc56c3bmr42000889qvb.30.1675186041089; Tue, 31 Jan 2023 09:27:21 -0800 (PST) Received: from localhost (95.72.115.87.dyn.plus.net. [87.115.72.95]) by smtp.gmail.com with ESMTPSA id p74-20020a37424d000000b0071a5dbcafbfsm7483880qka.29.2023.01.31.09.27.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 09:27:20 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv3 00/13] Infcalls from B/P conditions in multi-threaded inferiors Date: Tue, 31 Jan 2023 17:27: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.8 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 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 (13): gdb/doc: extended documentation for inferior function calls gdb/doc: extend the documentation for conditional breakpoints 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 | 138 +++++++- 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 | 107 ++++++ 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 | 175 ++++++++++ .../gdb.threads/infcall-from-bp-cond-simple.c | 89 +++++ .../infcall-from-bp-cond-simple.exp | 236 ++++++++++++++ .../gdb.threads/infcall-from-bp-cond-single.c | 139 ++++++++ .../infcall-from-bp-cond-single.exp | 118 +++++++ .../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, 2357 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: 0fcf99b8ab5ccbde30fa7d36742e670cd4df48ef -- 2.25.4