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 4892D3858418 for ; Fri, 14 Jul 2023 08:53:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4892D3858418 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=1689324828; 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=0zH7H11Clf4MefXIEIc3NDND/BBX+Pzw+xZcR9inaFs=; b=VnkkJ6Me4377mChm3sl7Ol9En97MEewrObiFan3tGg02i2aVWNgYcs8qIZsz/GqrfZGJP/ ycXKd71FEk2MdndOIDP1P7FdBC2ThvFISfMr3kcflX+UjpBEo8dwVmFRMBM6C1NuLIO5dE cV9/I5BI6yM09sOfeXMtHVknN1K97ak= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-64-5l4fVBnENoKUjiHGoObroQ-1; Fri, 14 Jul 2023 04:53:47 -0400 X-MC-Unique: 5l4fVBnENoKUjiHGoObroQ-1 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7659c6caeaeso218730385a.3 for ; Fri, 14 Jul 2023 01:53:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689324826; x=1691916826; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0zH7H11Clf4MefXIEIc3NDND/BBX+Pzw+xZcR9inaFs=; b=VJWrVGnY1yUn9E+dzj4TeLARhZH9QMNXRYeKzrdoOM8YEPBeh5Rz3IYE2zrSBRVVk3 N4ju+AA4eBx34J9ZBwHr4Lr4LTJy6vB2D/IUCC1DqctzdQPqrI3YhWBJTiJ4xN/qEkWY /cPMgGRz7T+JxE4FMBhJdHrAqc6luFx6xTMDAdPlzfsnh7wrMGPucXtfcY2oZ7o2CwoZ t44M+g2D9tAUoHC3DrF62wunUBnC8ssx/xjjNb5EQ8t9zf6Yi2Xv62hZS9CFpptimAxo jz8AKHwkrof23P2m7hSEG5y1JDJf+j0aUbXDLKeTe/wi1SIjUtb3sRKuF0Nieg6D+8nh zpcA== X-Gm-Message-State: ABy/qLYWU5fThkIG8JN0hX98FHTA4z79DpzkyhepvwVzaaT3DBaYP1ZP j46oJA34jWCH4dYUS33qiAuOHaGIJ69zQb4suGKg94TpRX3yzz5o12gmCMfFLkHEf276x5DMVR2 Yyn5dVaSXYfuiYYrQRz7v6MXKmwBb7g== X-Received: by 2002:a05:620a:25ca:b0:765:a89f:8949 with SMTP id y10-20020a05620a25ca00b00765a89f8949mr4359964qko.51.1689324826720; Fri, 14 Jul 2023 01:53:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlG6qaHrt9NJgRcMqyiy1MZaPw38bCCWd3MlhUP+tDie5+aRchqUeHmwe8f/GwzQh40bVN3KhA== X-Received: by 2002:a05:620a:25ca:b0:765:a89f:8949 with SMTP id y10-20020a05620a25ca00b00765a89f8949mr4359953qko.51.1689324826465; Fri, 14 Jul 2023 01:53:46 -0700 (PDT) Received: from [192.168.0.129] (ip-94-112-225-44.bb.vodafone.cz. [94.112.225.44]) by smtp.gmail.com with ESMTPSA id dy7-20020a05620a60c700b00767d00d10e9sm3585774qkb.58.2023.07.14.01.53.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 14 Jul 2023 01:53:46 -0700 (PDT) Message-ID: <05293df6-b087-5c3b-1b3f-6dcf6d14541e@redhat.com> Date: Fri, 14 Jul 2023 10:53:43 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v4 4/4] gdb/doc: document '+' argument for 'list' command To: Matt Rice , Keith Seitz Cc: gdb-patches@sourceware.org References: <20230713102411.2279542-1-blarsen@redhat.com> <20230713102411.2279542-5-blarsen@redhat.com> <7774b382-a663-f593-ea99-c52a8495aead@redhat.com> From: Bruno Larsen In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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: On 13/07/2023 23:30, Matt Rice wrote: > On Thu, Jul 13, 2023 at 5:36 PM Keith Seitz via Gdb-patches > wrote: >> On 7/13/23 03:24, Bruno Larsen via Gdb-patches wrote: >> >>> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo >>> index 20c9b24400d..cd86da50f46 100644 >>> --- a/gdb/doc/gdb.texinfo >>> +++ b/gdb/doc/gdb.texinfo >>> @@ -9148,6 +9148,9 @@ Stack}), this prints lines centered around that line. If no >>> @code{list} command has been used and no solitary line was printed, >>> it prints the lines around the function @code{main}. >>> >>> +@item list + >>> +Same as using with no arguments. >>> + >>> @item list - >>> Print lines just before the lines last printed. >>> >> Grepping gdb.texinfo for "list +" definitely has a result: >> >> $ grep 'list +' gdb.texinfo >> @item list + >> list +[NSText initialize] >> >> This is from the same "Printing Source Line" section of the Manual >> that your patch touches. This is the blurb which gives a "complete >> description of the possible arguments for list". > I guess it is worth noting that this usage of 'list +[NSText > initialize]', is completely different than the first match '@item list > +' Keith refers to, > it comes from the objective-c section and in that case the '+' > signifies that the initialize method is a class method. > That one comes from the section "Method Names in Commands", an awkward > bit of ambiguity. But it took me a bit to figure out what you > were actually referring to, not seeing the NSText match in that section. Yeah, it does sound like some unfortunate bit of ambiguity. I'm sure that "list +" is different to "list +[NSText initialize]" because the code has a special case for "arg[0] == '+' && arg[1] == '\0'", so it has to be a different case. Would be nice if we could change this to a less ambiguous option, as future work... > >> What your patch does is actually add "list +" to the "most commonly used" >> blurb at the top of the section. >> >> I'm not sure I really find that compelling, given that it is essentially >> synonymous with just repeating/hitting enter, documented just above it. >> To be clear, I am not entirely against it. I'll leave it to the documentation >> experts. My reasoning to document it is that all options should be in the documentation. If this option is redundant, I think it is a code issue, not a documentation issue. -- Cheers, Bruno >> >> [And I see we have a near mid-air collision with an Approved-by. So ignore me!] >> >> Keith >>