From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from re-prd-fep-048.btinternet.com (mailomta9-re.btinternet.com [213.120.69.102]) by sourceware.org (Postfix) with ESMTPS id F13DA386102D for ; Wed, 8 Jul 2020 15:50:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F13DA386102D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dronecode.org.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=jon.turney@dronecode.org.uk Received: from re-prd-rgout-003.btmx-prd.synchronoss.net ([10.2.54.6]) by re-prd-fep-048.btinternet.com with ESMTP id <20200708155041.HKYT4701.re-prd-fep-048.btinternet.com@re-prd-rgout-003.btmx-prd.synchronoss.net>; Wed, 8 Jul 2020 16:50:41 +0100 Authentication-Results: btinternet.com; auth=pass (PLAIN) smtp.auth=jonturney@btinternet.com X-Originating-IP: [31.51.206.31] X-OWM-Source-IP: 31.51.206.31 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduiedrudejgdelhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemuceutffkvffkuffjvffgnffgvefqofdpqfgfvfenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheplfhonhcuvfhurhhnvgihuceojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukheqnecuggftrfgrthhtvghrnhephfejkeetffdvgeelgfetgeefkedtgeffveefheffudffjeetffevgfeigfejgffgnecuffhomhgrihhnpehsohhurhgtvgifrghrvgdrohhrghenucfkphepfedurdehuddrvddtiedrfedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghloheplgduledvrdduieekrddurdduuddungdpihhnvghtpeefuddrhedurddvtdeirdefuddpmhgrihhlfhhrohhmpeeojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukhequceuqfffjgepkeeukffvoffkoffgpdhrtghpthhtohepoegtsghivghsihhnghgvrhesghhoohhglhgvrdgtohhmqedprhgtphhtthhopeeoghgusgdqphgrthgthhgvshesshhouhhrtggvfigrrhgvrdhorhhgqe X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from [192.168.1.111] (31.51.206.31) by re-prd-rgout-003.btmx-prd.synchronoss.net (5.8.340) (authenticated as jonturney@btinternet.com) id 5ED9C2FD05DB635B; Wed, 8 Jul 2020 16:50:41 +0100 Subject: Re: [PATCH 7/7] Add handling for 64-bit module addresses in Cygwin core dumps To: Christian Biesinger , gdb-patches@sourceware.org References: <20200701213225.14144-1-jon.turney@dronecode.org.uk> <20200701213225.14144-8-jon.turney@dronecode.org.uk> From: Jon Turney Message-ID: Date: Wed, 8 Jul 2020 16:50:41 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NONE, TXREP autolearn=no 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: Wed, 08 Jul 2020 15:50:44 -0000 On 06/07/2020 21:13, Christian Biesinger via Gdb-patches wrote: > On Wed, Jul 1, 2020 at 4:34 PM Jon Turney wrote: >> --- a/bfd/elf.c >> +++ b/bfd/elf.c >> @@ -10185,10 +10185,19 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note) >> break; >> >> case 3 /* NOTE_INFO_MODULE */: >> - /* Make a ".module/xxxxxxxx" section. */ >> + case 4 /* NOTE_INFO_MODULE64 */: > > It really seems like these should be actual constants, which would > also make it easier to understand... Absolutely. Before [1], this structure was defined by including Cygwin's (so this code didn't work in cross-environments). I can't find a model of adding note structure definitions (the other grok_note functions seem to rely on OS definitions), so I'm not sure what kind of change you are asking me to make in this patch. [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=4a6636fbb5c051fbe15d18a005a2a505ef652571 > >> + /* Make a ".module/" section. */ >> /* module_info.base_address */ >> - base_addr = bfd_get_32 (abfd, note->descdata + 4); >> - sprintf (buf, ".module/%08lx", (unsigned long) base_addr); >> + if (type == 3) > > ...this if. > >> --- a/gdb/windows-tdep.c >> +++ b/gdb/windows-tdep.c >> + if (data_type == 3) /* NOTE_INFO_MODULE */ > > Same here.