From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id jZOmI6yrbmBYCAAAWB0awg (envelope-from ) for ; Thu, 08 Apr 2021 03:07:24 -0400 Received: by simark.ca (Postfix, from userid 112) id 647751EE0E; Thu, 8 Apr 2021 03:07:24 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 888FD1E01F for ; Thu, 8 Apr 2021 03:07:23 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 83150393C85B; Thu, 8 Apr 2021 07:07:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 83150393C85B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1617865642; bh=0He5FM4S2luygRPYFAVLdVhYkF4ekACPY3Xt0sZPCBY=; 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=JJxX3MOXOA7da5CS/RzgKjcH3F4tu0yQylGC4mt+ei26Sbvjs7dTyQjNt871r6ZpK R8iI9dTi5ebnZcIKagrqOwgk6c4T9Mo8R7YiFQIkegoTq/ig1DfpGa8NbDu6ukyv0g ipU+1rLrcUa5tKNXCo1PeCBod7MX5QE6sgcrF1gI= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id D15913857805 for ; Thu, 8 Apr 2021 07:07:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D15913857805 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35316) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUOl3-0007Tj-Tp; Thu, 08 Apr 2021 03:07:17 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2322 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lUOl2-0000yD-49; Thu, 08 Apr 2021 03:07:16 -0400 Date: Thu, 08 Apr 2021 10:06:54 +0300 Message-Id: <83czv59rw1.fsf@gnu.org> To: Simon Marchi In-Reply-To: (message from Simon Marchi on Wed, 7 Apr 2021 17:18:08 -0400) Subject: Re: Subtle problems with "info sharedlibrary" on MS-Windows References: <83czw7p4nd.fsf@gnu.org> <777379173.1335754.1615393830518@mail.yahoo.com> <83mtvbne96.fsf@gnu.org> <259022839.1083386.1615397702855@mail.yahoo.com> <83y2dwbow6.fsf@gnu.org> <83lf9vbljw.fsf@gnu.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: , 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" > Cc: gdb-patches@sourceware.org > From: Simon Marchi > Date: Wed, 7 Apr 2021 17:18:08 -0400 > > > OK to commit to master (with a suitable ChangeLog entry)? > > The patch LGTM, see minor comments below. Thanks for your prompt review (and for the other help in investigating this tricky problem). > According to our style guideline, we would use > > dll_name != nullptr Does this also mean the GDB style prefers, e.g., if (load_addr == nullptr) to if (!load_addr) ? Because you didn't comment on those lines, only on those where the value is tested for NOT being null. > > + if (!(load_addr && mi.lpBaseOfDll != load_addr)) > > Perhaps matter of personal preference, but I would understand it better > (less mental steps) as > > if (!load_addr || mi.lpBaseOfDll == load_addr) I feel the other way around, but maybe I'm the odd one out here. Pedro, Joel: what say you? In any case, I guess I could add a comment there explaining the logic in plain English, so everyone would understand the intent.