This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can't debug bash with gdb 8.2.1-1


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]