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: How to break cygwin inside dcrt0.cc ?


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


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