-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Christopher Faylor schrieb: > On Sun, May 28, 2006 at 10:59:35PM +0200, Ralf Habacker wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> In the how-to-debug-cygwin.txt there is listed how to run application >> using strace in gdb: >> >> To debug this scenario, do something like this: >> >> bash$ gdb -nw yourapp.exe >> (gdb) dll cygwin1 >> (gdb) l dll_crt0_1 >> (gdb) b <<first line in the function>> >> (gdb) run >> (gdb) set strace.active=1 >> (gdb) continue >> >> >> According to winsup/cygwin/include/sys/strace.h the class member active >> is known now as _active. > > I've changed this. > >> I have tried to get this running in gdb (cvs), but there is no output in >> gdb. > > Getting output from gdb was not the intent of this section. Look at the > name of the section: "Program dies when running under strace". If the > intent was to get output from gdb it would have been something like > "Make gdb output strace info".
It was not explicit said that there is no output, so I guess it was. > I'm not aware of any way to have gdb print strace info. The following patch enables gdb to print cygwin strace messages. 2006-05-29 Ralf Habacker <[EMAIL PROTECTED]> * win32-nat.c: (handle_output_debug_string): initial strace output support for cygwin. Index: gdb/win32-nat.c =================================================================== RCS file: /cvs/src/src/gdb/win32-nat.c,v retrieving revision 1.122 diff -u -b -B -r1.122 win32-nat.c - --- gdb/win32-nat.c 10 Apr 2006 21:43:45 -0000 1.122 +++ gdb/win32-nat.c 29 May 2006 11:19:49 -0000 @@ -927,7 +927,12 @@ /* nothing to do */; else if (strncmp (s, _CYGWIN_SIGNAL_STRING, sizeof (_CYGWIN_SIGNAL_STRING) - 1) != 0) { - - if (strncmp (s, "cYg", 3) != 0) + if (strncmp (s, "cYg", 3) == 0) + { + char *p = strchr(s+12,' '); // skip 'cYgxxxxxxxx <category>' + printf_unfiltered ("strace: %s", p ? p+1 : s+12); + } + else warning (("%s"), s); } #ifdef __COPY_CONTEXT_SIZE =================================================================== Regards Ralf -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (Cygwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEetqEoHh+5t8EXncRAuhNAJ9ox5IHUnkqZL93hQejih0HuIraIQCglMhg 22SIlwNUvNgbx6dfzMYe640= =gqy2 -----END PGP SIGNATURE----- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/