From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 7A46E3854821 for ; Thu, 13 May 2021 15:47:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7A46E3854821 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 14DFlpnY012687 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 May 2021 11:47:56 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 14DFlpnY012687 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 0CA841E783; Thu, 13 May 2021 11:47:51 -0400 (EDT) Subject: Re: [PATCH 4/4] gdb/mi: extend -file-list-exec-source-files command To: Andrew Burgess , gdb-patches@sourceware.org References: From: Simon Marchi Message-ID: Date: Thu, 13 May 2021 11:47:50 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 13 May 2021 15:47:51 +0000 X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 May 2021 15:47:59 -0000 On 2021-04-26 1:07 p.m., Andrew Burgess wrote: > This commit extends the -file-list-exec-source-files command to > support all of the features that the cli 'info sources' supports. > > As this is MI the output of -file-list-exec-source-files should be > backward compatible, though I have added an extra field into the > output format, but I believe this is acceptable as a well behaving > front end is free to ignore a field it doesn't understand. > > As an example, the previous output might look like this: > > ^done,files=[{file="foo.c",fullname="/home/foo.c"}] > > While the new output would look like: > > ^done,files=[{file="foo.c",fullname="/home/foo.c",debug-fully-read="true"}] > > With the new field indicating that the source file 'foo.c' is from a > compilation unit that GDB has fully read in. > > This would allow a front end to recreate GDB's cli output format where > the source files are split into two groups based on whether the debug > information for the containing compilation unit has been fully read or > not. > > While -file-list-exec-source-files previously took no arguments, after > this commit the command can _optionally_ take some arguments, as these > are optional this should not break backward compatibility. Your commit message is missing mentioning the new --group-by-binary option of the MI command. It would be useful to have an example with and without this option, to see the new structure of the output. In the case of the MI command, it makes sense to have --group-by-binary, since we need to preserve backwards compatibility. As Eli said for the doc: I don't know if "binary" is the right term. I would tend to say that "object file" is the right term, but it would be good to check what term we already use elsewhere in the MI and CLI. But in general the patch looks fine to me. Simon