public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* How to break cygwin inside dcrt0.cc ?
@ 2017-05-04 12:08 Marco Atzeri
  2017-05-05  1:17 ` Mark Geisert
  2017-05-05  2:01 ` Mark Geisert
  0 siblings, 2 replies; 7+ messages in thread
From: Marco Atzeri @ 2017-05-04 12:08 UTC (permalink / raw)
  To: cygwin

Hi,

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

Is dcrt0.cc built differently than the rest of cygwin dll ?

Thanks in advance
Marco

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to break cygwin inside dcrt0.cc ?
  2017-05-04 12:08 How to break cygwin inside dcrt0.cc ? Marco Atzeri
@ 2017-05-05  1:17 ` Mark Geisert
  2017-05-05  2:01 ` Mark Geisert
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Geisert @ 2017-05-05  1:17 UTC (permalink / raw)
  To: cygwin

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
>
> Is dcrt0.cc built differently than the rest of cygwin dll ?

WFM.  This is with self-built cygwin1.dll.  Only obvious difference is my build 
directory is set up like FAQ says, building in /oss/build and with /oss/src 
symlinked to where Cygwin source tree resides.  Here's what that looks like:

~/src/forker gdb forker
GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
[...]
Reading symbols from forker...done.
(gdb) b child_info_fork::alloc_stack
Function "child_info_fork::alloc_stack" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (child_info_fork::alloc_stack) pending.
(gdb) b main
Breakpoint 2 at 0x100401253: file forker.c, line 158.
(gdb) r 1
Starting program: /home/Mark/src/forker/forker 1
[New Thread 12628.0x494]
[New Thread 12628.0x327c]

Breakpoint 2, main (argc=2, argv=0xffffcc10) at forker.c:158
158         if (argc != 2) {
(gdb) i br
Num     Type           Disp Enb Address            What
1       breakpoint     keep y   0x0000000180046350 in 
child_info_fork::alloc_stack() at /oss/src/winsup/cygwin/dcrt0.cc:407
2       breakpoint     keep y   0x0000000100401253 in main at forker.c:158
         breakpoint already hit 1 time
(gdb)

..mark


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to break cygwin inside dcrt0.cc ?
  2017-05-04 12:08 How to break cygwin inside dcrt0.cc ? Marco Atzeri
  2017-05-05  1:17 ` Mark Geisert
@ 2017-05-05  2:01 ` Mark Geisert
  2017-05-05  7:44   ` Marco Atzeri
  1 sibling, 1 reply; 7+ messages in thread
From: Mark Geisert @ 2017-05-05  2:01 UTC (permalink / raw)
  To: cygwin

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

Is your installed cygwin-debuginfo package the same version as your cygwin package?

..mark


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to break cygwin inside dcrt0.cc ?
  2017-05-05  2:01 ` Mark Geisert
@ 2017-05-05  7:44   ` Marco Atzeri
  2017-05-05  8:47     ` Mark Geisert
  2017-05-05 10:06     ` Jon Turney
  0 siblings, 2 replies; 7+ messages in thread
From: Marco Atzeri @ 2017-05-05  7:44 UTC (permalink / raw)
  To: cygwin

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
>
> Is your installed cygwin-debuginfo package the same version as your
> cygwin package?
>
> ..mark
>


Hi Mark,
yes, I am using the same

$ uname -svr
CYGWIN_NT-6.1-WOW 2.8.0(0.309/5/3) 2017-04-01 20:42

  $ cygcheck -cd |grep cygwin
base-cygwin                           3.8-1
cygwin                                2.8.0-1
cygwin-debuginfo                      2.8.0-1
cygwin-devel                          2.8.0-1
cygwin-doc                            2.8.0-1
cygwin-x-doc                          1.1.20170220-1

I have the poblem on both 32 and 64 bit version.

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

  $ 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

Are you building using the source package ?

Regards
Marco




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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to break cygwin inside dcrt0.cc ?
  2017-05-05  7:44   ` Marco Atzeri
@ 2017-05-05  8:47     ` Mark Geisert
  2017-05-05 10:06     ` Jon Turney
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Geisert @ 2017-05-05  8:47 UTC (permalink / raw)
  To: cygwin

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
>>
>> Is your installed cygwin-debuginfo package the same version as your
>> cygwin package?
>>
>> ..mark
>>
>
>
> Hi Mark,
> yes, I am using the same
>
> $ uname -svr
> CYGWIN_NT-6.1-WOW 2.8.0(0.309/5/3) 2017-04-01 20:42
>
>   $ cygcheck -cd |grep cygwin
> base-cygwin                           3.8-1
> cygwin                                2.8.0-1
> cygwin-debuginfo                      2.8.0-1
> cygwin-devel                          2.8.0-1
> cygwin-doc                            2.8.0-1
> cygwin-x-doc                          1.1.20170220-1
>
> I have the poblem on both 32 and 64 bit version.
>
> By the way it seems that git source can not be built
> in cygwin as it lacks configure and
>
>   $ 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
>
> Are you building using the source package ?

Yes I am using source package and not git source.

..mark


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to break cygwin inside dcrt0.cc ?
  2017-05-05  7:44   ` Marco Atzeri
  2017-05-05  8:47     ` Mark Geisert
@ 2017-05-05 10:06     ` Jon Turney
  2017-05-05 13:25       ` Marco Atzeri
  1 sibling, 1 reply; 7+ messages in thread
From: Jon Turney @ 2017-05-05 10:06 UTC (permalink / raw)
  To: The Cygwin Mailing List

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to break cygwin inside dcrt0.cc ?
  2017-05-05 10:06     ` Jon Turney
@ 2017-05-05 13:25       ` Marco Atzeri
  0 siblings, 0 replies; 7+ messages in thread
From: Marco Atzeri @ 2017-05-05 13:25 UTC (permalink / raw)
  To: cygwin

On 05/05/2017 12:05, Jon Turney wrote:
> 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
>>>>

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

there is something else.
But I don't understand if it is the specific program,
the 32bit system on WOW or just a crazy BLODA in new
behaviors...

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

it seems my git repo copy was damaged.
Cloned again from scratch and configure appeared again :-((

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

as usual..

Marco



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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-05-05 13:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-04 12:08 How to break cygwin inside dcrt0.cc ? Marco Atzeri
2017-05-05  1:17 ` Mark Geisert
2017-05-05  2:01 ` Mark Geisert
2017-05-05  7:44   ` Marco Atzeri
2017-05-05  8:47     ` Mark Geisert
2017-05-05 10:06     ` Jon Turney
2017-05-05 13:25       ` Marco Atzeri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).