From patchwork Tue Jan 31 17:27:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 55450 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7E71E3858D3C for ; Tue, 31 Jan 2023 17:51:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E71E3858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675187467; bh=Ms8orp0VHeZ0orezzwSaLiFdA9I+Denaom1F8Duu1Vo=; 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=Onu7tMePPTq5tO/apNpret9pLwJ06fTSbtLrYihrqRu/vzdf4jJA92GrABAvAvDBK HGnM8RWGkEM8cHRhgSFLLv8QqphBFU0yJ9zgDObE1XiqA0K2GD8paevHtmq4rD5FjM HhK3OJbsVj88QOpnrc8is8kIuoyI39BHR/DijTwE= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org 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 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) 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 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 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: , X-Patchwork-Original-From: Andrew Burgess via Gdb-patches From: Andrew Burgess Reply-To: Andrew Burgess Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" 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