I want to use gdb to debug an application that embeds the ruby dll.
However, the ruby compile scripts are stripping debug symbols from the
ruby dll during the make process.

The source package is ruby-1.9.1-p0.tar.gz
I am compiling with gcc 3.4.5 in mingw/msys

The commands are:
./configure --enable-shared --disable-install-doc optflags="-O0"
make

This results in the -s flag when creating the shared .dll. The -s flag
strips out debugging symbols and I can't debug properly in gdb. I was
unable to find a configure flag to disable this behavior, and I
manually edited Makefile and config.status to remove this flag
("-shared $(if $(filter-out -g -g0,$(debugflags)),,-s" needs to be
changed).

More information and a screenshot:
http://railsquestions.blogspot.com/2009/01/compiling-ruby-with-debug-symbols-in.html

I will be happy to create a ticket in redmine and decided to check here first.

Cheers,
Tim