From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id eIzRM6/5hmAZagAAWB0awg (envelope-from ) for ; Mon, 26 Apr 2021 13:34:39 -0400 Received: by simark.ca (Postfix, from userid 112) id D20731F11C; Mon, 26 Apr 2021 13:34:39 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 8B0381E54D for ; Mon, 26 Apr 2021 13:34:38 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 462F33951875; Mon, 26 Apr 2021 17:34:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 462F33951875 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1619458478; bh=Y555OBe7GCviqEfcM9NEa02RZKBYag+G74JxD2TDjWI=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=RQjtwtW3V11/MisHN3uUPx3hZYdCczz1/1DSy842GJK4i/7p0eg5BJJMcQHnr9Mo4 Bk1o0iMw+DJ10ysgEZw4MGL1tAFP0FIZUYh5j1JH71giZy8MDtxliRC58QxEebyT7A SuuGw7pzAWLfROVHdM7Vmn/GfZ0VcDw4pa0mSBik= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 81E2038930D0 for ; Mon, 26 Apr 2021 17:34:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 81E2038930D0 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33335) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lb57s-0002FZ-Vx; Mon, 26 Apr 2021 13:34:29 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4357 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lb57s-0007Bz-4v; Mon, 26 Apr 2021 13:34:28 -0400 Date: Mon, 26 Apr 2021 20:34:06 +0300 Message-Id: <83wnsphrw1.fsf@gnu.org> To: Andrew Burgess In-Reply-To: <760d52a0ea6ab8c2195d71feea794f0bec70a163.1619456691.git.andrew.burgess@embecosm.com> (message from Andrew Burgess on Mon, 26 Apr 2021 18:07:02 +0100) Subject: Re: [PATCH 3/4] gdb: add new -group-by-binary flag to info sources command References: <760d52a0ea6ab8c2195d71feea794f0bec70a163.1619456691.git.andrew.burgess@embecosm.com> 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: , From: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" > From: Andrew Burgess > Date: Mon, 26 Apr 2021 18:07:02 +0100 > > +info sources [-group-by-binary] [-dirname] [-basename] [REGEXP] > + The 'info sources' command now supports a new flag > + '-group-by-binary'. When this flag is supplied the results are > + formatted as a list of loaded binaries followed by the source files > + for each binary. A single source file can appear multiple times in > + the output if it is part of multiple binaries. I'm worried about the confusion we will cause by the "binary" terminology. Elsewhere we call these "object files"; see, for example, "Auto-loading sequences". Can we keep our terminology consistent? > +When the optional @code{-group-by-binary} flag is given then the > +output is organized as a list of the binaries currently loaded into > +@value{GDBN}, for each binary, all of the source files associated with > +that binary are given. A single source file can be repeated in this > +output format, if it is part of multiple binaries. And here you don't even explain what is a "binary" for this purpose. > +If the optional @var{regexp} is provided, then only source files that > +match the regular expression will be printed. The matching is > +case-sensitive, except on operating systems that have case-insensitive > +filesystem (e.g., MS-Windows). @samp{--} can be used before > +@var{regexp} to prevent @value{GDBN} interpreting @var{regexp} as a > +command option (e.g. if @var{regexp} starts with @samp{-}). I wonder how the new output will look when REGEXP is given. Suppose some binary has no sources that match the regexp: will that binary appear with an empty list of source files, or will it not appear at all? And if the latter, isn't it confusing? Thanks.