cygwin bughunt (more FAQ stuff)

David Dindorp
Fri Jan 21 10:18:00 GMT 2005

Joshua Daniel Franklin wrote:

> Well, how about this then:
> [snip]

Here's my shot at what would've helped me a lot when I initially faced
problems.  Of course providing as much info as below will only leave
you with more newbies crying 'cygwin_split_path() : 0x61073e06' or such.

+ More information. Good for newbies (like me).
+ Basically I think it was two different questions, so splitted them up.
- Lengthier.

I may have found a bug in Cygwin, how can I debug it?

You can use GDB [link to GDB description?] to debug the failing
Using the 'backtrace' command within GDB will tell you which, if any,
cygwin functions are being executed at the time that your application is

GDB works on core files generated during segmentation faults or using
'dumper.exe' utility.  It can also debug live processes.
In order to properly use GDB, you must have debugging symbols enabled,
(when using a core dump file) preferably run GDB on the machine where
failure occurred.  See [next item] and [next next item].

GDB does not show any function names (only "???") when debugging core

In order for GDB to look up function names, it needs to be able to find
files that match the version(s) that was used when the core dump was
This usually means that the easiest way to get the correct output is to
GDB on the machine where the crash originally occurred. Also avoid
that particular machine (Cygwin and OS) until you are done debugging.

If you need to debug on a different machine, you can get the relevant
DLL and
EXE files from the original machine and stuff them in the same paths as
originally resided.  Run GDB on the core file and run 'info dll' to get
names of the files needed.  Alternatively, if using 'dumper.exe', do a
run and grab the filenames like this:
 dumper -d <filename> <winpid> | grep "added module".

The symbols in gdb are missing or look funny (eg. are just hex values)?

Debugging symbols are stripped from distributed Cygwin binaries, so any
symbols that you see in gdb are basically meaningless. It is also a
good idea to use the latest code in case the bug has been fixed, so you
will need to follow the instructions at [/faq/faq_3.html#SEC102] to
build your own debugging version. You can also contact the mailing list
for pointers (a simple test case that demonstrates the bug is very

Mangle and/or ridicule as you see fit :-).

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list