This is the mail archive of the 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]

Debugging dlls using gdb - cannot break inside library function


I'm trying to port icu ( to cygwin. I need to debug one of the libraries dlls.

The problem is, gdb just skips over the calls to the library. I'm able to set a breakpoint on a function inside a library or on a line in library code. However, gdb never stops on these. It is aware where the source files are and it is obvious that the symbols are loaded properly - otherwise I wouldn't be able to set the breakpoint.

Here is a part of the build log:
c++ -I. -D_REENTRANT -I. -I/icu/source/common -D_REENTRANT -DUDATA_MAP -DHAVE_CONFIG_H -DU_LIBICUDATA_NAME=\"icudt22l\" -DU_COMMON_IMPLEMENTATION -g -c -DPIC -o util.o /icu/source/common/util.cpp
gcc -I. -D_REENTRANT -I. -I/icu/source/common -D_REENTRANT -DUDATA_MAP -DHAVE_CONFIG_H -DU_LIBICUDATA_NAME=\"icudt22l\" -DU_COMMON_IMPLEMENTATION -g -c -DPIC -o uenum.o /icu/source/common/uenum.c
c++ -DHAVE_CONFIG_H -DU_LIBICUDATA_NAME=\"icudt22l\" -DU_COMMON_IMPLEMENTATION -I. -D_REENTRANT -I. -I/icu/source/common -D_REENTRANT -DUDATA_MAP -g -shared -Wl,-soname -Wl,libicuuc.dll.22 -o libicuuc.dll.22.0 putil.o uobject.o locmap.o mutex.o umutex.o udata.o ucmndata.o udatamem.o umapfile.o filestrm.o uresbund.o uresdata.o resbund.o cwchar.o uloc.o locid.o uhash.o uhash_us.o ucnv.o ucnv_bld.o ucnv_cb.o ucnv_cnv.o ucnv_err.o ucnv_io.o ucnvlat1.o ucnv_u7.o ucnv_u8.o ucnv_u16.o ucnv_u32.o ucnvmbcs.o ucnv2022.o ucnvhz.o ucnv_lmb.o ucnvscsu.o ucnvbocu.o ucnvisci.o unistr.o utf_impl.o ustring.o ustrcase.o cstring.o ustrfmt.o ustrtrns.o normlzr.o unorm.o chariter.o schriter.o uchriter.o uiter.o uchar.o uprops.o bidi.o ubidi.o ubidiwrt.o ubidiln.o ushape.o unames.o ucln_cmn.o uscript.o usc_impl.o umemstrm.o ucmp8.o uvector.o digitlst.o brkiter.o brkdict.o ubrk.o dbbi.o dbbi_tbl.o rbbi.o rbbidata.o rbbinode.o rbbirb.o rbbiscan.o rbbisetb.o rbbistbl.o rbbitblb.o unicode.o convert.o utrie.o uset.o unifilt.o unifunct.o uniset.o upropset.o usetiter.o util.o uenum.o -L../data/out -L../stubdata -licudata -lpthread -lm

Here is the nm output for one of the C functions I'm trying to step in:
10007ea0 T _ures_open_2_2
One of the interesting C++ methods:
10009ad4 T _getString__CQ27icu_2_214ResourceBundleR10UErrorCode
10009ad4 T icu_2_2::ResourceBundle::getString(UErrorCode &) const

If I try to put a breakpoint at ures open, I get correct response from gdb:
(gdb) b ures_open_2_2
Breakpoint 4 at 0x10007ea9: file /icu/source/common/uresbund.c, line 1404.
But the execution never stops there. I can even put a bp on a line inside the library function - also without a result.

All the library functions are included as
extern __declspec(dllimport) ...

What am I doing wrong?


Vladimir Weinstein, IBM GCoC-Unicode/ICU San Jose, CA

Unsubscribe info:
Bug reporting:

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