Interesting dwarf-2/shared lib problem.

Kris Warkentin kewarken@qnx.com
Tue Dec 2 17:11:00 GMT 2003


> Ah...interesting.  For the main object, the symtab points to
> c:\some_dir\main.c and the symtab->next points to just main.c.  It's the
> main.c that gets caught and returned.  In the solib, we only see the
> c:\some_lib\display.c so the FILENAME_CMP fails..
>
> So you are correct, lookup_partial_symtab is failing.

Looks like lbasename() in libiberty/lbasename.c is failing.  The
IS_DIR_SEPARATOR macro isn't being defined for __CYGWIN__ so when we've
compiled something with dos style paths...you get the picture.  I fixed it
in our source but someone might want to ponder this....

Index: lbasename.c
===================================================================
RCS file: /product/tools/gdb/libiberty/lbasename.c,v
retrieving revision 1.2
diff -u -r1.2 lbasename.c
--- lbasename.c 6 Sep 2002 20:21:02 -0000       1.2
+++ lbasename.c 2 Dec 2003 17:10:58 -0000
@@ -46,7 +46,7 @@
 #endif

 #if defined (_WIN32) || defined (__MSDOS__) \
-    || defined (__DJGPP__) || defined (__OS2__)
+    || defined (__DJGPP__) || defined (__OS2__) || defined (__CYGWIN__)
 #  define HAVE_DOS_BASED_FILE_SYSTEM
 #  ifndef DIR_SEPARATOR_2
 #    define DIR_SEPARATOR_2 '\\'

cheers,

Kris




More information about the Gdb mailing list