delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/07/23/09:53:08

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:cc:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=MLJkv8GKmIL+KaJG
nkeVg1bXGi6bjnbiVunzCgViBFyPk2TWwY5SqZpbZuHIcyaemowlqLi1dlbktPcx
BlH6X7PyjfRZvKgTFjzlJQs5KFTvK8En0aNE0AJwzVR4RiLqMZ7PwiBraeAD8hwU
VesVC1fpLXqYaYgOQpXeZJfrKxM=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:cc:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=xTuZ/C7fYJY5YsCgYonOId
8ez7E=; b=awAgH5/TbF4la/BeK6Qczpu+gMPq3jBY+IONF6e/heRnRxjcnkl98M
Mdy0z3XDnnptafRQ4qGpS2eOzDAmO4StSgsdwGTteESPfrqz4e33iUO2xmWzhhv9
joxs9BNeZZWtfazll/EYPR5DWtgO7qjtxxXWExnismjECBgN+0zco=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
X-OWM-Source-IP: 86.179.112.104 (GB)
X-OWM-Env-Sender: jonturney AT btinternet DOT com
X-VadeSecure-score: verdict=clean score=0/300, class=clean
X-SNCR-VADESECURE: CLEAN
Subject: Re: Can't debug bash with gdb 8.2.1-1
To: The Cygwin Mailing List <cygwin AT cygwin DOT com>
References: <37d412b3-f0ff-b079-4d64-16b01898b420 AT cornell DOT edu>
From: Jon Turney <jon DOT turney AT dronecode DOT org DOT uk>
Cc: Ken Brown <kbrown AT cornell DOT edu>
Message-ID: <73dcccf2-33a0-7608-269b-e9cb9abc2238@dronecode.org.uk>
Date: Tue, 23 Jul 2019 14:51:57 +0100
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>

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019