How to break cygwin inside dcrt0.cc ?

Jon Turney jon.turney@dronecode.org.uk
Fri May 5 10:06:00 GMT 2017


On 05/05/2017 08:44, Marco Atzeri wrote:
> On 05/05/2017 04:01, Mark Geisert wrote:
>> Marco Atzeri wrote:
>>> I am likely missing something obvious, but I do not succeed to put
>>> a breakpoint inside child_info_fork::alloc_stack
>>>
>>> break child_info_fork::alloc_stack
>>> Function "child_info_fork::alloc_stack" not defined.
>>>
>>>   break /usr/src/debug/cygwin-2.8.0-1/winsup/cygwin/dcrt0.cc:408
>>> No source file named
>>> /usr/src/debug/cygwin-2.8.0-1/winsup/cygwin/dcrt0.cc

This works for me:

> $ gdb test.exe
[...]
> Reading symbols from test.exe...done.
> (gdb) b main
> Breakpoint 1 at 0x1004010dd: file test.c, line 7.
> (gdb) r
> Starting program: /wip/test.exe
>
> Thread 1 "test" hit Breakpoint 1, main () at while-test.c:7
> 7          sleep(1);
> (gdb) b child_info_fork::alloc_stack()
> Breakpoint 2 at 0x1800463f0: file /usr/src/debug/cygwin-2.8.0-1/winsup/cygwin/dcrt0.cc, line 407.
> (gdb)

You are in a state where the debug info for cygwin1.dll has been loaded? 
  Trying to set a breakpoint before the program has run won't work, as 
cygwin1.dll hasn't loaded yet...

> By the way it seems that git source can not be built
> in cygwin as it lacks configure

What? The configure script is in the git repo and source tarball.

>  $ autoreconf
> configure.ac:33: error: Please use exactly Autoconf 2.64 instead of 2.69.
> config/override.m4:12: _GCC_AUTOCONF_VERSION_CHECK is expanded from...
> configure.ac:33: the top level
> autom4te-2.69: /usr/bin/m4 failed with exit status: 1
> aclocal-1.14: error: echo failed with exit status: 1
> autoreconf-2.69: aclocal failed with exit status: 1

This version of autoconf is packaged as gcc-tools-epoch2-autoconf.  The 
announce mail for that explains how to use it.

Moving off such ancient autotools needs to be done, but SHTDI...


--
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



More information about the Cygwin mailing list