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 97F90385840D for ; Sat, 2 Dec 2023 10:42:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 97F90385840D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 97F90385840D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701513748; cv=none; b=JWeMPFdLitgx3DCcNLMhRmsPtW4J0wpqWzo4rR0D5zcfA/8AoiO6h54aBg41Tz4tf3H3XzqU56c5ipBZjn+PQUVKQOJBCRPVYcl4ACF3SsvD+CmsiPwP49eQBYTp7c2thXhkJb+l40qqyCyWfu56EbUokYP7nnxqkovNaGPCtk4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701513748; c=relaxed/simple; bh=pRGHkL1PAfUuiQJAGFCfpAQPckmfie/2MX9SEp+R89g=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=awgJCqSgm687V0S+spbSMyApA+y9pkyTRnT8OQvzH0CmhD75FpKf0iQGsIzYJTF1yUXLKC9IbnHkzxNLDX//v4adytowucPM6yS5VSlGYB5eS5N/cvkZnrfBuDdDPQz3s9b887Tz/F7Fnh/8lXhydUrMTnxqw+2LMtuTjUYwJQs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701513747; 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=rF9+ohnq+7W6pLmzLhDkWsPmBNWdbhG/sGcr/XbhOHU=; b=FvN1tvW7I5ibjYQCPcMo8WOPjcA61pwyU03SNyWB49c8ZiHKIgbX6FKnuIinzpXZUIU1dE kCVhZSltlvc+Q/eWrC05T/rADzMWpGn1l7aJcWJnGMt2tph9vAEzsBzpJh5+b4GHaR1v/b GylO5opWd1X4OqPZ3j2qrNP+4Pqj4KU= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-68-p36ZWv_eNq2_yJip3e3irw-1; Sat, 02 Dec 2023 05:42:26 -0500 X-MC-Unique: p36ZWv_eNq2_yJip3e3irw-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-40b4e24adc7so21066195e9.0 for ; Sat, 02 Dec 2023 02:42:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701513744; x=1702118544; 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=rF9+ohnq+7W6pLmzLhDkWsPmBNWdbhG/sGcr/XbhOHU=; b=s1/DGMN4MCbTr3bXbc5ry/KMfsOlMLh1TAlWy3EJ0t7wSWjPIiOHIUg80t+jbCV+Ua om22MxLZZGK9+PGk0qX3c4BY52VJ7yVMk+IkyMJ1pZ2odNoF4Avk9Pn4Qxgyu5clUL5Q AwigpHp/Qhf+3czqwPgzRqiWc9vPdMFHVYQ60t1aVq5F2jfDAvhUGGCXbvytG75a7IJF 5By+Je+aV3l6NX0ryxm73B/tpVWKn4vt2bF9rGNhmjqGMqRXmZcmuRY/yafQOLcrogjs /D7eUsjatPDBNlX5LjGBmVotvtpITX6a3tZWMp//rH8vNNEMNDKljTFRuMerakeL2T3U etGg== X-Gm-Message-State: AOJu0YxPpp7LC7bHC6rqX0YtHIqsgjAPWDpLlGczeo2w0EL6lcWVXBoB ix6YTCOOZiCPHvq8GrevkBhriDI82aQa3EBCWJnSTLt3XpAEZmox4DS7zHSeYDnJN39kd4dLWEh hlbDnfY+cqgjwULPqsgKaeNyhEjFE5Uq/FNVAqrMd7kQjethQdwuzVNUdSlX5AU4wkbAfh7A8Sr p5caQK8A== X-Received: by 2002:a05:600c:54eb:b0:40b:5e94:e2dc with SMTP id jb11-20020a05600c54eb00b0040b5e94e2dcmr1223285wmb.86.1701513744735; Sat, 02 Dec 2023 02:42:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IGRZ2oKbp4uShiZFLGApvLnGw5rMPFLBe6oLIOG5g8vmSgNa0iJYaINT7dVU4EiRIZUL3u9uQ== X-Received: by 2002:a05:600c:54eb:b0:40b:5e94:e2dc with SMTP id jb11-20020a05600c54eb00b0040b5e94e2dcmr1223280wmb.86.1701513744389; Sat, 02 Dec 2023 02:42:24 -0800 (PST) Received: from localhost (92.40.184.5.threembb.co.uk. [92.40.184.5]) by smtp.gmail.com with ESMTPSA id j21-20020a170906279500b009dddec5a96fsm2943042ejc.170.2023.12.02.02.42.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Dec 2023 02:42:23 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv6 00/10] thread-specific breakpoints in just some inferiors Date: Sat, 2 Dec 2023 10:42:08 +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=-1.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_ABUSEAT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no 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 v6: - Rebased to current master, one minor fix due to the C++17 changes, nothing major. Retested. In v5: - Updates after Lancelot's feedback, including, -force-condition can no longer be abbreviated to '-', and can't be used immediately after the breakpoint condition. - More tests to check some of the edge cases. In v4: - Big update, this series now handles thread-specific and inferior-specific breakpoints. In v3: - Rebased on to current upstream/master, this includes all Simon's recent breakpoint changes. Retested with no regressions seen. In v2: - Rebased on current upstream/master and retested, - No changes to code or docs. --- Andrew Burgess (10): gdb: create_breakpoint: add asserts and additional comments gdb: create_breakpoint: asserts relating to extra_string/parse_extra gdb: change 'if' to gdb_assert in update_dprintf_command_list gdb: build dprintf commands just once in code_breakpoint constructor gdb: don't display inferior list for pending breakpoints gdb: parse pending breakpoint thread/task immediately gdb: don't set breakpoint::pspace for in create_breakpoint gdb: remove breakpoint_re_set_one gdb: remove tracepoint_probe_create_sals_from_location_spec gdb: only insert thread-specific breakpoints in the relevant inferior gdb/Makefile.in | 2 + gdb/NEWS | 11 + gdb/ada-lang.c | 6 +- gdb/break-catch-throw.c | 6 +- gdb/break-cond-parse.c | 463 +++++++++++ gdb/break-cond-parse.h | 49 ++ gdb/breakpoint.c | 757 +++++++++--------- gdb/breakpoint.h | 101 ++- gdb/testsuite/gdb.ada/tasks.exp | 6 +- gdb/testsuite/gdb.base/condbreak.exp | 57 +- gdb/testsuite/gdb.base/pending.exp | 23 +- gdb/testsuite/gdb.linespec/explicit.exp | 4 +- gdb/testsuite/gdb.mi/mi-dprintf-pending.exp | 3 +- gdb/testsuite/gdb.mi/new-ui-bp-deleted.exp | 8 +- .../gdb.mi/user-selected-context-sync.exp | 4 +- .../gdb.multi/bp-thread-specific.exp | 7 +- .../gdb.multi/inferior-specific-bp.exp | 16 +- .../gdb.multi/multi-target-continue.exp | 2 +- .../gdb.multi/multi-target-ping-pong-next.exp | 4 +- .../gdb.multi/pending-bp-del-inferior.c | 28 + .../gdb.multi/pending-bp-del-inferior.exp | 214 +++++ gdb/testsuite/gdb.multi/pending-bp-lib.c | 22 + gdb/testsuite/gdb.multi/pending-bp.c | 66 ++ gdb/testsuite/gdb.multi/pending-bp.exp | 336 ++++++++ gdb/testsuite/gdb.multi/tids.exp | 6 +- .../gdb.threads/del-pending-thread-bp-lib.c | 22 + .../gdb.threads/del-pending-thread-bp.c | 85 ++ .../gdb.threads/del-pending-thread-bp.exp | 108 +++ 28 files changed, 1947 insertions(+), 469 deletions(-) create mode 100644 gdb/break-cond-parse.c create mode 100644 gdb/break-cond-parse.h create mode 100644 gdb/testsuite/gdb.multi/pending-bp-del-inferior.c create mode 100644 gdb/testsuite/gdb.multi/pending-bp-del-inferior.exp create mode 100644 gdb/testsuite/gdb.multi/pending-bp-lib.c create mode 100644 gdb/testsuite/gdb.multi/pending-bp.c create mode 100644 gdb/testsuite/gdb.multi/pending-bp.exp create mode 100644 gdb/testsuite/gdb.threads/del-pending-thread-bp-lib.c create mode 100644 gdb/testsuite/gdb.threads/del-pending-thread-bp.c create mode 100644 gdb/testsuite/gdb.threads/del-pending-thread-bp.exp base-commit: a393b155174d20d3d120b5012b87c5438ab9e3d4 -- 2.25.4