From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109025 invoked by alias); 23 Jul 2019 13:52:09 -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 109018 invoked by uid 89); 23 Jul 2019 13:52:09 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 spammy=8.2.1-1, 8211, HX-Languages-Length:1186, Cant X-HELO: rgout0707.bt.lon5.cpcloud.co.uk Received: from rgout0707.bt.lon5.cpcloud.co.uk (HELO rgout0707.bt.lon5.cpcloud.co.uk) (65.20.0.147) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 23 Jul 2019 13:52:07 +0000 X-OWM-Source-IP: 86.179.112.104 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-SNCR-VADESECURE: CLEAN Received: from [192.168.1.102] (86.179.112.104) by rgout07.bt.lon5.cpcloud.co.uk (9.0.019.26-1) (authenticated as jonturney@btinternet.com) id 5C6509360E841104; Tue, 23 Jul 2019 14:52:00 +0100 Subject: Re: Can't debug bash with gdb 8.2.1-1 To: The Cygwin Mailing List References: <37d412b3-f0ff-b079-4d64-16b01898b420@cornell.edu> From: Jon Turney Cc: Ken Brown Message-ID: <73dcccf2-33a0-7608-269b-e9cb9abc2238@dronecode.org.uk> Date: Tue, 23 Jul 2019 13:52:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <37d412b3-f0ff-b079-4d64-16b01898b420@cornell.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2019-07/txt/msg00206.txt.bz2 On 22/07/2019 15:59, Ken Brown wrote: > With the test version of gdb, attempting to debug bash fails as follows: > > $ gdb bash > GNU gdb (GDB) (Cygwin 8.2.1-1) 8.2.1 > [...] > Reading symbols from bash...Reading symbols from > /usr/lib/debug//usr/bin/bash.exe.dbg...done. > done. > (gdb) r -c ls > Starting program: /usr/bin/bash -c ls > [...] > /usr/bin/bash: initialize_job_control: getpgrp failed: No error > [...] > [Inferior 1 (process 31876) exited with code 01] > > This problem doesn't occur with gdb-8.1.1-1. Thanks for reporting this. I had also tripped over this problem recently: It seems that changes in gdb (bisection lands on [1]) mean that any call to getpgrp() in the inferior fails (this can be demonstrated with a test program that just calls that). I believe this is behaviour is caused by some kind of defect in the cygwin DLL, but I haven't made much progress in investigating it. (I don't really understand how the inferior gets into a state where getpgrp() fails, which isn't really supposed to happen...) [1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=e671cd59d74cec9f53e110ce887128d1eeadb7f2 -- 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