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.129.124]) by sourceware.org (Postfix) with ESMTPS id EBFA83858D35 for ; Thu, 16 Mar 2023 17:37:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EBFA83858D35 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=1678988233; 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=XLaars4HPc50REonUg5vIWnf7IGFyRv4kSUuCrjbds0=; b=OKHKqyJ8PcrY9eXuPTyISgAnSrvsrhjBOV1pBsw6iaTb3rqKVIIeMT8mYkmGfFp+XiXMP2 AWzTG6bc2UVxZvIAws5Xu1hPBQn/vEAAdtNd00ZlZ6EahHx9Z6lOPWfmGnPytgmSBPMB2T lC+cdmCcXhFSfgg08ZULIV/c09X1cJg= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-617-3sOxztA7Ot-ZOnxbSnEhLA-1; Thu, 16 Mar 2023 13:37:11 -0400 X-MC-Unique: 3sOxztA7Ot-ZOnxbSnEhLA-1 Received: by mail-ed1-f69.google.com with SMTP id es16-20020a056402381000b004fa3e04c882so4050301edb.10 for ; Thu, 16 Mar 2023 10:37:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678988230; 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=XLaars4HPc50REonUg5vIWnf7IGFyRv4kSUuCrjbds0=; b=jsm3AJb+oY/epWo8/AgqSg5fNyAEqpraQkYQfH3SXTLWanR14My5wHHDWBRGrdkF7W vD41Er76NLHgvxb3N2M0Kt3PMCnCJWorhrDcqt6R30EsA14uDLABju013Va8RTXvNJxf /E1APq3EgsXFm3tLNF7qlSsWBC95Ign8aYTs/GSJpeZVG4E6i1t57PY78gZBLm72Crv2 ixh3nYmcdWByTblmXAao1jjh4kIt6JXcQOiW3qugNLrUvmUwUxA6g+vVnV/knakyQjQ7 FBifllrg7ian64uS5DdZsZ2vQo8KJjEOD56J3yi0HPWsW6iiuFccV1elvu4/GscE9d8U GweQ== X-Gm-Message-State: AO0yUKXOi6stT+PQIlt68ARZppL9lPT0f32C8VIVtVNURZidz/XmRd1W CfHs1tDc2V4qewzT6H7NoTF4iiKCX5KuVHckC+/E+Rdxe0kAO1/TMMr2uFXt6/z4TxVsfHLvk5R Zc+ksWC8hL60bU0cIl9Fm+3ljkdNc1i45Td5xLhnTczwiftfP7yhAYTFU8Zmf9FEBSikOtM10tR D/iJ0Stg== X-Received: by 2002:a05:6402:1507:b0:4fa:4a27:adba with SMTP id f7-20020a056402150700b004fa4a27adbamr381499edw.22.1678988230503; Thu, 16 Mar 2023 10:37:10 -0700 (PDT) X-Google-Smtp-Source: AK7set9bd58jRMVeaZCjFnX28vAQLrbXEWGtl89DE/yWRo3CFNpUeCS7FDYMFq7nfWKoCy2mW6FRjw== X-Received: by 2002:a05:6402:1507:b0:4fa:4a27:adba with SMTP id f7-20020a056402150700b004fa4a27adbamr381482edw.22.1678988230203; Thu, 16 Mar 2023 10:37:10 -0700 (PDT) Received: from localhost (95.72.115.87.dyn.plus.net. [87.115.72.95]) by smtp.gmail.com with ESMTPSA id c17-20020a170906d19100b008e57b5e0ce9sm4080065ejz.108.2023.03.16.10.37.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Mar 2023 10:37:09 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv5 00/11] Infcalls from B/P conditions in multi-threaded inferiors Date: Thu, 16 Mar 2023 17:36:55 +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: I'm thinking that I might merge the first 5 patches in this series some time next week. These are all the smaller, more obvious fixes. This might make the rest of the series a little easier to review. 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 (11): 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 | 105 +++++- 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, 2313 insertions(+), 84 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: eef174f6a97e3f52a84e4c94a4c710b2e7082176 -- 2.25.4