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 C403A3858D28 for ; Thu, 16 Mar 2023 17:03:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C403A3858D28 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=1678986230; 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=Dj/At+/pqhfpzvb742hfWr/V8bzJn8mN6o937nJZzhY=; b=dx6pIkvSmC8KgHA73p0DG0uzWsYHGesIyj/4hEuzMCTQdNk7BW/NmNfXtFT5oSo8ZGXwsV FNA6S/hhI+uE/f9WpSg8+30wBpjbRaGOGjx0yTSFT0BXVuxPPuEclJ++EywtMUTy7cPSeM +I8nHjrxJINqfVzF4dS5d4DZtU/qk/w= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-642-9R8VUii-PgOjwFHssvvmJw-1; Thu, 16 Mar 2023 13:03:49 -0400 X-MC-Unique: 9R8VUii-PgOjwFHssvvmJw-1 Received: by mail-ed1-f71.google.com with SMTP id h11-20020a0564020e8b00b004e59d4722a3so3940501eda.6 for ; Thu, 16 Mar 2023 10:03:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678986228; 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=Dj/At+/pqhfpzvb742hfWr/V8bzJn8mN6o937nJZzhY=; b=LOXfQLO4DIOs9B7KY9s5iLiFsQLaI+UvOTzUGMzAFjoQNjH3eNhRnCK4a4WbrEH2LV PX4iouipkdc4nFiC1fN5MgdLRvVyJn3weDQirZRRG9tWp5LXESuAcqDtsMI8eD63UJfD lInNVTO960ycNsdbpnBHuZyP1eWf7bXnMsZA7dnW9dhgG4N0d1nSFIvx4ntz44X1Q7sS K/MBSpcxHAmKVat069n/GieSeFfPWpDZdF/t4aKTvkC4DajzrQlc3wkkXRuokk4SmagW s/I9Y4cTrDsMz+syHz4sq4U1oDcMfoU1BJgPoNPUj2EupQLu6MUnLrda/0NbAYu3boq7 kg7g== X-Gm-Message-State: AO0yUKU3Hny5c5qaUiHyIii+rhfrQNqs3n1ColVf5ELGEi//CfGIScvL oa0TmkZKUDvY1KP8SFBLV3AbkCEw62WDYP5O/xChClZouAqkiYHDFxJdIAeXU1AW+o/DF9RXM5d sn1RJwcdtsp+zHUWRPk+GyT0/6BytymDaDR73HoDuc6/F3AuLy1sXpxZKniitKWUj3ZGVh5UbXW j9YzsfNw== X-Received: by 2002:aa7:db4f:0:b0:4fc:61a5:b9c8 with SMTP id n15-20020aa7db4f000000b004fc61a5b9c8mr288409edt.11.1678986228197; Thu, 16 Mar 2023 10:03:48 -0700 (PDT) X-Google-Smtp-Source: AK7set+EGN9PWH4hlySANTWaEY/I5o9MBXcmPyquUdK7U6tDfOUUj5kBlLtICY8FWKQ5S6tdj83Hxg== X-Received: by 2002:aa7:db4f:0:b0:4fc:61a5:b9c8 with SMTP id n15-20020aa7db4f000000b004fc61a5b9c8mr288388edt.11.1678986227913; Thu, 16 Mar 2023 10:03:47 -0700 (PDT) Received: from localhost (95.72.115.87.dyn.plus.net. [87.115.72.95]) by smtp.gmail.com with ESMTPSA id b21-20020a170906709500b009268d94c9dasm4059123ejk.152.2023.03.16.10.03.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Mar 2023 10:03:47 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv3 0/2] Inferior specific breakpoints Date: Thu, 16 Mar 2023 17:03:43 +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: Changes in v3: - Patches #2, #3, and #4 from the previous series have been merged. - Patch #1 is removed from this series in favour of a future patch from Pedro as mentioned here: https://sourceware.org/pipermail/gdb-patches/2023-February/196557.html - Patch #6 has been removed. The core part of this patch (changing how the 'start' breakpoint is created) has been merged back into patch #5. The extra tests added in the old #6 are no longer relevant and have been dropped. The 'start' command is already tested in our testsuite, so this extra change should be well tested. - In patch #5: + The docs are unchanged (actually I fixed 'a' to 'an' in one place). + Inferior breakpoints are deleted when the inferior is removed, not when it exits. + We still don't filter breakpoint locations based on the inferior program space, but this is now discussed in the commitmessage. Bascially doing this opens a huge can of worms. I am working on this, but see this as a future optimisation rather than a blocker for this initial change. + Pedro's feedback about how inferior specific breakpoints were deleted has been addressed. Since Pedro's initial feedback I've fixed how thread-specific breakpoints are deleted (I had originally just copied this code), and I've now copied the fixed code. + The patch no longer adds inferior specific watchpoints. As Pedro pointed out this feature would only have had a very limited niche use case, and I didn't see the value of trying to include that change in this commit. If a user tries to create an inferior-specific watchpoint they'll now get an error. We could change this in the future if we're keen. Changes in v2: - Biggest changes are in patch #3, as suggested by Baris, I've now removed the 'thread' and 'inferior' tags from the end of each location in the 'info breakpoints' output. The information was already available in the condition line, so this removes some duplication. For Ada task conditions I've added a condition line as this was missing. - Doc updates in #4 and #5 to fix the issues Eli pointed out. These all seemed pretty minor so I don't think there should be anything too surprising there. - Updated patch #5 based on feedback from Baris, this was all pretty minor stuff though, formatting, and rewording some error messages, - Updated patch #6 based on feedback from Baris, this is a minor test cleanup. Thanks, Andrew --- Andrew Burgess (2): gdb: cleanup around some set_momentary_breakpoint_at_pc calls gdb: add inferior-specific breakpoints gdb/NEWS | 15 ++ gdb/breakpoint.c | 237 ++++++++++++++---- gdb/breakpoint.h | 14 +- gdb/doc/gdb.texinfo | 72 +++++- gdb/doc/python.texi | 26 +- gdb/guile/scm-breakpoint.c | 7 +- gdb/infcmd.c | 15 +- gdb/inferior.h | 11 + gdb/infrun.c | 12 +- gdb/linespec.c | 4 +- gdb/mi/mi-cmd-break.c | 11 +- gdb/mi/mi-main.c | 18 +- gdb/mi/mi-main.h | 6 + gdb/python/py-breakpoint.c | 96 ++++++- gdb/python/py-finishbreakpoint.c | 2 +- gdb/testsuite/gdb.ada/tasks.exp | 2 + gdb/testsuite/gdb.linespec/cpcompletion.exp | 4 +- gdb/testsuite/gdb.linespec/explicit.exp | 1 + gdb/testsuite/gdb.mi/new-ui-bp-deleted.c | 29 +++ gdb/testsuite/gdb.mi/new-ui-bp-deleted.exp | 108 ++++++++ .../gdb.multi/inferior-specific-bp-1.c | 52 ++++ .../gdb.multi/inferior-specific-bp-2.c | 52 ++++ .../gdb.multi/inferior-specific-bp.exp | 179 +++++++++++++ gdb/testsuite/gdb.python/py-breakpoint.exp | 43 ++++ gdb/testsuite/lib/completion-support.exp | 2 +- gdb/testsuite/lib/mi-support.exp | 20 +- 26 files changed, 946 insertions(+), 92 deletions(-) create mode 100644 gdb/testsuite/gdb.mi/new-ui-bp-deleted.c create mode 100644 gdb/testsuite/gdb.mi/new-ui-bp-deleted.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: 5a9affd7b875ac183a66ce41f3f226819f0790ed -- 2.25.4