From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4207 invoked by alias); 9 Oct 2019 21:28:24 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 4200 invoked by uid 89); 9 Oct 2019 21:28:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: smtp-out-so.shaw.ca Received: from smtp-out-so.shaw.ca (HELO smtp-out-so.shaw.ca) (64.59.136.139) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 09 Oct 2019 21:28:21 +0000 Received: from [192.168.1.114] ([24.64.172.44]) by shaw.ca with ESMTP id IJVGim99ZSrVcIJVIi6fkZ; Wed, 09 Oct 2019 15:28:17 -0600 Reply-To: Brian.Inglis@SystematicSw.ab.ca Subject: Re: assert creates unusable core dump on current stable Cygwin release To: The Cygwin Mailing List References: <2300fe24-fc50-3d1c-6b1b-bf6da6022d2e@SystematicSw.ab.ca> From: Brian Inglis Openpgp: preference=signencrypt Message-ID: <71be3508-b11e-4681-eac6-9d44845088c7@SystematicSw.ab.ca> Date: Wed, 09 Oct 2019 21:28:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-10/txt/msg00050.txt.bz2 On 2019-10-09 11:10, Jon Turney wrote: > On 09/10/2019 16:31, Brian Inglis wrote: >> On 2019-10-09 01:14, Biswapriyo Nath wrote: >>> * mintty version: mintty 3.0.6 (x86_64-pc-cygwin) * cygwin version: >>> 3.1.0-0.6 * code: >>> >>> #include >>> >>> int main() { int x = 1; assert(x == 0); } >>> >>> * Expected result: The terminal should show this message which appers in >>> latest stable cygwin version. assertion "x == 0" failed: file "test.c", >>> line 6, function: main >>> >>> * Actual result: terminal only shows "Aborted (core dumped)". >> >> I also get the core dump, which is un-gdb-able below, as is it's core dump, >> on *current stable* Cygwin 64 releases *AND* see the message! > > As far as I'm aware, the core-dump tool 'dumper' has never been fixed for > x86_64, so I wouldn't expect this to work. See [1]. > > [1] https://cygwin.com/ml/cygwin/2016-03/msg00464.html Given that it's used elsewhere, is there more to it than just: int dumper::init_core_dump () { bfd_init (); - core_bfd = bfd_openw (file_name, "elf32-i386"); + core_bfd = bfd_openw (file_name, "elf64-x86"); if (core_bfd == NULL) { bfd_perror ("opening bfd"); goto failed; } if (!bfd_set_format (core_bfd, bfd_core)) { bfd_perror ("setting bfd format"); goto failed; } - if (!bfd_set_arch_mach (core_bfd, bfd_arch_i386, 0)) + if (!bfd_set_arch_mach (core_bfd, bfd_arch_i386, bfd_mach_x86_64)) { bfd_perror ("setting bfd architecture"); goto failed; } return 1; failed: dumper_abort (); return 0; } -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple