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.129.124]) by sourceware.org (Postfix) with ESMTPS id B336A3858C74 for ; Thu, 2 Feb 2023 14:08:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B336A3858C74 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=1675346893; 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: in-reply-to:in-reply-to:references:references; bh=D3U20gVvB0iimosWby9lbqXKbnHtANzFFDPxcwysW5k=; b=BD4Srds/h+FjDxM1nBxEKxGBVn4GSVHrDG6dmcXQtxj3QM3vqIWq9kW6bV0W6L0PFaAUSh KxabR8eZUiMR0p+J8EA0GYTZFL8exlKKRuZlbDrYOJQGNXS8CnZQYDJ/NktDV8j7sVid+V 3VZhV3Q8y9QVwQoRKp6T/tbeQKpTn5I= Received: from mail-yw1-f197.google.com (mail-yw1-f197.google.com [209.85.128.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-529-tRDiquheMbunpc-4g9cjOQ-1; Thu, 02 Feb 2023 09:08:12 -0500 X-MC-Unique: tRDiquheMbunpc-4g9cjOQ-1 Received: by mail-yw1-f197.google.com with SMTP id 00721157ae682-50fe0b4495cso20794237b3.14 for ; Thu, 02 Feb 2023 06:08:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=D3U20gVvB0iimosWby9lbqXKbnHtANzFFDPxcwysW5k=; b=PSM94ZPu9QuYuSqCbTtsKxEaYvmSChaVH9r/CKBmzz0HLefezcElC27FexqRgOs1sw TdGxDmZJ3cDKtlEZuzvJ/nV43NAS5vyfjEWE7OTcjcAaPf69+jh4TtDFNuHex90imbGi Y0+le1I0LL/dv6FEXbIsBdGWE9fkZtguKN4lZf7rStZg6fN7mhiihzwoWRwa+XuVdQa6 rw/kvz5fvKKZROrdw1UcfQEHPYPtFiVqNL1qml70Tm7Y7MbqURMvdkwI6emarykcwoM5 TtAgl6jCo621WvZfij1eUMq5vDqYyfidhLVaW0SdT+aids7U0OW118Q6o18r8y57BN5F Bs7Q== X-Gm-Message-State: AO0yUKXv9b+QsI0GOpg3Ve6kYGUwbM79eC7jdKhPNTbbtGymGHYfAhjB Ym8tY3+J8IyuizCxx0C4VMFFO4jkNQboiMHbdQ56xrZDx1JUAJpPgB5CNv+4GSZXOTodzk6jIZh yAfflrV6Qq1OrYdPsxsNfgw== X-Received: by 2002:a25:f510:0:b0:863:3b1e:b9c with SMTP id a16-20020a25f510000000b008633b1e0b9cmr71064ybe.36.1675346891250; Thu, 02 Feb 2023 06:08:11 -0800 (PST) X-Google-Smtp-Source: AK7set8rlnHvXx6xMLnGzkmuCKe9vmhydVzMyTf7SBUhbCi6p41WS6QNBPRsKoNU8PF8NIkbrgC/fg== X-Received: by 2002:a25:f510:0:b0:863:3b1e:b9c with SMTP id a16-20020a25f510000000b008633b1e0b9cmr71041ybe.36.1675346890885; Thu, 02 Feb 2023 06:08:10 -0800 (PST) Received: from localhost (95.72.115.87.dyn.plus.net. [87.115.72.95]) by smtp.gmail.com with ESMTPSA id q187-20020a378ec4000000b006f7ee901674sm10494618qkd.2.2023.02.02.06.08.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 06:08:10 -0800 (PST) From: Andrew Burgess To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: [PATCHv2 4/6] gdb: error if 'thread' or 'task' keywords are overused In-Reply-To: <835yd1nxvz.fsf@gnu.org> References: <835yd1nxvz.fsf@gnu.org> Date: Thu, 02 Feb 2023 14:08:08 +0000 Message-ID: <87mt5wrwhj.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.8 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: Eli Zaretskii writes: >> Cc: Andrew Burgess >> Date: Fri, 20 Jan 2023 09:46:27 +0000 >> From: Andrew Burgess via Gdb-patches >> >> --- a/gdb/NEWS >> +++ b/gdb/NEWS >> @@ -9,6 +9,15 @@ >> This support requires that GDB be built with Python scripting >> enabled. >> >> +* For the break command, multiple uses of the 'thread' or 'task' >> + keywords will now give an error instead of just using the thread or >> + task id from the last instance of the keyword. >> + >> +* For the watch command, multiple uses of the 'task' keyword will now >> + give an error instead of just using the task id from the last >> + instance of the keyword. The 'thread' keyword already gave an error >> + when used multiple times with the watch command, this remains unchanged. > > This part is OK, but I wonder whether we should provide an example of > such incorrect usage which will now be flagged, because I'm not sure > everyone will understand what "multiple uses" means in this context. I've now written: * For the break command, multiple uses of the 'thread' or 'task' keywords will now give an error instead of just using the thread or task id from the last instance of the keyword. e.g.: break foo thread 1 thread 2 will now give an error rather than using 'thread 2'. * For the watch command, multiple uses of the 'task' keyword will now give an error instead of just using the task id from the last instance of the keyword. e.g.: watch my_var task 1 task 2 will now give an error rather than using 'task 2'. The 'thread' keyword already gave an error when used multiple times with the watch command, this remains unchanged. How's that? Thanks, Andrew