From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 5B4623858C62 for ; Wed, 8 Feb 2023 15:51:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5B4623858C62 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPmji-0008Ck-UO; Wed, 08 Feb 2023 10:51:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=pMxBiJ/z2m+TZi2ScjZpjzSkIQlCiGwAUhHMTByso/M=; b=p6uVYlHPyeRA pefZ0Jk33gv820SCY4HV1FebPugb8izwc8CD8i07kouuXEP4SYkjiq5d15ZNFJgNy9NJpwdOw1+SR bU5ZLKqAEu3YF7ccVYQhfH2eqmW7yPFMsP0DFoG63gVEV7/GgfYq6Op13UrzkVeRP+S+wfFlJGNsJ x6mOW0zntwRBl3ZUAqo1uHDta7sSwajeO3EEjjZfDKWqe8HTrqWMazRIsVlZ5dEU+sbVLe6EQ88uf +Fdmyhu5KDT0JP7W+WL8IO3fuxpBM15vn9Kovvj2iKB46MGs/V57p/vTW4QddvIq+5OMJDvjMJNUV sV5bjrlDhCf/JsqeD8W61A==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPmji-0006ka-9K; Wed, 08 Feb 2023 10:51:54 -0500 Date: Wed, 08 Feb 2023 17:52:13 +0200 Message-Id: <83fsbgnoia.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess Cc: gdb-patches@sourceware.org In-Reply-To: (message from Andrew Burgess via Gdb-patches on Wed, 8 Feb 2023 15:16:16 +0000) Subject: Re: [PATCH 1/2] gdb: only allow one of thread or task on breakpoints or watchpoints References: X-Spam-Status: No, score=1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > Cc: Andrew Burgess > Date: Wed, 8 Feb 2023 15:16:16 +0000 > From: Andrew Burgess via Gdb-patches > > After this mailing list posting: > > https://sourceware.org/pipermail/gdb-patches/2023-February/196607.html > > it seems to me that in practice an Ada task maps 1:1 with a GDB > thread, and so it doesn't really make sense to allow uses to give both > a thread and a task within a single breakpoint or watchpoint > condition. > > This commit updates GDB so that the user will get an error if both > are specified. > > I've added new tests to cover the CLI as well as the Python and Guile > APIs. For the Python and Guile testing, as far as I can tell, this > was the first testing for this corner of the APIs, so I ended up > adding more than just a single test. > > For documentation I've added a NEWS entry, but I've not added anything > to the docs themselves. Currently we document the commands with a > thread-id or task-id as distinct command, e.g.: > > 'break LOCSPEC task TASKNO' > 'break LOCSPEC task TASKNO if ...' > 'break LOCSPEC thread THREAD-ID' > 'break LOCSPEC thread THREAD-ID if ...' > > As such, I don't believe there is any indication that combining 'task' > and 'thread' would be expected to work; it seems clear to me in the > above that those four options are all distinct commands. > > I think the NEWS entry is enough that if someone is combining these > keywords (it's not clear what the expected behaviour would be in this > case) then they can figure out that this was a deliberate change in > GDB, but for a new user, the manual doesn't suggest combining them is > OK, and any future attempt to combine them will give an error. > --- > gdb/NEWS | 6 +++ > gdb/breakpoint.c | 36 ++++++++++++-- > gdb/breakpoint.h | 10 ++++ > gdb/guile/scm-breakpoint.c | 10 ++++ > gdb/python/py-breakpoint.c | 14 ++++++ > gdb/testsuite/gdb.ada/tasks.exp | 85 +++++++++++++++++++++++++++++++-- > 6 files changed, 153 insertions(+), 8 deletions(-) OK for the NEWS part, thanks.