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 835623858D37 for ; Thu, 30 Nov 2023 19:43:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 835623858D37 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 835623858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701373406; cv=none; b=USWRApv04IvE0KUKu0WxgvvJAPBBv/xXcQZKFwpaCt1P1mXpJGFjXXQgjKxKH/kd8ZpNITW4KAdJrfLH04BH37LASMfZWcUfJt9LVWQrWLTNRn4FBLNllvZKG5zf9/pqHbPHnhQToDxQqfTkTaq0BprA1Y+jTZj+Jb+TCzqVVhI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701373406; c=relaxed/simple; bh=Ofznvsd+zhcf8eg3TAtW3KSTLsMAFS3qc43Vrzd4WkQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=oNWi2TYlH4UmmKxXqAmc053tyXw2BFwQqLfovNo6cPHSiDyRAVBGs5zCw1qN63arqlEVX2T3EwjIF6SVg6IT5+0tSVlsYClRVIS1BicgkkBgpDOtqadPfuBzxYWnKc3XNVHwtBdg6A74vTsKOrP+BknA45BUdnNeZsJzNYXUTa0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701373405; 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=ELF6t5vRTdYWLl5D2yKs81JKz6poKefLAWpMzZn/ntk=; b=EuFGsKFr2yq1NK7JbZgQsiPwWyg5L6YP1Aaing9ZQ6lM6pxkOGyHVseN9gzVXxrWKGrDM8 iJnDrl21ReQQ+9HzjlbeHbf5/IaRWY7/8tkBbxD+Z3FbX4iLZLDZviZ9nQ3UkuwmPReMrQ dCVpZ1yZ9taPfhxPUepJ3NCiWAycVcI= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-633-iNubmvnlOeCiNAcMIxxEbQ-1; Thu, 30 Nov 2023 14:43:24 -0500 X-MC-Unique: iNubmvnlOeCiNAcMIxxEbQ-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-333127febb2so1204200f8f.2 for ; Thu, 30 Nov 2023 11:43:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701373403; x=1701978203; 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=ELF6t5vRTdYWLl5D2yKs81JKz6poKefLAWpMzZn/ntk=; b=cz+bWXKPootLog6ntep7tJNT+OeSo1DVpzOCHN7Ydl36aENLIZDcbc+EzV5SYInQSq p4R7/1ruDCWmyANgtDFpvAr1fiPV8Fu+x0OInqQBuKa6u7NAYuxhl41sOryV5JKHsNf2 CaU/SW9MUQs8R1+zEGG4tPGGUWp2Bv9GESwxbpEK8UsFVtYe+CoNerYrCcqqaw0ZJIWP IvRtOhnpQ82ZulSvnJBahGLBMvzp/ZZI6Jgi1PN45BL91owRDZnJWQ+eicCOiApN4n+s +ZNOHBVU06oZeiZGtli8g4GPcPw0punBnVcrtdqzXlXyy8HcN/mOu2gPOHClsRIrB2vQ Z9Xg== X-Gm-Message-State: AOJu0YwT17ths70jrZr8W9YvCVLQHFOiKzBWpRDsZz1wA1mOl+uTPPXt ACAK6Ao4Tx0f19lb32ADKd2Z0UYwlJXHtm8rmZAjkTanXRQM2uPVDR119WUyoIe7KaX7a1FGla+ 6FGYwD+1AMTADi0gwNYq7RwshhNqhgA== X-Received: by 2002:adf:fa82:0:b0:333:2fd2:5215 with SMTP id h2-20020adffa82000000b003332fd25215mr30548wrr.142.1701373402748; Thu, 30 Nov 2023 11:43:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IGZFKUCX1Hvm7RmHiOobJ1XaSaDupkv+sw3Ey+0Y/kzaLyE0jeDunIxnEJ8kUnjg2+QPFk37Q== X-Received: by 2002:a17:906:4ad0:b0:a01:dc84:1658 with SMTP id u16-20020a1709064ad000b00a01dc841658mr930ejt.4.1701369086525; Thu, 30 Nov 2023 10:31:26 -0800 (PST) Received: from localhost (92.40.185.184.threembb.co.uk. [92.40.185.184]) by smtp.gmail.com with ESMTPSA id pj20-20020a170906d79400b009fd2028e62csm957606ejb.71.2023.11.30.10.31.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 10:31:26 -0800 (PST) From: Andrew Burgess To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 2/3] gdbserver: allow the --debug command line option to take a value In-Reply-To: <83v8ad1hcv.fsf@gnu.org> References: <83v8ad1hcv.fsf@gnu.org> Date: Thu, 30 Nov 2023 18:31:24 +0000 Message-ID: <87bkbbnldv.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=-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_H4,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: Eli Zaretskii writes: >> From: Andrew Burgess >> Cc: Andrew Burgess >> Date: Tue, 7 Nov 2023 18:03:22 +0000 >> >> gdb/NEWS | 7 ++++ >> gdb/doc/gdb.texinfo | 62 +++++++++++++++++++++++---- >> gdbserver/server.cc | 100 ++++++++++++++++++++++++++++++++++++++++++-- >> 3 files changed, 156 insertions(+), 13 deletions(-) > > Thanks. > >> --- a/gdb/NEWS >> +++ b/gdb/NEWS >> @@ -6,6 +6,13 @@ >> * GDB index now contains information about the main function. This speeds up >> startup when it is being used for some large binaries. >> >> +* New features in the GDB remote stub, GDBserver >> + >> + ** The `--debug` option now takes an (optional) list of components > ^^^^^^^^^ > That's not how we quote in plain-ASCII documentation. (And I think we > don't need quoting here anyway.) > >> @cindex @option{--debug}, @code{gdbserver} option >> -The @option{--debug} option tells @code{gdbserver} to display extra >> -status information about the debugging process. >> +The @option{--debug[=option1,option2,...]} option tells > ^^^ > Please use @dots{} instead of literally 3 dots. > >> +@code{gdbserver} to display extra diagnostic information about the >> +debugging process. The @var{option1}, @var{option2}, etc control for > ^^^ > "etc.@:" > >> +@item remote >> +This enables diagnostic output relating to the transfer of remote > ^^^^^^^^ > "related" > >> -@item --debug >> +@item --debug@r{[}=option1,option2,...@r{]} > ^^^ > @dots{} > >> +Each @var{option} is the name of a component for which debugging >> +should be enabled. The list of possible options is @option{all}, >> +@option{threads}, @option{event-loop}, @option{remote}. The special >> +option @option{all} enables all components. The option list is >> +processed left to right, and an option can be prefixed with the >> +@kbd{-} character to disable output for that component, so you could write: >> + >> +@smallexample >> +target> gdbserver --debug=all,-event-loop >> +@end smallexample >> + >> +@noindent to turn on debug output for all components except @option{event-loop}. > > Why do we need this duplicate description? I'd prefer to have a short > sentence with a cross-reference to the previous description, so that > we could have only one of them, not two. This is unfortunate. One of these instances is the general gdb info manual, while the second of these is the gdbserver man page. Both of these are (maybe unfortunately?) included within the info manual, so there is indeed duplication, but the pure man page only includes one of these blocks. I guess we could restructure things somehow so that the man page part is used in some way such that the duplication is removed? But that seems like a bigger refactoring task; there is already lots of duplication between the man page and the info manual, so I think trying to solve the problem just for this one option doesn't make much sense. Thanks, Andrew