From patchwork Mon Nov 28 11:25:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 55328 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 E0B11385B51C for ; Mon, 28 Nov 2022 11:26:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E0B11385B51C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669634769; bh=2u7ErP9WF5u1Z8UxXR63lZl9dqAV5BwfQYZj7VaqEh4=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=I4sL+Vo32q8JCz50/UIoNKH92YVOKzVf7Q8wJsT/V/mFmi9r+Aj/0H5Xhro9c1S53 8nLWsFNQ4dx5Us+l6wWsnaKRtOnsPy8RrGnZDjTcbrmDEISzzVbbODzfxhB7QOED/y vS8lT3ShlejabiqU7hz5Aj+TnO8ZHqG1yEY6ExT4= 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.129.124]) by sourceware.org (Postfix) with ESMTPS id 018A73858D28 for ; Mon, 28 Nov 2022 11:25:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 018A73858D28 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-673-3KtJs8yePYSAntLuq2J6rA-1; Mon, 28 Nov 2022 06:25:43 -0500 X-MC-Unique: 3KtJs8yePYSAntLuq2J6rA-1 Received: by mail-wr1-f69.google.com with SMTP id r23-20020adfa157000000b00241bcae980cso1787007wrr.7 for ; Mon, 28 Nov 2022 03:25:42 -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:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2u7ErP9WF5u1Z8UxXR63lZl9dqAV5BwfQYZj7VaqEh4=; b=yFUu7MKiQY1KnproOGyhH7SoBZBLqtpYMsErz35t9OXHpOPPmZv+PlVaxDAPrbbxa1 3SulcJBiqDrci2smOwhDzI9TPL108p9PUqfWCZzNesm9GgSTXe8HOr0gMYRizz7fKZyc QZZwmdqS3eEjYtrFHXZgqtxreX41T2XxT+s9tBnL+W766dDmGnEouFGUR0zrbqbzfe4L m48Twg/wuWjKvUT/Bf94FwS/Fkktkt+EjQRQc7+rwhdf+bmA/S2ymeHzB+p8sMRX9q7t 0+AVNQt8OrwNscURk3FpC7P7FHpQvJCdtmjAxcYvcGCUMsq5Z8XJKOhLKU6XO0OksQyZ qC3Q== X-Gm-Message-State: ANoB5pnT87u9McP+/ntZpV2FC/tgf68Zt/0osX4twcu8NA2ya+ADw80J 73LH0JA4sKVYNBGp6Fty1zJPaA1F7J+9fbXvcJHrV9yH1vTOniTwqLeaOzDapbZNFiC1JpXeM8L WqnsaCht2Kavf7aLwBH8Kvgrc7ElI8j1ddYKwiyJHmfiq81jot5xxMycq40mhavbbavLYjnUM0A == X-Received: by 2002:a5d:52d0:0:b0:241:c340:d1ea with SMTP id r16-20020a5d52d0000000b00241c340d1eamr24102478wrv.434.1669634741855; Mon, 28 Nov 2022 03:25:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf4sbj1/A7JDIQq7cRfY/XyUMF6Rfm+fJRCnDvIyCtGKlqxfhV2nKtUDICeM0iLMMxbKxW5J8A== X-Received: by 2002:a5d:52d0:0:b0:241:c340:d1ea with SMTP id r16-20020a5d52d0000000b00241c340d1eamr24102456wrv.434.1669634741520; Mon, 28 Nov 2022 03:25:41 -0800 (PST) Received: from localhost ([31.111.84.238]) by smtp.gmail.com with ESMTPSA id t6-20020adfeb86000000b00241e5b917d0sm12385957wrn.36.2022.11.28.03.25.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 03:25:41 -0800 (PST) To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 0/6] Inferior specific breakpoints Date: Mon, 28 Nov 2022 11:25:32 +0000 Message-Id: X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 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" Adding inferior specific breakpoints to GDB. These are like the current thread or Ada task specific breakpoints, but cover inferiors. Patches #1, #2, #3 are unreleated bug fixes that I ran into while adding this feature. Patch #4 is possibly a bug fix, or maybe a tightening of our CLI rules for specifying thread/task breakpoints and watchpoints. This one could be dropped if it's not wanted. Patch #5 is where I add inferior specific breakpoints. Patch #6 converts the 'start' mechanism to use inferior specific breakpoints. --- Andrew Burgess (6): gdb/remote: announce thread exit events for remote targets gdb/testsuite: don't try to set non-stop mode on a running target gdb: fix display of thread condition for multi-location breakpoints gdb: error if 'thread' or 'task' keywords are overused gdb: add inferior-specific breakpoints and watchpoints gdb: convert the 'start' breakpoint to use inferior keyword gdb/NEWS | 16 ++ gdb/breakpoint.c | 188 +++++++++++++++--- gdb/breakpoint.h | 10 +- gdb/doc/gdb.texinfo | 74 ++++++- gdb/doc/python.texi | 27 ++- gdb/dummy-frame.c | 1 + gdb/elfread.c | 5 +- gdb/guile/scm-breakpoint.c | 5 + gdb/infcmd.c | 10 +- gdb/inferior.h | 10 + gdb/infrun.c | 2 + gdb/linespec.c | 4 +- gdb/python/py-breakpoint.c | 77 +++++++ gdb/remote.c | 4 + gdb/testsuite/gdb.ada/tasks.exp | 4 + .../gdb.base/start-inferior-specific-1.c | 32 +++ .../gdb.base/start-inferior-specific-2.c | 22 ++ .../gdb.base/start-inferior-specific.exp | 55 +++++ gdb/testsuite/gdb.base/thread-bp-multi-loc.c | 44 ++++ .../gdb.base/thread-bp-multi-loc.exp | 88 ++++++++ gdb/testsuite/gdb.linespec/cpcompletion.exp | 4 +- gdb/testsuite/gdb.linespec/explicit.exp | 1 + gdb/testsuite/gdb.linespec/keywords.exp | 10 +- .../gdb.multi/inferior-specific-bp-1.c | 52 +++++ .../gdb.multi/inferior-specific-bp-2.c | 52 +++++ .../gdb.multi/inferior-specific-bp.exp | 183 +++++++++++++++++ gdb/testsuite/gdb.python/py-breakpoint.exp | 43 ++++ .../gdb.threads/thread-specific-bp.exp | 142 ++++++------- gdb/testsuite/gdb.threads/watchthreads2.exp | 3 + gdb/testsuite/lib/completion-support.exp | 2 +- 30 files changed, 1041 insertions(+), 129 deletions(-) create mode 100644 gdb/testsuite/gdb.base/start-inferior-specific-1.c create mode 100644 gdb/testsuite/gdb.base/start-inferior-specific-2.c create mode 100644 gdb/testsuite/gdb.base/start-inferior-specific.exp create mode 100644 gdb/testsuite/gdb.base/thread-bp-multi-loc.c create mode 100644 gdb/testsuite/gdb.base/thread-bp-multi-loc.exp create mode 100644 gdb/testsuite/gdb.multi/inferior-specific-bp-1.c create mode 100644 gdb/testsuite/gdb.multi/inferior-specific-bp-2.c create mode 100644 gdb/testsuite/gdb.multi/inferior-specific-bp.exp base-commit: ac8df5a1921904b3928429e696ad8b40c612f829