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 84FE93858D35 for ; Wed, 18 Jan 2023 16:18:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 84FE93858D35 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=1674058696; 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=Egf9coXSy+DFR+bttq8HUhGKFU+eZso+Xueu6LMZF5Q=; b=g8M7Tt/rt9H0mE4vGP1oDD0cEW/HPFPpIIDvykaKcDh1joFI1xgNvTJlSQkVc71E/VP9l+ /eU3/w/PiccB8p5G3fZkJoWdsKoW6Y7OpuBnEECg2hB6OFU9VzzeWHLNryZx/DG1yvhbcR vdbwextNrFYXkQ7s7+OIGCRIH6l1Ulc= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-618-h2Uc0XgAN4iMhPpgE8WD3w-1; Wed, 18 Jan 2023 11:18:15 -0500 X-MC-Unique: h2Uc0XgAN4iMhPpgE8WD3w-1 Received: by mail-qv1-f69.google.com with SMTP id x6-20020a0cc506000000b005349c8b39d6so6176192qvi.2 for ; Wed, 18 Jan 2023 08:18:14 -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=Egf9coXSy+DFR+bttq8HUhGKFU+eZso+Xueu6LMZF5Q=; b=RoJ4BqITN17Yh3btDeIk3SjLQebAr12eU+69XPmE/XdEwDpl0+I4vsSOaI91eMt/bL l19xYzSWryg4Uycq9T2GcLAsg55S6lnjwd4h/GukhlrhRMCTZhKUnAEVyTewzaAanMB6 SvMQp04cEVUWtg7M1fiER7txU45Ll4XyfpCBTYY54S0LpVkSXym3eil5Shz9NYALusNU vSZDyrqEdZnBJ2uNPuq/e2EOK883ALQos8KQVJ+EOWwyWhVhnwNFBWgTW2LEidKeVNDS uXUBPeRuzRqCWHmFMesPCEMPq5v1abSOJIxk1ARM9RT3gX5iPleOdDuX/by6ZK16hw51 6oCw== X-Gm-Message-State: AFqh2koGebq8htDjG2lYleyKW12g8b++KQd7ls3PnTPjNdZEAlHBw04K PJqfk+KruX80iDotY624j1XVFCrQvU39LXRAJ7AtXj3j4oXTzZZtWS7On6ybQmBZMeoBL/WlZaJ wl/9NSnyE+Q3N6vW4KX300q/6VGMObwGeWm3842mosizQAaKi9pueNJOFTiOug4ebI93YqXcTgg == X-Received: by 2002:a05:6214:311e:b0:531:d60f:6a9b with SMTP id ks30-20020a056214311e00b00531d60f6a9bmr10719521qvb.40.1674058694387; Wed, 18 Jan 2023 08:18:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXvmTcNlVsoyNrRTXKeHs+8tGcxSTPBK8ni2koHolWaqF+a6/W9OS2/qZGFcCdGuasGpoqDxag== X-Received: by 2002:a05:6214:311e:b0:531:d60f:6a9b with SMTP id ks30-20020a056214311e00b00531d60f6a9bmr10719489qvb.40.1674058693998; Wed, 18 Jan 2023 08:18:13 -0800 (PST) Received: from localhost (95.72.115.87.dyn.plus.net. [87.115.72.95]) by smtp.gmail.com with ESMTPSA id y18-20020ac87092000000b003b2685a575asm8581809qto.21.2023.01.18.08.18.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 08:18:13 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv2 00/13] Infcalls from B/P conditions in multi-threaded inferiors Date: Wed, 18 Jan 2023 16:17:56 +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: Thanks for the feedback on V1. I merged a couple of the really minor patches from the V1 series, but after the feedback I'm some new patches in the v2 series. 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 | 136 +++++++- gdb/gdbthread.h | 3 + gdb/infcall.c | 294 +++++++++++++++++- gdb/infrun.c | 52 +++- gdb/infrun.h | 2 +- gdb/remote.c | 17 + gdb/testsuite/gdb.base/bp-cond-failure.c | 30 ++ gdb/testsuite/gdb.base/bp-cond-failure.exp | 81 +++++ 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 | 182 +++++++++++ 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 | 119 +++++++ .../infcall-from-bp-cond-timeout.c | 169 ++++++++++ .../infcall-from-bp-cond-timeout.exp | 174 +++++++++++ .../gdb.threads/thread-unwindonsignal.exp | 8 +- gdb/testsuite/lib/gdb.exp | 8 + gdbserver/ax.cc | 12 +- gdbserver/ax.h | 3 +- gdbserver/tracepoint.cc | 11 +- gdbserver/tracepoint.h | 9 +- 39 files changed, 2317 insertions(+), 76 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: ac37b79cc440e37fc704d425a6e450afb3c7ee89 -- 2.25.4